[vos-d] VOS to RDF mapping
Karsten Otto
otto at inf.fu-berlin.de
Fri Dec 1 09:27:06 EST 2006
Let me contribute one more animal to the vobject graph language
zoo... In my own framework I currently map VOS to RDF (Resource
Description Format). The mapping is somewhat ad-hoc, but works nicely
for me. I'd appreciate comments and suggestions!
Mapping VOS graphs to RDF is relatively easy, since VOS
already
uses URIs to identify objects. For other purposes, such
as child
relations and object types, VOS does not use URIs, but
instead
utilizes strings conforming to an XML qname notation.
For mapping
purposes, this can be represented by URIs of the form
http://interreality.org/otd/*schema*/*name*.
For some child relations, the actual name is not deemed
important,
and VOS uses a randomly generated name without namespace
part.
In a way, this represents an "anonymous" relation, which
unfortunately cannot be expressed in RDF; instead the
mapping
http://interreality.org/otd/_/*name* is used.
Thus, VOS objects map directly to RDF resources, using
the normal
rdf:type property to indicate types, which are mapped
from their
native qname form to URIs as described above. Child
relations
work in a similar way, using mapped contextual names as RDF
properties. Since the order of child relations matters
in VOS,
there must be an additional [rdf:_*n*] property for each.
Together, these two RDF properties reflect the
contextual name and
position of a VOS child relation.
VOS uses the special object type property:Property to
represent literal values. In addition to the actual
value, each VOS
Property has a certain length, and usually also an
associated data
type. VOS Properties are represented as RDF resources as
usual for
VOS objects. The property rdf:value then contains the
actual
value, while vos:length indicates its length, and
vos:datatype
the respective data type string. Since VOS Properties
can contain
several megabytes of binary data, the value is only
reflected
if it has a "reasonable" size (currently 256 bytes).
More information about the vos-d
mailing list