Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLClassExpression.asOWLClass()


        public OWLClassExpression visit(OWLObjectUnionOf desc) {
            Set<OWLClassExpression> descs = new HashSet<OWLClassExpression>();
            for (OWLClassExpression op : desc.getOperands()) {
//                if(!op.isClassExpressionLiteral()) {
                OWLClassExpression flatOp = op.accept(this);
                if (flatOp.isAnonymous() || signature.contains(flatOp.asOWLClass())) {
                    OWLClass name = createNewName();
                    descs.add(name);
                    axioms.add(ldf.getOWLSubClassOfAxiom(name, flatOp));
                } else {
                    descs.add(flatOp);
View Full Code Here


                source = axiom.getSubClass().asOWLClass();
            }
            if (!axiom.getSuperClass().isOWLNothing()) {
                OWLClassExpression classExpression = axiom.getSuperClass();
                if (!classExpression.isAnonymous()) {
                    target = classExpression.asOWLClass();
                }
            }
        }

View Full Code Here

  private static Map<OWLClass, Integer> countIndividuals(OWLOntology ontology) {
    Map<OWLClass, Integer> individualCount = new HashMap<OWLClass, Integer>();
    for (OWLClassAssertionAxiom axiom : ontology.getAxioms(AxiomType.CLASS_ASSERTION)) {
      OWLClassExpression desc = axiom.getClassExpression();
      if (!desc.isAnonymous()) {
        OWLClass assertedClass = desc.asOWLClass();
        Integer oldCount = individualCount.get(assertedClass);
        if (oldCount == null) {
          oldCount = 0;
        }
        individualCount.put(assertedClass, oldCount + 1);
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.