Re: Importing XMP data with SemWeb



On Mon, 2006-04-17 at 09:47 -0400, Warren Baird wrote:
> Hi all,
> 
> I've been looking into how to get XMP importing working - specifically 
> for Category/Tag values.
> 
> I looked at the XMP writing code in JpegHeader, and all it's doing is 
> adding an anonymous bag containing the Category/Tag names as strings. 
>     I've only done a bit of reading on XMP so far --- is this really the 
> best way to store Category/Tag data?   Is that the format I should look 
> for when importing?  It seems overly general to just assume that any 
> rdf::Bag structure I find contains category names.  Is their a standard 
> XMP namespace for storing this kind of information that we should use?
> 

It is following the XMP specification for keywords.  It creates triple
with a dc:Subject predicate and points that to the rdf bag with the
keywords.  We could easily extend way it stores this by defining some
custom predicates that hold more info but what is there now is the most
interoperable way of storing tags/keywords.

> While I'm asking silly questions - is there any way to get at the 
> hierarchical structure of an XMP file via the semweb code?  I've taken
> a 
> quick look through the semweb docs and haven't seen anything --- 
> everything I find seems to walk through statements as if it was a
> flat 
> list.   What I'd like to do is find the bag containing the category 
> information and then walk through it's children specifically.    some 
> kind of DOM-like access to the data would be best...
> 

With semweb this is definitely a pain (look at the places in f-spot that
use the XMP directly for the lame hacks I did), but the semweb code for
reading and writing handled what I needed.  Someone could easily use the
triples to create a walkable graph and I'd be very happy if they did. I
haven't gotten to it yet.

--Larry





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]