Class TBoxUpdater
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.ontology.update.TBoxUpdater
-
public class TBoxUpdater extends Object
Performs knowledge base updates to the tbox to align with a new ontology version
-
-
Constructor Summary
Constructors Constructor Description TBoxUpdater(UpdateSettings settings, ChangeLogger logger, ChangeRecord record)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmodifyPropertyQualifications()Update application ontology data for domain and range-qualified properties to use any applicable settings from obsolete subpropertiesvoidremoveObsoleteAnnotations()voidrenameProperty(AtomicOntologyChange changeObj)voidupdateAnnotationModel()Update a knowledge base to align with changes to the vitro annotation model in a new version of the ontology.voidupdateDefaultAnnotationValues()voidupdateDefaultAnnotationValues(String subjectURI)Update a knowledge base to align with changes to vitro annotation property default values in a new version of the ontology.booleanusesGroup(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource theClassGroup)
-
-
-
Constructor Detail
-
TBoxUpdater
public TBoxUpdater(UpdateSettings settings, ChangeLogger logger, ChangeRecord record)
Constructor- Parameters:
settings- - update settingslogger- - for writing to the change log and the error log.record- - for writing to the additions model and the retractions model.
-
-
Method Detail
-
modifyPropertyQualifications
public void modifyPropertyQualifications() throws IOExceptionUpdate application ontology data for domain and range-qualified properties to use any applicable settings from obsolete subproperties- Throws:
IOException
-
updateDefaultAnnotationValues
public void updateDefaultAnnotationValues() throws IOException- Throws:
IOException
-
updateDefaultAnnotationValues
public void updateDefaultAnnotationValues(String subjectURI) throws IOException
Update a knowledge base to align with changes to vitro annotation property default values in a new version of the ontology. The two versions of the ontology and the knowledge base to be updated are provided in the class constructor and are referenced via class level variables. If the default value (i.e. the value that is provided in the vivo-core annotations files) of a vitro annotation property has been changed for a vivo core class, and that default value has not been changed in the site knowledge base, then update the value in the site knowledge base to be the new default. Also, if a new vitro annotation property setting (i.e. either an existing setting applied to an existing class where it wasn't applied before, or an existing setting applied to a new class) has been applied to a vivo core class then copy that new property statement into the site model. If a property setting for a class exists in the old ontology but not in the new one, then that statement will be removed from the site knowledge base. Writes to the change log file, the error log file, and the incremental change knowledge base. Note: as specified, this method for now assumes that no new vitro annotation properties have been introduced. This should be updated for future versions.- Throws:
IOException
-
updateAnnotationModel
public void updateAnnotationModel() throws IOExceptionUpdate a knowledge base to align with changes to the vitro annotation model in a new version of the ontology. The two versions of the ontology and the knowledge base to be updated are provided in the class constructor and are referenced via class level variables. Currently, this method only handles deletions of a ClassGroup Writes to the change log file, the error log file, and the incremental change knowledge base.- Throws:
IOException
-
usesGroup
public boolean usesGroup(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource theClassGroup) throws IOException- Throws:
IOException
-
removeObsoleteAnnotations
public void removeObsoleteAnnotations() throws IOException- Throws:
IOException
-
renameProperty
public void renameProperty(AtomicOntologyChange changeObj) throws IOException
- Throws:
IOException
-
-