I am getting a performance result of around 1 minute clock time to execute
OntClass.createIndividual. Is this expected? Below is the relevant part of the
ontology and the Java code. Every line of code runs fast except the
createIndividual. Is this due to reasoning being kicked off for the first time?
I’ll see if adding a second individual is just as slow.
veh:numWheels a owl:DatatypeProperty ;
rdfs:domain veh:Vehicle ;
rdfs:range xsd:integer .
veh:Vehicle
a owl:Class ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:maxCardinality """1
"""^^xsd:nonNegativeInteger ;
owl:onProperty veh:numWheels
] .
veh:Motorcycle
a owl:Class ;
rdfs:subClassOf veh:Vehicle ;
owl:equivalentClass
[ a owl:Restriction ;
owl:hasValue "2"^^xsd:nonNegativeInteger ;
owl:onProperty veh:numWheels
] .
Here is the Java code.
Model model = getNamedModel(VEHICLE_MODEL_NAME);
OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_DL_MEM_RULE_INF);
OntModel omodel = ModelFactory.createOntologyModel(spec, model);
OntClass bikeClass = omodel.getOntClass(uriBase + "Motorcycle");
Individual myBike = bikeClass.createIndividual(uriBase + "data/myBike");
This is with latest SDB and Postgres.
Is there anything in the ontology causing the slowdown?
David Jordan
Senior Software Developer
SAS Institute Inc.
Health & Life Sciences, Research & Development
Bldg R ▪ Office 4467
600 Research Drive ▪ Cary, NC 27513
Tel: 919 531 1233 ▪ [email protected]<mailto:[email protected]>
www.sas.com<http://www.sas.com/>
SAS® … THE POWER TO KNOW®