本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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());
}
示例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;
}