1 10 package com.hp.hpl.jena.reasoner.transitiveReasoner; 11 12 import com.hp.hpl.jena.rdf.model.*; 13 import com.hp.hpl.jena.vocabulary.*; 14 import com.hp.hpl.jena.reasoner.*; 15 16 22 public class TransitiveReasonerFactory implements ReasonerFactory { 23 24 25 private static ReasonerFactory theInstance = new TransitiveReasonerFactory(); 26 27 28 protected Model capabilities; 29 30 31 public static final String URI = "http://jena.hpl.hp.com/2003/TransitiveReasoner"; 32 33 36 public static ReasonerFactory theInstance() { 37 return theInstance; 38 } 39 40 46 public Reasoner create(Resource configuration) { 47 return new TransitiveReasoner(); 48 } 49 50 55 public Model getCapabilities() { 56 if (capabilities == null) { 57 capabilities = ModelFactory.createDefaultModel(); 58 Resource base = capabilities.createResource(getURI()); 59 base.addProperty(ReasonerVocabulary.nameP, "Transitive Reasoner") 60 .addProperty(ReasonerVocabulary.descriptionP, "Provides reflexive-transitive closure of subClassOf and subPropertyOf") 61 .addProperty(ReasonerVocabulary.supportsP, RDFS.subClassOf) 62 .addProperty(ReasonerVocabulary.supportsP, RDFS.subPropertyOf) 63 .addProperty(ReasonerVocabulary.supportsP, ReasonerVocabulary.directSubClassOf) 64 .addProperty(ReasonerVocabulary.supportsP, ReasonerVocabulary.directSubPropertyOf) 65 .addProperty(ReasonerVocabulary.versionP, "0.1"); 66 } 67 return capabilities; 68 } 69 70 73 public String getURI() { 74 return URI; 75 } 76 77 } 78 79 108 109 | Popular Tags |