Examples of asOWLObjectProperty()


Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

        Role[] lhss = new Role[size];
        for (int i = 0; i < size; i++) {
            lhss[i] = new NamedRole(sub.get(i).asOWLObjectProperty().toStringID());
        }

        Role rhs = new NamedRole(sup.asOWLObjectProperty().toStringID());

        if (lhss.length == 1 || lhss.length == 2) {
            return new RoleInclusion(lhss, rhs);
        } else {
            problems.add("Unable to import axiom "+a.toString()+". RoleChains longer than 2 not supported.");
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

    private Axiom transformOWLSubObjectPropertyOfAxiom(OWLSubObjectPropertyOfAxiom a) {
        OWLObjectPropertyExpression sub = a.getSubProperty();
        OWLObjectPropertyExpression sup = a.getSuperProperty();

        Role lhs = new NamedRole(sub.asOWLObjectProperty().toStringID());
        Role rhs = new NamedRole(sup.asOWLObjectProperty().toStringID());

        return new RoleInclusion(new Role[]{lhs}, rhs);
    }

    private Axiom transformOWLReflexiveObjectPropertyAxiom(OWLReflexiveObjectPropertyAxiom a) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

        return new RoleInclusion(new Role[]{lhs}, rhs);
    }

    private Axiom transformOWLReflexiveObjectPropertyAxiom(OWLReflexiveObjectPropertyAxiom a) {
        OWLObjectPropertyExpression exp = a.getProperty();
        return new RoleInclusion(new Role[] {}, new NamedRole(exp.asOWLObjectProperty().toStringID()));
    }

    private Axiom transformOWLTransitiveObjectPropertyAxiom(OWLTransitiveObjectPropertyAxiom a) {
        OWLObjectPropertyExpression exp = a.getProperty();
        Role r = new NamedRole(exp.asOWLObjectProperty().toStringID());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

        return new RoleInclusion(new Role[] {}, new NamedRole(exp.asOWLObjectProperty().toStringID()));
    }

    private Axiom transformOWLTransitiveObjectPropertyAxiom(OWLTransitiveObjectPropertyAxiom a) {
        OWLObjectPropertyExpression exp = a.getProperty();
        Role r = new NamedRole(exp.asOWLObjectProperty().toStringID());
        return new RoleInclusion(new Role[] { r, r }, r);
    }

    private Axiom transformOWLSubClassOfAxiom(OWLSubClassOfAxiom a) {
        OWLClassExpression sub = a.getSubClass();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

            OWLObjectPropertyExpression sub = ax.getSubProperty();
            OWLObjectPropertyExpression sup = ax.getSuperProperty();

            axioms.add(
                    new RoleInclusion(new NamedRole(sub.asOWLObjectProperty().toStringID()),
                    new NamedRole(sup.asOWLObjectProperty().toStringID()))
            );
        }
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

                    }
                }
                // Inverse of pe
                if (axiom.getObject().equals(ind) && !axiom.getSubject().isAnonymous()) {
                    OWLObjectPropertyExpression invPe = axiom.getProperty().getInverseProperty().getSimplified();
                    if (!invPe.isAnonymous() && inverses.contains(invPe.asOWLObjectProperty())) {
                        if (getIndividualNodeSetPolicy().equals(IndividualNodeSetPolicy.BY_SAME_AS)) {
                            result.addNode(getSameIndividuals(axiom.getObject().asOWLNamedIndividual()));
                        }
                        else {
                            result.addNode(new OWLNamedIndividualNode(axiom.getObject().asOWLNamedIndividual()));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

        OWLObjectPropertyExpression simp = getSimplified();
        if (simp.isAnonymous()) {
            return ((OWLObjectInverseOf) simp).getInverse().asOWLObjectProperty();
        }
        else {
            return simp.asOWLObjectProperty();
        }
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

            return sb.toString();
        } else if (ce instanceof OWLObjectSomeValuesFrom) {
            OWLObjectSomeValuesFrom osv = (OWLObjectSomeValuesFrom) ce;
            OWLObjectPropertyExpression ope = osv.getProperty();
            String role = (!ope.isAnonymous()) ? getLabel(
                    ope.asOWLObjectProperty(), ont) : ope.toString();
            return "\u2203" + role + ".("
                    + formatClassExpression(osv.getFiller(), ont) + ")";
        } else {
            return ce.toString();
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyExpression.asOWLObjectProperty()

            return sb.toString();
        } else if (ce instanceof OWLObjectSomeValuesFrom) {
            OWLObjectSomeValuesFrom osv = (OWLObjectSomeValuesFrom) ce;
            OWLObjectPropertyExpression ope = osv.getProperty();
            String role = (!ope.isAnonymous()) ? getLabel(
                    ope.asOWLObjectProperty(), ont) : ope.toString();
            return "\u2203" + role + ".("
                    + formatClassExpression(osv.getFiller(), ont) + ")";
        } else {
            return ce.toString();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.