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


Java OWLXMLRenderer类代码示例

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


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

示例1: main

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * This is the entry point to execute the ontology filter.
 * 
 * @param args
 *            arguments
 * @throws IOException
 *             if something went wrong with I/O
 * @throws OWLException
 *             if something went wrong when using the OWL API
 */
public static void main(String[] args) throws IOException, OWLException {
	Objects.requireNonNull(args);
	if (args.length == 3) {
		String minuendFileName = args[0];
		String subtrahendFileName = args[1];
		String outputFileName = args[2];
		OntologyFilter instance = new OntologyFilter();
		OWLOntology subtrahendOntology = readOntology(subtrahendFileName);
		instance.filter(minuendFileName, outputFileName, new SubtractionFilter(subtrahendOntology.getAxioms()),
				new OWLXMLRenderer());

	} else {
		System.out.println(HELP);

	}
}
 
开发者ID:julianmendez,项目名称:born,代码行数:27,代码来源:OntologySubtractor.java

示例2: main

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * This is the entry point to execute the cycle remover.
 * 
 * @param args
 *            arguments
 * @throws IOException
 *             if something went wrong with I/O
 * @throws OWLException
 *             if something went wrong with the OWL API
 */
public static void main(String[] args) throws IOException, OWLException {
	Objects.requireNonNull(args);
	if (args.length == 2) {
		String ontologyFileName = args[0];
		String outputFileName = args[1];
		CycleRemover instance = new CycleRemover();
		instance.removeCycle(ontologyFileName, outputFileName, new OWLXMLRenderer());

	} else {
		System.out.println(HELP);

	}
}
 
开发者ID:julianmendez,项目名称:born,代码行数:24,代码来源:CycleRemover.java

示例3: main

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * This is the entry point to execute the module extractor.
 * 
 * @param args
 *            arguments
 * @throws IOException
 *             if something went wrong with I/O
 * @throws OWLException
 *             if something went wrong when using the OWL API
 */
public static void main(String[] args) throws IOException, OWLException {
	Objects.requireNonNull(args);
	if (args.length == 3) {
		boolean storingModuleMode = false;
		int repetitions = 1;
		try {
			repetitions = Integer.parseInt(args[1]);
		} catch (NumberFormatException e) {
			storingModuleMode = true;
		}
		String ontologyFileName = args[0];
		String outputFileName = args[2];
		BornModuleExtractor instance = new BornModuleExtractor();

		if (storingModuleMode) {
			String signatureFileName = args[1];
			instance.extractModule(ontologyFileName, signatureFileName, outputFileName, new OWLXMLRenderer());
		} else {
			instance.countRandom(ontologyFileName, repetitions, outputFileName);
		}

	} else {
		System.out.println(HELP);

	}
}
 
开发者ID:julianmendez,项目名称:born,代码行数:37,代码来源:BornModuleExtractor.java

示例4: main

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * This is the entry point to execute the ontology filter.
 * 
 * @param args
 *            arguments
 * @throws IOException
 *             if something went wrong with I/O
 * @throws OWLException
 *             if something went wrong when using the OWL API
 */
public static void main(String[] args) throws IOException, OWLException {
	Objects.requireNonNull(args);
	if (args.length == 2) {
		String ontologyFileName = args[0];
		String outputFileName = args[1];
		OntologyFilter instance = new OntologyFilter();
		instance.filter(ontologyFileName, outputFileName, new ElAxiomFilter(), new OWLXMLRenderer());

	} else {
		System.out.println(HELP);

	}
}
 
开发者ID:julianmendez,项目名称:born,代码行数:24,代码来源:OntologyFilter.java

示例5: storeOWLOntology

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
void storeOWLOntology(OWLOntology ontology, OutputStream ontologyOutputStream)
		throws IOException, OWLRendererException {
	Objects.requireNonNull(ontology);
	Objects.requireNonNull(ontologyOutputStream);
	AbstractOWLRenderer renderer = new OWLXMLRenderer();
	renderer.render(ontology, ontologyOutputStream);
	ontologyOutputStream.flush();
}
 
开发者ID:julianmendez,项目名称:born,代码行数:9,代码来源:AnnotatorCore.java

示例6: renderOWL

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * Render the given ontology as a string in OWL XML format.
 * 
 * @param owlOntology
 *            the input ontology
 * @return the OWL XML representation of the input ontology
 * @throws OWLRendererException
 *             if an error occurred during rendering
 */
private static String renderOWL(OWLOntology owlOntology) throws OWLRendererException {
	PrintWriter writer = new PrintWriter(new StringWriter());
	OWLXMLRenderer renderer = new OWLXMLRenderer();
	renderer.render(owlOntology, writer);
	writer.flush();
	return writer.toString();
}
 
开发者ID:julianmendez,项目名称:uel,代码行数:17,代码来源:OWLUtils.java

示例7: storeOWLOntology

import org.semanticweb.owlapi.owlxml.renderer.OWLXMLRenderer; //导入依赖的package包/类
/**
 * Stores an ontology
 * 
 * @param ontology
 *            ontology
 * @param ontologyOutputStream
 *            output stream to store the ontology
 * @throws IOException
 *             if something went wrong with the I/O
 * @throws OWLRendererException
 *             if the ontology could not be rendered
 */
void storeOWLOntology(OWLOntology ontology, OutputStream ontologyOutputStream)
		throws IOException, OWLRendererException {
	Objects.requireNonNull(ontology);
	Objects.requireNonNull(ontologyOutputStream);
	AbstractOWLRenderer renderer = new OWLXMLRenderer();
	renderer.render(ontology, ontologyOutputStream);
	ontologyOutputStream.flush();
}
 
开发者ID:julianmendez,项目名称:born,代码行数:21,代码来源:SplitterCore.java


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