Hi,
I am trying to develop a semantic web in ruby. I am using the library
ActiveRDF and I have download some adapters (activerdf_sparql,
rdflite…).
I am trying to do this:
ConnectionPool.add_data_source :type => :sparql,
:url => “http://localhost:3000/prueba/person.owl”,
:results => :sparql_xml ,
:engine => :virtuoso
ObjectManager.construct_classes
all_classes = OWL::Class.find_all
puts all_classes.length
I want to map the classes defined in the owl document to ruby classes,
that is done for the method ObjectManager.construct_classes, but it
doesn’t work. The variable OWL::Class.find_all return a array but it’s
empty.
The file person.owl is:
<?xml version="1.0"?><rdf:RDF
xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
xmlns:protege=“http://protege.stanford.edu/plugins/owl/protege#”
xmlns:xsp=“http://www.owl-ontologies.com/2005/08/07/xsp.owl#”
xmlns:owl=“http://www.w3.org/2002/07/owl#”
xmlns=“http://www.owl-ontologies.com/Ontology1243339147.owl#”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema#”
xmlns:swrl=“A SWRL Namespace”
xmlns:swrlb=“A SWRL Namespace”
xmlns:rdfs=“http://www.w3.org/2000/01/rdf-schema#”
xml:base=“http://www.owl-ontologies.com/Ontology1243339147.owl”>
<owl:Ontology rdf:about=“”/>
<rdfs:Class rdf:ID=“Person”/>
<owl:ObjectProperty rdf:ID=“name”/>
<owl:ObjectProperty rdf:ID=“edad”/>
</rdf:RDF>
I don’t what is the problem. If anyone has any idea and can help I would
appreciate that.
Regards