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


Java OWLOntology.getDeclarationAxioms方法代码示例

本文整理汇总了Java中org.semanticweb.owlapi.model.OWLOntology.getDeclarationAxioms方法的典型用法代码示例。如果您正苦于以下问题:Java OWLOntology.getDeclarationAxioms方法的具体用法?Java OWLOntology.getDeclarationAxioms怎么用?Java OWLOntology.getDeclarationAxioms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.semanticweb.owlapi.model.OWLOntology的用法示例。


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

示例1: addBioEntity

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
private void addBioEntity(OWLClass pr, OWLOntology lego, Bioentity bioentity) {
	Set<OWLDeclarationAxiom> declarationAxioms = lego.getDeclarationAxioms(pr);
	if (declarationAxioms == null || declarationAxioms.isEmpty()) {
		// add class declaration and add label
		OWLOntologyManager m = lego.getOWLOntologyManager();
		OWLDataFactory f = m.getOWLDataFactory();
		
		Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
		axioms.add(f.getOWLDeclarationAxiom(pr));
		
		String label = bioentity.getSymbol()+" - "+bioentity.getFullName();
		
		axioms.add(f.getOWLAnnotationAssertionAxiom(f.getRDFSLabel(), pr.getIRI(), f.getOWLLiteral(label)));
		
		m.addAxioms(lego, axioms);
	}
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:18,代码来源:GafToLegoTranslator.java

示例2: getDcSourceProperty

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
private OWLAnnotationProperty getDcSourceProperty(OWLOntology lego, OWLDataFactory f) {
	OWLAnnotationProperty p = f.getOWLAnnotationProperty(DC_SOURCE);
	Set<OWLDeclarationAxiom> declarationAxioms = lego.getDeclarationAxioms(p);
	if (declarationAxioms == null || declarationAxioms.isEmpty()) {
		OWLOntologyManager m = lego.getOWLOntologyManager();
		m.addAxiom(lego, f.getOWLDeclarationAxiom(p));
	}
	return p;
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:10,代码来源:GafToLegoTranslator.java

示例3: getOWLIndividual

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
/**
 * Returns an OWLNamedIndividual with this IRI <b>if it has been declared</b>
 * in the source or support ontologies. Returns null otherwise.
 * 
 * @param iri
 * @return {@link OWLNamedIndividual}
 */
public OWLNamedIndividual getOWLIndividual(IRI iri) {
	OWLNamedIndividual c = getDataFactory().getOWLNamedIndividual(iri);
	for (OWLOntology o : getAllOntologies()) {
		for (OWLDeclarationAxiom da : o.getDeclarationAxioms(c)) {
			if (da.getEntity() instanceof OWLNamedIndividual) {
				return (OWLNamedIndividual) da.getEntity();
			}
		}
	}
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:19,代码来源:OWLGraphWrapperExtended.java


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