Examples of RemoveAxiom


Examples of org.semanticweb.owlapi.model.RemoveAxiom

            @Nonnull OWLNamedIndividual ind) {
        for (OWLOntology ont : ontologies) {
            assert ont != null;
            for (OWLAxiom ax : ont.getDeclarationAxioms(ind)) {
                assert ax != null;
                addChange(new RemoveAxiom(ont, ax));
            }
            for (OWLClassAssertionAxiom ax : ont.getClassAssertionAxioms(ind)) {
                assert ax != null;
                addChange(new RemoveAxiom(ont, ax));
            }
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        for (OWLOntology ont : ontologies) {
            assert ont != null;
            for (OWLDataPropertyAssertionAxiom ax : ont
                    .getDataPropertyAssertionAxioms(ind)) {
                if (!ax.getProperty().isAnonymous()) {
                    addChange(new RemoveAxiom(ont, ax));
                    addChange(new AddAxiom(ont, convertToAnnotation(ind, ax)));
                    convertedDataProperties.add((OWLDataProperty) ax
                            .getProperty());
                }
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        // We go through the current mups, axiom by axiom, and extend the tree
        // with edges for each axiom
        for (OWLAxiom axiom : mups) {
            assert axiom != null;
            // Remove the current axiom from the ontology
            owlOntologyManager.applyChange(new RemoveAxiom(ontology, axiom));
            currentPathContents.add(axiom);
            boolean earlyTermination = false;
            // Early path termination. If our path contents are the superset of
            // the contents of a path then we can terminate here.
            for (Set<OWLAxiom> satPath : satPaths) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        currentClass = setupDebuggingClass(cls);
        generateSOSAxioms();
        for (OWLAxiom ax : temporaryAxioms) {
            assert ax != null;
            owlOntologyManager
                    .applyChange(new RemoveAxiom(getOWLOntology(), ax));
        }
        debuggingAxioms.removeAll(temporaryAxioms);
        return new HashSet<>(debuggingAxioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

     */
    @Nonnull
    public List<OWLOntologyChange> repair() {
        // default fix is to drop the axiom
        if (axiom != null) {
            return list(new RemoveAxiom(ontology, getAxiom()));
        }
        return CollectionFactory.emptyList();
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

   
    System.out.println( "\nClassification time: " + t.getTotal() + "ms");
    System.out.println( "Subclasses of " + pain + ": " + classifier.getSubClasses( pain, true ).getFlattened() + "\n");

    // Remove the axiom from the ontology, which creates a change event
    OWL.manager.applyChange( new RemoveAxiom( ontologyTBox, axiom ) );

    // Now we create a third timer to keep track of the performance of the
    // third classification
    timers.startTimer( "Third classification" );
    classifier.classify();
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

  public static void removeClass(OWLOntology ontology, OWLClass theclass, Boolean andinds, OWLOntologyManager manager) {
    if (andinds) {
      for (OWLIndividual ind : theclass.getIndividuals(ontology)) {
        Set<OWLAxiom> refaxind = ind.asOWLNamedIndividual().getReferencingAxioms(ontology);
        OWLAxiom[] refaxindarray = (OWLAxiom[]) refaxind.toArray(new OWLAxiom[] {});
        for (int i = 0; i < refaxindarray.length; i++) {manager.applyChange(new RemoveAxiom(ontology,refaxindarray[i]));
        }
      }
    }

    Set<OWLAxiom> refax = theclass.getReferencingAxioms(ontology);
    OWLAxiom[] refaxarray = (OWLAxiom[]) refax.toArray(new OWLAxiom[] {});
    for (int i = 0; i < refaxarray.length; i++) {
      manager.applyChange(new RemoveAxiom(ontology, refaxarray[i]));
    }

  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        OWLNamedIndividual annind = factory.getOWLNamedIndividual(IRI.create(keys[i]));
        Set<OWLAnnotation> anns = annind.getAnnotations(ontology, label);
        for (OWLAnnotation ann : anns) {
          OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(
              (OWLAnnotationSubject) annind, ann);
          manager.applyChange(new RemoveAxiom(ontology, removeax));
        }
        String[] array = (String[]) urisandvals.get(keys[i]);
        OWLAnnotation newann = factory.getOWLAnnotation(factory
            .getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL
                .getIRI()), factory.getOWLStringLiteral(
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

    Set<OWLAnnotation> anns = annind.getAnnotations(ontology, label);
    for (OWLAnnotation ann : anns) {
      OWLAnnotationSubject annsub = annind.getIRI();
      OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(annsub,
          ann);
      manager.applyChange(new RemoveAxiom(ontology, removeax));
    }
    OWLAnnotation newann = factory.getOWLAnnotation(
        factory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL
            .getIRI()), factory.getOWLStringLiteral(value, "en"));
    OWLAxiom ax = factory.getOWLAnnotationAssertionAxiom(annind.getIRI(),
View Full Code Here

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        .getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());
    Set<OWLAnnotation> anns = ent.getAnnotations(ontology, label);
    for (OWLAnnotation ann : anns) {
      OWLAnnotationSubject annsub = ent.getIRI();
      OWLAxiom removeax = factory.getOWLAnnotationAssertionAxiom(annsub, ann);
      manager.applyChange(new RemoveAxiom(ontology, removeax));
    }
    OWLAnnotation newann = factory.getOWLAnnotation(
        factory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), factory.getOWLStringLiteral(value, "en"));
    OWLAxiom ax = factory.getOWLAnnotationAssertionAxiom(ent.getIRI(), newann);
    manager.applyChange(new AddAxiom(ontology, ax));
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.