Re: RDF scripting / domain language ? eg: print( myResource.rdfs_label )

The closest thing I know of is a python layer that, I think,  Mark
Nottingam did a while ago on the top of rdflib: one can map (RDF)
properties of a resource into the python class and property paradigm and
get to some expression you refer to below. It is called sparta:

http://www.mnot.net/sw/sparta/

A good example is:

http://www.mnot.net/sw/sparta/example.py

Having said that, one has to be careful. Eg, your example below:

myResource.ns_somePredicate[3].rdfs_label

may not be well defined, because there is no notion of 'order' in the
predicates for a resource!

I hope this helps

Ivan

Aldo Bucchi wrote:
> 
> hi all,
> 
> has anyone ran into an RDF scripting / domain language??
> 
> something that would allow me to do things like:
> 
> print( myResource.ns_somePredicate[3].rdfs_label );
> 
> or...
> 
> for ( chapterResource in bookResource.hasChapter )
>    print( chapterResource.rdfs_label.toString() )
> 
> 
> I'm creating a scripting language myself and would like to get some
> design ideas ( how to handle collections, functional props, shorthands
> to access literals, etc )
> 
> Thanks,
> Aldo
> 
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf#Me

Received on Sunday, 27 August 2006 07:43:59 UTC