/** * <p>Construct a new ontology model specification with the given specification parameters</p> * @param importsMaker The model maker, which will be used to construct stores for statements in the * imported ontologies and the base ontology. Use null to get a default (memory) model maker. * @param docMgr The document manager, or null for the default document manager. * @param rFactory The factory for the reasoner to use to infer additional triples in the model, or null for no reasoner * @param languageURI The URI of the ontology language. Required. */ public OntModelSpec( ModelMaker importsMaker, OntDocumentManager docMgr, ReasonerFactory rFactory, String languageURI ) { this( ModelFactory.createMemModelMaker(), importsMaker, docMgr, rFactory, languageURI ); }
/** Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination, with the given reification style. @param style the reification style for the model @return a ModelMaker that constructs memory-based models @deprecated Hidden partial reifications not support -- only style "Standard" */ @Deprecated public static ModelMaker createMemModelMaker( ReificationStyle style ) { return createMemModelMaker() ; }
/** * Construct a new ontology model specification from the supplied components. * @param baseModelName the name of the model in the baseModelMaker * @param baseMaker the model-maker to use for the base model * @param importsMaker the model-maker to use for imported models * @param docMgr the document manager (null for the default manager) * @param rFactory the reasoner (null for no reasoner) * @param languageURI the ontology language URI (must not be null) */ public OntModelSpec( String baseModelName, ModelMaker baseMaker, ModelMaker importsMaker, OntDocumentManager docMgr, ReasonerFactory rFactory, String languageURI ) { // super( baseMaker ); this.maker = baseMaker; m_baseModelName = baseModelName; m_importsMaker = importsMaker == null ? ModelFactory.createMemModelMaker() : importsMaker; setDocumentManager( docMgr ); setReasonerFactory( rFactory ); if (languageURI == null) { throw new IllegalArgumentException( "Cannot create OntModelSpec with a null ontology language" ); } setLanguage( languageURI ); }
public Model createRDFModel() throws IOException, DataServiceFault { InputStream in = DBUtils.getInputStreamFromPath(this.getRDFDataSourcePath()); Model model = ModelFactory.createMemModelMaker().createDefaultModel(); model.read(in,null); return model; }