Java 类org.semanticweb.owlapi.model.OWLRestriction 实例源码

项目:owltools    文件:OWLGraphEdge.java   
public OWLGraphEdge(OWLRestriction s, OWLObject t,
        OWLQuantifiedProperty el, OWLOntology o) {
    super();
    this.source = s;
    this.target = t;
    this.ontology = o;
    setSingleQuantifiedProperty(el);
}
项目:owltools    文件:Ancestors2Test.java   
@Test
public void testRestrictionsReturnedInClosure() throws Exception {
    OWLGraphWrapper  g =  getOntologyWrapper();
    g.config.isGraphReasonedAndRelaxed = false;
    OWLObject obj = g.getOWLObject("http://example.org#deformed_hippocampus");
    boolean ok = false;
    for (OWLGraphEdge e : g.getOutgoingEdgesClosureReflexive(obj)) {
        if (RENDER_ONTOLOGY_FLAG) {
            System.out.println(e);
        }
        if (e.getTarget() instanceof OWLRestriction)
            ok = true;
    }
    assertTrue(ok);
}
项目:owlapi-gwt    文件:OWLRestrictionImpl.java   
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    return obj instanceof OWLRestriction;
}
项目:align-api-project    文件:OWLAPI3Ontology.java   
public Set<Object> getProperties(Object cl, int local, int asserted, int named) {
    Set<Object> prop = new HashSet<Object>();
    if (asserted == OntologyFactory.ASSERTED && local == OntologyFactory.LOCAL) {
        for (Object ent : ((OWLClass) cl).getSuperClasses(getOntology())) {
            if (ent instanceof OWLRestriction)
                prop.add(((OWLRestriction) ent).getProperty());
        }
    } else {
        prop = getInheritedProperties((OWLClass) cl);
    }
    return prop;
}
项目:align-api-project    文件:OWLAPI3Ontology.java   
public void getProperties(OWLClassExpression desc, Set<Object> list, Set<Object> visited) throws OWLException {
    if (desc instanceof OWLRestriction) {
        //getProperties( (OWLRestriction)desc, list );
        list.add(((OWLRestriction) desc).getProperty());
    } else if (desc instanceof OWLClass) {
        getProperties((OWLClass) desc, list, visited);
    } else if (desc instanceof OWLNaryBooleanClassExpression) {
        for (Object d : ((OWLNaryBooleanClassExpression) desc).getOperands()) {
            getProperties((OWLClassExpression) d, list, visited);
        }
        //getProperties( (OWLNaryBooleanClassExpression)desc, list, visited );
    }
}
项目:align-api-project    文件:OWLAPI3Ontology.java   
public void getProperties(OWLRestriction rest, Set<Object> list, Set<Object> visited) throws OWLException {
    list.add((Object) rest.getProperty());
}