1 10 package com.hp.hpl.jena.reasoner.rulesys; 11 12 import com.hp.hpl.jena.rdf.model.*; 13 import com.hp.hpl.jena.reasoner.*; 14 import com.hp.hpl.jena.vocabulary.ReasonerVocabulary; 15 16 24 public class GenericRuleReasonerFactory implements ReasonerFactory { 25 26 27 private static GenericRuleReasonerFactory theInstance = new GenericRuleReasonerFactory(); 28 29 30 public static final String URI = "http://jena.hpl.hp.com/2003/GenericRuleReasoner"; 31 32 33 protected Model capabilities; 34 35 38 public static GenericRuleReasonerFactory theInstance() { 39 return theInstance; 40 } 41 42 48 public Reasoner create( Resource configuration ) { 49 return new GenericRuleReasoner( this, configuration ); 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, "Generic Rule Reasoner") 62 .addProperty(ReasonerVocabulary.descriptionP, "Generic rule reasoner, configurable") 63 .addProperty(ReasonerVocabulary.versionP, "0.1"); 64 } 65 return capabilities; 66 } 67 68 71 public String getURI() { 72 return URI; 73 } 74 75 } 76 77 78 79 | Popular Tags |