[vos-d] VOS to RDF mapping

Reed Hedges reed at interreality.org
Mon Dec 4 19:39:12 EST 2006


Hi Karsten, the HTTP "hypervos" extension in s4 has a mode where it can
emit a description of the Vobjects in RDF (instead of a simple HTML
listing) for objects that aren't actually meant to be served as an XML
document by hypervos.

I don't know if it's correct or not (probably not, I bascially guessed
at stuff, and I think I see some XML sytax errors even), I added it as a
starting point  for someone who knows much more about RDF than I do.  We
should probebly improve it and perhaps make it compatible with your
software (since your use of RDF is, I assume, much richer and generally
better than mine!).

The code is at libs/vos/extensions/http/httpserver.cc in the
describeVobject_RDF() function.  It only describes one Vobject, not a
whole tree of them. Like this:

<rdf:RDF xmlns:rdf="..." xmlns:rdfs="..." xmlns:vos="..fake schema..."
xmlns:xsd="...." xml:base="http://interreality.org/otd/">
   <rdf:Description rdf:about="vip://host/obj">
       <rdf:type>http://interreality.org/otd/objectType</rdf:type>
          <!-- I  guess the idea was that all object types would define
               their required children in the
http://interreality.org/otd/objectType or the
http://interreality.org/otd/ namespace -->
       <childContextualName1 rdf:resource="vip://host/childObj" />
       <childContextualName2 rdfs:datatype="string">property object
value</childContextualName2>
    </rdf:Description>
</rdf:RDF>

Reed


Karsten Otto wrote:
> 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).
> 
> 
> _______________________________________________
> vos-d mailing list
> vos-d at interreality.org
> http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d




More information about the vos-d mailing list