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


Java OWLOntology.getDataPropertiesInSignature方法代码示例

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


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

示例1: getOntoDataProperty

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
/**
 * Get the {@link OWLDataProperty} object corresponding to a named data
 * property (i.e. attribute in OO) of the ontology.
 * @param onto
 * @param name
 * @return
 */
public static OWLDataProperty getOntoDataProperty(OWLOntology onto,
    String name) {
  for (OWLDataProperty p : onto.getDataPropertiesInSignature())
    if (p.getIRI().getFragment().equals(name))
      return p;
  return null;
}
 
开发者ID:IGNF,项目名称:geoxygene,代码行数:15,代码来源:OwlUtil.java

示例2: getEntities

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
@Override
protected Set<OWLDataProperty> getEntities(OWLOntology ont) {
    return ont.getDataPropertiesInSignature();
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:5,代码来源:StructuralReasoner2.java

示例3: getAxioms

import org.semanticweb.owlapi.model.OWLOntology; //导入方法依赖的package包/类
/**
 * Get axioms from ontology depending on requirements
 * @param ontology
 * @param considerImportsClosure
 * @param considerEntityAnnotations
 * @param ignoreAssertions
 * @return
 */
private static Set<OWLAxiom> getAxioms(
		OWLOntology ontology,
		boolean considerImportsClosure, 
		boolean considerEntityAnnotations, 
		boolean ignoreAssertions){

	Set<OWLAxiom> axioms = new HashSet<OWLAxiom>(); 
			
	
	//axioms.addAll(ontology.getGeneralClassAxioms());
	axioms.addAll(ontology.getTBoxAxioms(considerImportsClosure));
	axioms.addAll(ontology.getRBoxAxioms(considerImportsClosure));
	if (!ignoreAssertions){
		axioms.addAll(ontology.getABoxAxioms(considerImportsClosure));
	}
	
	if (considerEntityAnnotations){
		
		for (OWLClass cls : ontology.getClassesInSignature(considerImportsClosure)){
			axioms.addAll(cls.getAnnotationAssertionAxioms(ontology));
			//axioms.addAll(ontology.getDeclarationAxioms(cls));
			
		}
		
		for (OWLObjectProperty oprop : ontology.getObjectPropertiesInSignature(considerImportsClosure)){
			axioms.addAll(oprop.getAnnotationAssertionAxioms(ontology));
			//axioms.addAll(ontology.getDeclarationAxioms(oprop));
		}
		
		for (OWLDataProperty dprop : ontology.getDataPropertiesInSignature(considerImportsClosure)){
			axioms.addAll(dprop.getAnnotationAssertionAxioms(ontology));
			//axioms.addAll(ontology.getDeclarationAxioms(dprop));
		}
		
		for (OWLAnnotationProperty aprop : ontology.getAnnotationPropertiesInSignature()){
			axioms.addAll(aprop.getAnnotationAssertionAxioms(ontology));
			//axioms.addAll(ontology.getDeclarationAxioms(aprop));
		}
		
		if (!ignoreAssertions){
			for (OWLNamedIndividual indiv : ontology.getIndividualsInSignature(considerImportsClosure)){
				axioms.addAll(indiv.getAnnotationAssertionAxioms(ontology));
				//axioms.addAll(ontology.getDeclarationAxioms(indiv));
			}
			
			//TODO In pizza.owl gives an error
			//for (OWLAnonymousIndividual aindiv : ontology.getAnonymousIndividuals()){
			//	axioms.addAll(ontology.getAnnotationAssertionAxioms(aindiv));
			//}
			
			
			
		}
	}	
	
	/*for (OWLAxiom ax : ontology.getAxioms()){
		if (!axioms.contains(ax)){
			
			System.out.println(ax);
			
		}
	}*/
		
	
	return axioms;
	
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:76,代码来源:OntologyModuleExtractor.java


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