1 10 package com.hp.hpl.jena.reasoner.rulesys; 11 12 import com.hp.hpl.jena.reasoner.*; 13 import com.hp.hpl.jena.rdf.model.*; 14 import com.hp.hpl.jena.vocabulary.*; 15 16 34 public class OWLFBRuleReasonerFactory implements ReasonerFactory { 35 36 37 private static ReasonerFactory theInstance = new OWLFBRuleReasonerFactory(); 38 39 40 public static final String URI = "http://jena.hpl.hp.com/2003/OWLFBRuleReasoner"; 41 42 43 protected Model capabilities; 44 45 48 public static ReasonerFactory theInstance() { 49 return theInstance; 50 } 51 52 57 public Reasoner create(Resource configuration) { 58 OWLFBRuleReasoner reasoner = new OWLFBRuleReasoner(this); 59 if (configuration != null) { 60 Boolean doLog = Util.checkBinaryPredicate(ReasonerVocabulary.PROPderivationLogging, configuration); 61 if (doLog != null) { 62 reasoner.setDerivationLogging(doLog.booleanValue()); 63 } 64 Boolean doTrace = Util.checkBinaryPredicate(ReasonerVocabulary.PROPtraceOn, configuration); 65 if (doTrace != null) { 66 reasoner.setTraceOn(doTrace.booleanValue()); 67 } 68 } 69 return reasoner; 70 } 71 72 77 public Model getCapabilities() { 78 if (capabilities == null) { 79 capabilities = ModelFactory.createDefaultModel(); 80 Resource base = capabilities.createResource(getURI()); 81 base.addProperty(ReasonerVocabulary.nameP, "OWL BRule Reasoner") 82 .addProperty(ReasonerVocabulary.descriptionP, "Experimental OWL reasoner.\n" 83 + "Can separate tbox and abox data if desired to reuse tbox caching or mix them.") 84 .addProperty(ReasonerVocabulary.supportsP, RDFS.subClassOf) 85 .addProperty(ReasonerVocabulary.supportsP, RDFS.subPropertyOf) 86 .addProperty(ReasonerVocabulary.supportsP, RDFS.member) 87 .addProperty(ReasonerVocabulary.supportsP, RDFS.range) 88 .addProperty(ReasonerVocabulary.supportsP, RDFS.domain) 89 .addProperty(ReasonerVocabulary.supportsP, ReasonerVocabulary.individualAsThingP ) 91 .addProperty(ReasonerVocabulary.supportsP, OWL.ObjectProperty ) 92 .addProperty(ReasonerVocabulary.supportsP, OWL.DatatypeProperty) 93 .addProperty(ReasonerVocabulary.supportsP, OWL.FunctionalProperty ) 94 .addProperty(ReasonerVocabulary.supportsP, OWL.SymmetricProperty ) 95 .addProperty(ReasonerVocabulary.supportsP, OWL.TransitiveProperty ) 96 .addProperty(ReasonerVocabulary.supportsP, OWL.InverseFunctionalProperty ) 97 98 .addProperty(ReasonerVocabulary.supportsP, OWL.hasValue ) 99 .addProperty(ReasonerVocabulary.supportsP, OWL.intersectionOf ) 100 .addProperty(ReasonerVocabulary.supportsP, OWL.unionOf ) .addProperty(ReasonerVocabulary.supportsP, OWL.minCardinality ) .addProperty(ReasonerVocabulary.supportsP, OWL.maxCardinality ) .addProperty(ReasonerVocabulary.supportsP, OWL.cardinality ) .addProperty(ReasonerVocabulary.supportsP, OWL.someValuesFrom) .addProperty(ReasonerVocabulary.supportsP, OWL.allValuesFrom ) .addProperty(ReasonerVocabulary.supportsP, OWL.sameAs ) 107 .addProperty(ReasonerVocabulary.supportsP, OWL.differentFrom ) 108 .addProperty(ReasonerVocabulary.supportsP, OWL.disjointWith ) 109 110 .addProperty(ReasonerVocabulary.versionP, "0.1"); 111 } 112 return capabilities; 113 } 114 115 118 public String getURI() { 119 return URI; 120 } 121 122 } 123 124 | Popular Tags |