Package org.semanticweb.owlapi.util

Examples of org.semanticweb.owlapi.util.OWLEntityRemover.reset()


        man.applyChanges(remover.getChanges());
        // System.out.println("Number of individuals: "
        // + ont.getIndividualsInSignature().size());
        // At this point, if we wanted to reuse the entity remover, we would
        // have to reset it
        remover.reset();
    }

    /**
     * An example which shows how to create restrictions and add them as
     * superclasses of a class (i.e. "adding restrictions to classes")
View Full Code Here


  public void delete() {
    if(obj instanceof OWLEntity){
      OWLEntityRemover remover = getOWLEntityRemover();
      ((OWLEntity)obj).accept(remover);
      getOWLOntologyManager().applyChanges(remover.getChanges());
          remover.reset();
    }
  }

  public void setName(String name) {
    if(obj instanceof OWLEntity){
View Full Code Here

  public void delete() {
    if(obj instanceof OWLEntity){
      OWLEntityRemover remover = getOWLEntityRemover();
      ((OWLEntity)obj).accept(remover);
      getOWLOntologyManager().applyChanges(remover.getChanges());
          remover.reset();
    }
  }

  public void setName(String name) {
    if(obj instanceof OWLEntity){
View Full Code Here

        OWLNamedIndividual ontoind = factory.getOWLNamedIndividual(recipe.getRecipeID());

        // Remove the recipe
        ontoind.accept(remover);
        mng.applyChanges(remover.getChanges());
        remover.reset();

        // Check if the recipe ahs been removed
        if (owlmodel.containsIndividualInSignature(recipe.getRecipeID())) return false;
        else return true;
View Full Code Here

        OWLNamedIndividual ontoind = factory.getOWLNamedIndividual(IRI.create((ruleNS + rule.getRuleName())));

        // Remove the rule
        ontoind.accept(remover);
        mng.applyChanges(remover.getChanges());
        remover.reset();

        // Check if the recipe ahs been removed
        if (owlmodel.containsIndividualInSignature(IRI.create((ruleNS + rule.getRuleName())))) return false;
        else return true;
View Full Code Here

                        }
                    } 
                }
            }

            remover.reset();

            return(ruleusage);
        }else{
           log.error("The rule with name "+ruleName+" is not inside the ontology. Pleas check the name.");
           return(null);
View Full Code Here

            }

            if(usage.isEmpty()){
                        ok = true;
                        owlmanager.applyChanges(remover.getChanges());
                        remover.reset();
                    }else{
                         LoggerFactory.getLogger(RemoveRule.class).error("The rule cannot be deleted because is used by some recipes. Pleas check the following recipes:\n"+usage.toString());
                         ok = false;
                         return(ok);
                 }
View Full Code Here

            }

            if(usage.isEmpty()){
                        ok = true;
                        owlmanager.applyChanges(remover.getChanges());
                        remover.reset();
                    }else{
                         LoggerFactory.getLogger(RemoveRule.class).error("The rule cannot be deleted because is used by some recipes. Pleas check the following recipes:\n"+usage.toString());
                         ok = false;
                         return(ok);
                 }
View Full Code Here

       if(owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))){

            ontoind.accept(remover);
            owlmanager.applyChanges(remover.getChanges());
            remover.reset();

           if(owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))){
               log.error("Some error occurs during deletion.");
               ok = false;
               return(ok);
View Full Code Here

  
       if(owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))){

            ontoind.accept(remover);
            owlmanager.applyChanges(remover.getChanges());
            remover.reset();

           if(owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))){
               log.error("Some error occurs during deletion.");
               ok = false;
               return(ok);
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.