当前位置: 首页>>代码示例>>Java>>正文


Java IRIDocumentSource类代码示例

本文整理汇总了Java中org.semanticweb.owlapi.io.IRIDocumentSource的典型用法代码示例。如果您正苦于以下问题:Java IRIDocumentSource类的具体用法?Java IRIDocumentSource怎么用?Java IRIDocumentSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IRIDocumentSource类属于org.semanticweb.owlapi.io包,在下文中一共展示了IRIDocumentSource类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.semanticweb.owlapi.io.IRIDocumentSource; //导入依赖的package包/类
/**
 * Main
 * @param args	Arguments
 */
public static void main(String[] args) {
	String entailment = args[0];
	String justification = args[1];
	OWLOntologyManager man = OWLManager.createOWLOntologyManager();
	OWLOntology ent = null, just = null;
	try {
		ent = man.loadOntologyFromOntologyDocument(new IRIDocumentSource(IRI.create("file:" + entailment)));
		just = man.loadOntologyFromOntologyDocument(new IRIDocumentSource(IRI.create("file:" + justification)));
	} catch (OWLOntologyCreationException e) {
		e.printStackTrace();
	}
	if(ent != null && just != null) {
		LaconicJustificationFinder finder = new LaconicJustificationFinder(ent, just);
		String out = finder.getLaconicJustificationAsString();
		System.out.println(out);
	}
}
 
开发者ID:rsgoncalves,项目名称:ecco,代码行数:22,代码来源:LaconicJustificationFinder.java

示例2: loadOntology

import org.semanticweb.owlapi.io.IRIDocumentSource; //导入依赖的package包/类
/**
 * Load ontology from a file path
 * @param ontNr	Ontology number
 * @param filepath	Ontology file path
 * @param localFile	true if local file, false otherwise
 * @return Loaded ontology
 */
public OWLOntology loadOntology(int ontNr, String filepath, boolean localFile) {
	String filename = filepath.substring(filepath.lastIndexOf(File.separator)+1, filepath.length());
	System.out.println("Input " + ontNr + ": " + filename + " (" + filepath + ")");
	if(filepath.contains("\\")) filepath = filepath.replace("\\", "/");
	
	// Load ontology
	OWLOntology ont = null;
	try {
		if(localFile) ont = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new IRIDocumentSource(IRI.create("file:///" + filepath)), config);
		else ont = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new IRIDocumentSource(IRI.create(filepath)), config);
	} catch (OWLOntologyCreationException e) {
		e.printStackTrace();
	}
	return ont;
}
 
开发者ID:rsgoncalves,项目名称:ecco,代码行数:23,代码来源:EccoRunner.java

示例3: loadOntology

import org.semanticweb.owlapi.io.IRIDocumentSource; //导入依赖的package包/类
/**
 * Loads new ontology into the manager.
 * 
 * @param iri
 *            {@link IRI} of the service ontology to load.
 * @return loaded ontology representation.
 * @throws OWLOntologyCreationException
 *             should any problem with ontology loading occur.
 */
public OWLOntology loadOntology(IRI iri)
        throws OWLOntologyCreationException {
    logger.debug("Extracting information out of descriptor " + iri);
    //      OWLOntologyIRIMapperImpl mapper = new OWLOntologyIRIMapperImpl();
    //      mapper.addMapping(IRI.create("http://cds.synat.pcss.pl/jpgbmp/Service.owl"), iri);
    //      MANAGER.addIRIMapper(mapper);
    //return MANAGER.loadOntologyFromOntologyDocument(iri);
    return MANAGER.loadOntologyFromOntologyDocument(new IRIDocumentSource(iri));
}
 
开发者ID:psnc-dl,项目名称:darceo,代码行数:19,代码来源:OntologyManager.java

示例4: testSyntaxErrorModel

import org.semanticweb.owlapi.io.IRIDocumentSource; //导入依赖的package包/类
@Test(expected=UnparsableOntologyException.class)
public void testSyntaxErrorModel() throws Exception {
	OWLOntologyManager m = OWLManager.createOWLOntologyManager();
	final IRI modelFile = IRI.create(new File("src/test/resources/syntax-error/5667fdd400000802").getAbsoluteFile());
	CoreMolecularModelManager.loadOntologyDocumentSource(new IRIDocumentSource(modelFile), false, m);
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:7,代码来源:CoreMolecularModelManagerTest.java


注:本文中的org.semanticweb.owlapi.io.IRIDocumentSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。