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 25 public class DAMLMicroReasonerFactory implements ReasonerFactory { 26 27 28 private static ReasonerFactory theInstance = new DAMLMicroReasonerFactory(); 29 30 31 public static final String URI = "http://jena.hpl.hp.com/2003/DAMLMicroReasonerFactory"; 32 33 34 protected Model capabilities; 35 36 39 public static ReasonerFactory theInstance() { 40 return theInstance; 41 } 42 43 48 public Reasoner create(Resource configuration) { 49 return new DAMLMicroReasoner(this); 50 } 51 52 57 public Model getCapabilities() { 58 if (capabilities == null) { 59 capabilities = ModelFactory.createDefaultModel(); 60 Resource base = capabilities.createResource(getURI()); 61 base.addProperty(ReasonerVocabulary.nameP, "DAML micro Rule Reasoner") 62 .addProperty(ReasonerVocabulary.descriptionP, "RDFS rule set with small extensions to support DAML") 63 .addProperty(ReasonerVocabulary.supportsP, RDFS.subClassOf) 64 .addProperty(ReasonerVocabulary.supportsP, RDFS.subPropertyOf) 65 .addProperty(ReasonerVocabulary.supportsP, RDFS.member) 66 .addProperty(ReasonerVocabulary.supportsP, RDFS.range) 67 .addProperty(ReasonerVocabulary.supportsP, RDFS.domain) 68 .addProperty(ReasonerVocabulary.supportsP, DAML_OIL.subClassOf) 69 .addProperty(ReasonerVocabulary.supportsP, DAML_OIL.subPropertyOf) 70 .addProperty(ReasonerVocabulary.supportsP, DAML_OIL.range) 71 .addProperty(ReasonerVocabulary.supportsP, DAML_OIL.domain) 72 .addProperty(ReasonerVocabulary.supportsP, ReasonerVocabulary.individualAsThingP ) 73 .addProperty(ReasonerVocabulary.versionP, "0.1"); 74 } 75 return capabilities; 76 } 77 78 81 public String getURI() { 82 return URI; 83 } 84 85 } 86 87 88 | Popular Tags |