Examples of asOWLClass()


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

            Collection<OWLClass> result = new HashSet<OWLClass>();
            for (OWLOntology ont : getRootOntology().getImportsClosure()) {
                for (OWLSubClassOfAxiom ax : ont.getSubClassAxiomsForSubClass(child)) {
                    OWLClassExpression superCls = ax.getSuperClass();
                    if (!superCls.isAnonymous()) {
                        result.add(superCls.asOWLClass());
                    }
                    else if (superCls instanceof OWLObjectIntersectionOf) {
                        OWLObjectIntersectionOf intersectionOf = (OWLObjectIntersectionOf) superCls;
                        for (OWLClassExpression conjunct : intersectionOf.asConjunctSet()) {
                            if (!conjunct.isAnonymous()) {
View Full Code Here

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

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

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

View Full Code Here

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

  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

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

        if (set.isEmpty()) {
            return;
        }
        Frame f = null;
        if (entity instanceof OWLClass) {
            f = getTermFrame(entity.asOWLClass());
        } else if (entity instanceof OWLObjectProperty) {
            f = getTypedefFrame(entity.asOWLObjectProperty());
        } else if (entity instanceof OWLAnnotationProperty) {
            for (OWLAxiom a : set) {
                OWLAnnotationAssertionAxiom ax = (OWLAnnotationAssertionAxiom) a;
View Full Code Here

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

            if (axiom instanceof OWLDeclarationAxiom) {
                OWLDeclarationAxiom a = (OWLDeclarationAxiom)axiom;
                OWLEntity ent = a.getEntity();
                if (ent.isOWLClass()) {
                    res.add(new ConceptInclusion(
                            new NamedConcept(ent.asOWLClass().toStringID()), NamedConcept.TOP_CONCEPT));
                } else if (ent.isOWLObjectProperty()) {
                    // Do nothing for now.
                } else if (ent.isOWLDataProperty()) {
                    // Do nothing for now.
                }
View Full Code Here

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

            }
            return sb.toString();
        } else if (a instanceof OWLDeclarationAxiom) {
            OWLDeclarationAxiom da = (OWLDeclarationAxiom) a;
            OWLEntity ent = da.getEntity();
            String name = (ent.isOWLClass()) ? getLabel(ent.asOWLClass(), ont)
                    : ent.toString();
            return "init(" + name + ")";
        } else {
            return a.toString();
        }
View Full Code Here

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

            }
            return sb.toString();
        } else if (a instanceof OWLDeclarationAxiom) {
            OWLDeclarationAxiom da = (OWLDeclarationAxiom) a;
            OWLEntity ent = da.getEntity();
            String name = (ent.isOWLClass()) ? getLabel(ent.asOWLClass(), ont)
                    : ent.toString();
            return "init(" + name + ")";
        } else {
            return a.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.