本文整理匯總了Java中com.hp.hpl.jena.ontology.OntModelSpec.setDocumentManager方法的典型用法代碼示例。如果您正苦於以下問題:Java OntModelSpec.setDocumentManager方法的具體用法?Java OntModelSpec.setDocumentManager怎麽用?Java OntModelSpec.setDocumentManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.hp.hpl.jena.ontology.OntModelSpec
的用法示例。
在下文中一共展示了OntModelSpec.setDocumentManager方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updatePartitions
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
public void updatePartitions() {
//Use OntModelSpec.OWL_MEM_RDFS_INF to ensure all default classes and properties are also discovered.
OntModelSpec partitionModelSpec = new OntModelSpec(OntModelSpec.OWL_MEM_RDFS_INF);
partitionModelSpec.setDocumentManager(voidInstance.getVoidModel().getDocumentManager());
partitionModelSpec.getDocumentManager().setProcessImports(true);
OntModel partitionModel = ModelFactory
.createOntologyModel(partitionModelSpec);
for (OntResource vocabulary : this.getVocabularies()) {
try {
partitionModel.read(vocabulary.getURI());
} catch (Exception e) {
Log.debug(Void.class, "Failed to locate dataset vocabulary: "
+ vocabulary + " " + e.getMessage());
}
}
updateClassPartition(partitionModel);
updatePropertyPartition(partitionModel);
}
示例2: VocabularyHelper
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
VocabularyHelper(final Model model, final Module module) {
this.module=module;
final OntDocumentManager mgr = new OntDocumentManager();
mgr.setProcessImports(false);
final OntModelSpec spec=new OntModelSpec(OntModelSpec.OWL_MEM);
spec.setDocumentManager(mgr);
this.vocabulary=ModelFactory.createOntologyModel(spec,model);
}
示例3: OntologyHandler
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
public OntologyHandler() {
OntDocumentManager mgr = new OntDocumentManager();
mgr.setProcessImports(false);
OntModelSpec s = new OntModelSpec( OntModelSpec.OWL_MEM );
s.setDocumentManager( mgr );
ontModel = ModelFactory.createOntologyModel(s);
ontModel.setStrictMode(false);
}
示例4: prepareEmptyOntModel
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
private OntModel prepareEmptyOntModel(String modelFolderPathname) throws ConfigurationException {
IConfigurationManagerForIDE cm = ConfigurationManagerForIdeFactory.getConfigurationManagerForIDE(modelFolderPathname, ConfigurationManagerForIDE.getOWLFormat());
OntDocumentManager owlDocMgr = cm.getJenaDocumentMgr();
OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
setSpec(spec);
spec.setImportModelGetter(new SadlJenaModelGetterPutter(spec, modelFolderPathname));
spec.setDocumentManager(owlDocMgr);
owlDocMgr.setProcessImports(true);
return ModelFactory.createOntologyModel(spec);
}
示例5: getJenaDocumentMgr
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
public OntDocumentManager getJenaDocumentMgr(OntModelSpec ontModelSpec) {
if (jenaDocumentMgr == null) {
if (getMappingModel() != null) {
setJenaDocumentMgr(new OntDocumentManager(getMappingModel()));
if (ontModelSpec != null) {
ontModelSpec.setDocumentManager(jenaDocumentMgr);
}
} else {
setJenaDocumentMgr(OntDocumentManager.getInstance());
}
}
return jenaDocumentMgr;
}
示例6: Void
import com.hp.hpl.jena.ontology.OntModelSpec; //導入方法依賴的package包/類
/**
* Instantiates a new void.
*
* @param voidModel
* the void model
* @param voidURI
* the void uri
* @throws URISyntaxException
*/
Void(RemediatorWorkspace workspace, String voidURI, Boolean gatherStatistics) throws URISyntaxException {
this.workspace = workspace;
voidModelSpec = new OntModelSpec(OntModelSpec.OWL_MEM);
voidModelSpec.setDocumentManager(this.workspace.getDocumentManager());
voidModelSpec.getDocumentManager().setProcessImports(true);
voidModel = ModelFactory.createOntologyModel(voidModelSpec);
initializeModel(voidURI, gatherStatistics);
}