Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.RemoveAxiom


        throw new IllegalArgumentException( "There are no ontologies defined that could have contained the removed axiom" );
      }
     
      ontology = ontologies.iterator().next();
     
      changes.add( new RemoveAxiom( ontology, axiom ) );
    }

    return changes;
  }
View Full Code Here


  protected boolean processAdd(OWLAxiom axiom) {
    return processChange( new AddAxiom( ontology, axiom ) );
  }
 
  protected boolean processRemove(OWLAxiom axiom) {
    return processChange( new RemoveAxiom( ontology, axiom ) )
  }
View Full Code Here

    if (!ALL_AXIOMS.containsAll(m_AxiomsToRemove))
      return false;
   
    for (OWLAxiom axiom : m_AxiomsToRemove) {
      RemoveAxiom remove = new RemoveAxiom(ontology, axiom);
      manager.applyChange(remove);
    }
   
    for (OWLAxiom axiom : m_AxiomsToAdd) {
      if (!ALL_AXIOMS.contains(axiom)) {
View Full Code Here

      Collection<? extends OWLAxiom> axioms, boolean add) {
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    for( OWLAxiom axiom : axioms ) {
      OWLOntologyChange change = add
        ? new AddAxiom( ontology, axiom )
        : new RemoveAxiom( ontology, axiom );
      changes.add( change );
    }

    return changes;
  }
View Full Code Here

  public static void updateOntology(OWLOntology ontology, Collection<? extends OWLAxiom> axioms, boolean add) {
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    for( OWLAxiom axiom : axioms ) {
      OWLOntologyChange change = add
        ? new AddAxiom( ontology, axiom )
        : new RemoveAxiom( ontology, axiom );
      changes.add( change );
    }
    manager.applyChanges( changes );
  }
View Full Code Here

    for( OWLOntology ont : ontologies ) {
      if( ont.getAxioms().contains( axiom ) ) {
        modifiedOnts.add( ont );

        manager.applyChange( new RemoveAxiom( ont, axiom ) );
      }
    }

    return modifiedOnts;
  }
View Full Code Here

      referencedEntities.addAll( ontology.getIndividualsInSignature() );

      List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
      for( OWLAxiom axiom : ontology.getAxioms() ) {
        if( !axiom.isLogicalAxiom() ) {
          changes.add( new RemoveAxiom( ontology, axiom ) );
        }
      }

      manager.applyChanges( changes );
View Full Code Here

      modular.classify();

      List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      // at this point there should be a change to the ontology that is not applied yet to the classifier
      // this should cause the save operation to fail
View Full Code Here

      // first remove a random axiom
      List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      // classify (i.e., update)
      modular.classify();   
View Full Code Here

      // first remove a random axiom
      List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      // add the axiom back but do not classify   
      for( OWLAxiom axiomToAdd : axiomsToRemove ) {
        OWL.manager.applyChange( new AddAxiom(ontology, axiomToAdd ) );
      }

      // remove another random axiom
      List<OWLAxiom> axiomsToRemove2 = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );

      for( OWLAxiom axiomToRemove : axiomsToRemove2 ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      // classify (i.e., update)
      modular.classify();
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.RemoveAxiom

Copyright © 2018 www.massapicom. 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.