hey jena folks,
I'm new to this list, so please forgive me if I get something wrong...
my specific questions are at the end of this email, but I wanted to
first describe my problem:
*I am trying to read the latest AIRS OWL (rdf/xml) files, and I'm having
a problem with a particular construct. **
**In AIRSMidLevelOntology.owl, on line 484, I have this:*
<owl:Class rdf:ID="LandlineTelephoneNumber">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Landline telephone number</rdfs:label>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty
rdf:resource="http://www.cubrc.org/ontologies/KDD/Mid/InformationEntityOntology#designates"/>
<owl:someValuesFrom>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<rdf:Description
rdf:about="http://www.cubrc.org/ontologies/KDD/Mid/ArtifactOntology#LandlineTelephone"/>
<owl:Restriction>
<owl:onProperty
rdf:resource="http://www.obofoundry.org/ro/ro.owl#part_of"/>
<owl:someValuesFrom
rdf:resource="http://www.cubrc.org/ontologies/KDD/Mid/ArtifactOntology#TelecommunicationNetwork"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:someValuesFrom>
</owl:Restriction>
</owl:equivalentClass>
<rdfs:subClassOf>
<owl:Class rdf:ID="TelephoneNumber"/>
</rdfs:subClassOf>
</owl:Class>
*
**but jena throws when i read **this line:*
<rdf:Description
rdf:about="http://www.cubrc.org/ontologies/KDD/Mid/ArtifactOntology#LandlineTelephone"/>
*saying that it can't convert it to a class:*
Uncaught throwable handled
com.hp.hpl.jena.ontology.ConversionException: Cannot convert node
http://www.cubrc.org/ontologies/KDD/Mid/ArtifactOntology#LandlineTelephone
to OntClass: it does not have rdf:type owl:Class or equivalent
at
com.hp.hpl.jena.ontology.impl.OntClassImpl$1.wrap(OntClassImpl.java:83)
at com.hp.hpl.jena.enhanced.EnhNode.convertTo(EnhNode.java:152)
at com.hp.hpl.jena.enhanced.EnhNode.convertTo(EnhNode.java:31)
at com.hp.hpl.jena.enhanced.Polymorphic.asInternal(Polymorphic.java:62)
at com.hp.hpl.jena.enhanced.EnhNode.as(EnhNode.java:107)
at
com.hp.hpl.jena.ontology.impl.OntResourceImpl$AsMapper.map1(OntResourceImpl.java:1657)
...
if I change "rdf:Description" to "owl:class" then it works properly, but
I don't think it's doing what I want (in that I don't think it actually
references the external class).
I think it has to do with accessing classes and properties from owl
files elsewhere on the web (note that the rdf:Description is referencing
a class in another file)
in particular, there is a uri that gives a 404 when being referenced.
It works properly when I am accessing only local classes.
I am using this code to load my file:
final OntModel jenaModel = ModelFactory.createOntologyModel(
OntModelSpec.OWL_MEM);
try {
jenaModel.read(
new FileReader(owlDocument),
null
);
so my questions are: (and please forgive the naiveté of them, I'm
super new to this!)
(1) does jena automatically download the files referenced throughout the
file?
(2) if I need to add a local file for it to reference, is there a way of
loading the main file and the one it references together in a
single read?
thanks in advance!
-thomas marsh