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


Java OWLObjectPropertyAssertionAxiom.getObject方法代码示例

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


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

示例1: getExpressions

import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; //导入方法依赖的package包/类
private Set<OWLObjectSomeValuesFrom> getExpressions(OWLNamedIndividual i, OWLOntology model) {
	Set<OWLObjectSomeValuesFrom> result = new HashSet<OWLObjectSomeValuesFrom>();
	Set<OWLObjectPropertyAssertionAxiom> axioms = model.getObjectPropertyAssertionAxioms(i);
	for (OWLObjectPropertyAssertionAxiom ax : axioms) {
		if (enabledBy.equals(ax.getProperty())) {
			continue;
		}
		OWLIndividual object = ax.getObject();
		if (object.isNamed()) {
			Set<OWLClass> types = getTypes(object.asOWLNamedIndividual(), model);
			for (OWLClass cls : types) {
				result.add(createSvf(ax.getProperty(), cls));
			}
		}
	}
	return result;
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:18,代码来源:LegoModelWalker.java

示例2: findProcesses

import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; //导入方法依赖的package包/类
private Map<OWLClass, Pair<OWLNamedIndividual, Set<OWLAnnotation>>> findProcesses(OWLNamedIndividual mf) {
	Map<OWLClass, Pair<OWLNamedIndividual, Set<OWLAnnotation>>> result = new HashMap<OWLClass, Pair<OWLNamedIndividual,Set<OWLAnnotation>>>();
	Set<OWLObjectPropertyAssertionAxiom> axioms = model.getObjectPropertyAssertionAxioms(mf);
	for (OWLObjectPropertyAssertionAxiom axiom : axioms) {
		if (partOf.equals(axiom.getProperty()) && mf.equals(axiom.getSubject())) {
			// relevant axiom
			OWLIndividual bpCandidate = axiom.getObject();
			if (bpCandidate.isNamed()) {
				final OWLNamedIndividual named = bpCandidate.asOWLNamedIndividual();
				Set<OWLClass> bpTypes = getTypes(named);
				for (OWLClass bpType : bpTypes) {
					if (bpSet.contains(bpType) == false) {
						continue;
					}
					result.put(bpType, Pair.of(named, getAnnotations(axiom, named)));
				}
			}
		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:22,代码来源:ModelAnnotationSolrDocumentLoader.java

示例3: findLocations

import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; //导入方法依赖的package包/类
private Map<OWLClass, Pair<OWLNamedIndividual, Set<OWLAnnotation>>> findLocations(OWLNamedIndividual mf) {
	Map<OWLClass, Pair<OWLNamedIndividual, Set<OWLAnnotation>>> result = new HashMap<OWLClass, Pair<OWLNamedIndividual,Set<OWLAnnotation>>>();
	Set<OWLObjectPropertyAssertionAxiom> axioms = model.getObjectPropertyAssertionAxioms(mf);
	for (OWLObjectPropertyAssertionAxiom axiom : axioms) {
		if (occursIn.equals(axiom.getProperty()) && mf.equals(axiom.getSubject())) {
			// relevant axiom
			OWLIndividual locationCandidate = axiom.getObject();
			if (locationCandidate.isNamed()) {
				OWLNamedIndividual named = locationCandidate.asOWLNamedIndividual();
				Set<OWLClass> locationTypes = getTypes(named);
				for (OWLClass locationType : locationTypes) {
					result.put(locationType, Pair.of(named, getAnnotations(axiom, named)));
				}
			}
		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:19,代码来源:ModelAnnotationSolrDocumentLoader.java

示例4: visit

import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; //导入方法依赖的package包/类
public Boolean visit(OWLObjectPropertyAssertionAxiom axiom) {
    OWLIndividual sub=axiom.getSubject();
    OWLIndividual obj=axiom.getObject();
    if (sub.isAnonymous()||obj.isAnonymous()) {
        anonymousIndividualAxioms.add(axiom);
        return true; // will be checked afterwards by rolling-up
    }
    return reasoner.hasObjectPropertyRelationship(sub.asOWLNamedIndividual(),axiom.getProperty(),obj.asOWLNamedIndividual());
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:10,代码来源:EntailmentChecker.java

示例5: createLegoNodes

import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; //导入方法依赖的package包/类
public List<LegoNode> createLegoNodes(Collection<OWLNamedIndividual> individuals) throws UnExpectedStructureException {
	List<LegoNode> nodes = new ArrayList<LegoNode>(individuals.size());
	Set<OWLOntology> ontologies = new HashSet<OWLOntology>(graph.getAllOntologies());
	for (OWLNamedIndividual individual : individuals) {
		Set<OWLClassAssertionAxiom> axioms = getClassAxioms(individual, ontologies);
		final LegoNode node = createNode(individual, axioms, ontologies);
		if (node != null) {
			// links
			List<LegoLink> links = new ArrayList<LegoLink>();
			Set<OWLObjectPropertyAssertionAxiom> propertyAxioms = getPropertyAxioms(individual, ontologies);
			for (OWLObjectPropertyAssertionAxiom propertyAxiom : propertyAxioms) {
				OWLIndividual object = propertyAxiom.getObject();
				if (object instanceof OWLNamedIndividual == false) {
					throw new UnExpectedStructureException("Expected a named individual for a link: "+propertyAxiom);
				}
				OWLNamedIndividual namedTarget = (OWLNamedIndividual) object;
				OWLObjectPropertyExpression property = propertyAxiom.getProperty();
				LegoLink link = new LegoLink(individual, namedTarget, property);
				LegoMetadata.extractMetadata(link, propertyAxiom);
				links.add(link);
			}
			if (!links.isEmpty()) {
				node.setLinks(links);
			}
			
			nodes.add(node);
		}
	}
	
	return nodes;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:32,代码来源:LegoTools.java


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