Class as values in RDF
548445Mar 28 2007 — edited Apr 19 2007I have the following problem... I have a bunch of triples of the form
osgb1 hasForm Heath
osgb2 hasForm ConiferousTrees
Heath rdf:subClassOf Vegetation
ConiferousTrees rdf:subClassOf Vegetation
Vegetation rdf:subClassOf Land
I then want to find objects with a given form, and I want to be able to query up and at all levels in my hierarchy. So for example "find me things with form Heath" would return osgb1, and "find me things with form Vegetation" would return both osgb1 and osgb2.
The problem here is that the object in the triples is a class, and also
osgb1 hasForm Heath
does not entail
osgb1 hasForm Vegetation
I suppose what I really would like to say (if I had OWL) is:
osgb1 rdf:type hasForm some Heath
etc.
However, we cannot do this in RDF/Oracle (yet). Current SWBP recommend creating an instance for each class as follows:
land rdf:type Land
heath rdf:type Heath
then constructing triples of the form:
osgb hasForm heath
and then if I want to find all the "Land" I do a SPARQL query like:
select ?x
where
{
?x hasForm ?y
?y rdf:type Land
}
This should work, but seems potentially clunky.
Just curious if anyone has tried alternative solutions to this problem, or has an experience of how it scales.
thanks
John