當前位置: 首頁>>代碼示例>>Java>>正文


Java OntModelSpec.setDocumentManager方法代碼示例

本文整理匯總了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);
}
 
開發者ID:peterjohnlawrence,項目名稱:com.inova8.remediator,代碼行數:21,代碼來源:Dataset.java

示例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);
}
 
開發者ID:SmartDeveloperHub,項目名稱:sdh-vocabulary,代碼行數:9,代碼來源:VocabularyHelper.java

示例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);
}
 
開發者ID:therelaxist,項目名稱:spring-usc,代碼行數:10,代碼來源:OntologyHandler.java

示例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);
}
 
開發者ID:crapo,項目名稱:sadlos2,代碼行數:11,代碼來源:OwlToSadl.java

示例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;
}
 
開發者ID:crapo,項目名稱:sadlos2,代碼行數:14,代碼來源:JenaBasedSadlModelProcessor.java

示例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);
}
 
開發者ID:peterjohnlawrence,項目名稱:com.inova8.remediator,代碼行數:18,代碼來源:Void.java


注:本文中的com.hp.hpl.jena.ontology.OntModelSpec.setDocumentManager方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。