-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added a changelog on the classes, properties, and data properties. Fix an issue with OBI and refactored code. Also, added the appropriate translations and language tags in en, es, pt.
- Loading branch information
Showing
25 changed files
with
1,213 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package diff; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import org.semanticweb.owlapi.model.*; | ||
|
||
|
||
/* | ||
* Helper class to store information on a class which can be | ||
* used to store information about difference between two classes | ||
* newClassAxiomsSet holds axioms that have been added to this class | ||
* and deletedClassAxiomsSet holds axioms that have been removed compared with | ||
* the same class in another ontology | ||
*/ | ||
|
||
/** | ||
* @author Daniel Garijo | ||
* This class has been modified by Daniel Garijo to make the axioms more general | ||
* and capture changes in labels and comments or definitions (annotation properties) | ||
* @author dgarijo | ||
*/ | ||
|
||
|
||
public class OWLAxiomInfo { | ||
|
||
private final IRI classIRI; | ||
private Set<OWLAxiom> newAxiomSet; | ||
private Set<OWLAxiom> deletedAxiomSet; | ||
|
||
|
||
|
||
|
||
//constructor | ||
public OWLAxiomInfo(IRI classIRI, Set<OWLAxiom> newClassAxiomsSet, | ||
Set<OWLAxiom> deletedClassAxiomsSet) { | ||
this.classIRI = classIRI; | ||
this.newAxiomSet = newClassAxiomsSet; | ||
this.deletedAxiomSet = deletedClassAxiomsSet; | ||
} | ||
|
||
|
||
|
||
|
||
public IRI getIRI(){ | ||
return classIRI; | ||
} | ||
|
||
|
||
//get method to return the new class axioms as Axioms | ||
public Set<OWLAxiom> getNewAxioms(){ | ||
return newAxiomSet; | ||
} | ||
|
||
/** | ||
* Method to merge two collection of axioms to the new Changes Set | ||
* @param newAxioms | ||
*/ | ||
public void addNewChangeAxioms(Set<OWLAxiom> newAxioms){ | ||
if(this.newAxiomSet==null){ | ||
this.newAxiomSet = new HashSet<OWLAxiom>(); | ||
} | ||
if(newAxioms!= null && !newAxioms.isEmpty()){ | ||
this.newAxiomSet.addAll(newAxioms); | ||
} | ||
|
||
} | ||
|
||
/** | ||
* Method to merge two collection of axioms to the deletions Set | ||
* @param deleteAxioms | ||
*/ | ||
public void addDeleteChangeAxioms(Set<OWLAxiom> deleteAxioms){ | ||
if(this.deletedAxiomSet==null){ | ||
this.deletedAxiomSet = new HashSet<OWLAxiom>(); | ||
} | ||
if(deleteAxioms !=null && !deleteAxioms.isEmpty()){ | ||
this.deletedAxiomSet.addAll(deleteAxioms); | ||
} | ||
} | ||
|
||
//get method to return the deleted class axioms as Axioms | ||
public Set<OWLAxiom> getDeletedAxioms(){ | ||
return deletedAxiomSet; | ||
} | ||
|
||
|
||
public String getIRIAsString(){ | ||
return this.classIRI.toString(); | ||
} | ||
|
||
|
||
|
||
public boolean isEmpty(){ | ||
return!((this.newAxiomSet!=null && !this.newAxiomSet.isEmpty())|| | ||
(this.deletedAxiomSet!=null && !this.deletedAxiomSet.isEmpty())); | ||
} | ||
|
||
|
||
|
||
} |
Oops, something went wrong.