W3C home > Mailing lists > Public > semantic-web@w3.org > August 2006

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

From: Ivan Herman <ivan@w3.org>
Date: Sun, 27 Aug 2006 09:43:45 +0200
Message-ID: <44F14D31.9070701@w3.org>
To: Aldo Bucchi <aldo.bucchi@gmail.com>
CC: semantic-web@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:17 UTC