/** * <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 ); }
/** * <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 ); }
/** * 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 ); }
/** * 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 ); }
/** * create a memory based model with extended prefixes and initialises it * with statements parsed from a string. * * does all insertions in a transaction. * * @param facts * @return Model */ public static Model memModel(String facts) { Model model = ModelFactory.createMemModelMaker().createFreshModel(); model.setNsPrefixes(PrefixMapping.Extended); txnBegin(model); modelAdd(model, facts); txnCommit(model); return model; }
/** * create a memory based model with extended prefixes and initialises it * with statements parsed from a string. * * does all insertions in a transaction. * * @param facts * @return Model */ public static Model memModel(String facts) { Model model = ModelFactory.createMemModelMaker().createFreshModel(); model.setNsPrefixes(PrefixMapping.Extended); txnBegin(model); modelAdd(model, facts); txnCommit(model); return model; }