1 10 package com.hp.hpl.jena.reasoner.rulesys.impl.oldCode; 11 12 import com.hp.hpl.jena.reasoner.*; 13 import com.hp.hpl.jena.reasoner.rulesys.Util; 14 import com.hp.hpl.jena.rdf.model.*; 15 import com.hp.hpl.jena.vocabulary.*; 16 17 37 public class OWLExptRuleReasonerFactory implements ReasonerFactory { 38 39 40 private static ReasonerFactory theInstance = new OWLExptRuleReasonerFactory(); 41 42 43 public static final String URI = "http://jena.hpl.hp.com/2003/OWLExptRuleReasoner"; 44 45 46 protected Model capabilities; 47 48 51 public static ReasonerFactory theInstance() { 52 return theInstance; 53 } 54 55 60 public Reasoner create(Resource configuration) { 61 OWLExptRuleReasoner reasoner = new OWLExptRuleReasoner(this); 62 if (configuration != null) { 63 Boolean doLog = Util.checkBinaryPredicate(ReasonerVocabulary.PROPderivationLogging, configuration); 64 if (doLog != null) { 65 reasoner.setDerivationLogging(doLog.booleanValue()); 66 } 67 Boolean doTrace = Util.checkBinaryPredicate(ReasonerVocabulary.PROPtraceOn, configuration); 68 if (doTrace != null) { 69 reasoner.setTraceOn(doTrace.booleanValue()); 70 } 71 } 72 return reasoner; 73 } 74 75 80 public Model getCapabilities() { 81 if (capabilities == null) { 82 capabilities = ModelFactory.createDefaultModel(); 83 Resource base = capabilities.createResource(getURI()); 84 base.addProperty(ReasonerVocabulary.nameP, "OWL BRule Reasoner") 85 .addProperty(ReasonerVocabulary.descriptionP, "Experimental OWL reasoner.\n" 86 + "Can separate tbox and abox data if desired to reuse tbox caching or mix them.") 87 .addProperty(ReasonerVocabulary.supportsP, RDFS.subClassOf) 88 .addProperty(ReasonerVocabulary.supportsP, RDFS.subPropertyOf) 89 .addProperty(ReasonerVocabulary.supportsP, RDFS.member) 90 .addProperty(ReasonerVocabulary.supportsP, RDFS.range) 91 .addProperty(ReasonerVocabulary.supportsP, RDFS.domain) 92 .addProperty(ReasonerVocabulary.supportsP, ReasonerVocabulary.individualAsThingP ) 94 .addProperty(ReasonerVocabulary.versionP, "0.1"); 95 } 96 return capabilities; 97 } 98 99 102 public String getURI() { 103 return URI; 104 } 105 106 } 107 108 109 | Popular Tags |