Package org.semanticweb.owlapi.change
Class OWLOntologyChangeRecord
java.lang.Object
org.semanticweb.owlapi.change.OWLOntologyChangeRecord
- All Implemented Interfaces:
Serializable
Associates an
An
An
OWLOntologyID
with ontology-less change data.An
OWLOntologyChangeRecord
captures information about an OWLOntologyChange
in a
way that does not require a reference to an OWLOntology
object. It does this by
referencing an OWLOntologyID
instead of referencing an OWLOntology
. The primary
reason for doing this is so that changes can be serialized and logged more easily. It should be
kept in mind that OWLOntologyChangeRecord
objects can represent changes for which there
might be no in memory representation of a specific OWLOntology
. This is also true if an
OWLOntology
object has its OWLOntologyID
changed.An
OWLOntologyChange
object contains two important pieces of information:
- The
OWLOntologyID
that identifies the ontology that the change pertains to. - The
OWLOntologyChangeData
that describes the change specific data. For each kind ofOWLOntologyChange
there is a correspondingOWLOntologyChangeData
class which captures the essential details that pertain to the change. The reason for this separation is that it allows change information to be captured where the context of the change (the ontology) is known via some other mechanism.
OWLOntologyChangeRecord
objects are immutable.- Since:
- 3.3
- Author:
- Matthew Horridge, Stanford University, Bio-Medical Informatics Research Group
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOWLOntologyChangeRecord
(OWLOntologyID ontologyID, OWLOntologyChangeData data) Constructs anOWLOntologyChangeRecord
object which holds information about a change to a particular ontology identified by anOWLOntologyID
object and also change details specified by theOWLOntologyChangeData
object. -
Method Summary
Modifier and TypeMethodDescriptionstatic OWLOntologyChangeRecord
A convenience method that creates anOWLOntologyChangeRecord
by deriving data from anOWLOntologyChange
object.createOntologyChange
(OWLOntologyManager manager) Creates anOWLOntologyChange
from theOWLOntologyID
andOWLOntologyChangeData
associated with thisOWLOntologyChangeRecord
object.boolean
getData()
Gets theOWLOntologyChangeData
which is associated with thisOWLOntologyChangeRecord
.getName()
Gets theOWLOntologyID
that identifies the ontology associated with this change record.int
hashCode()
toString()
-
Constructor Details
-
OWLOntologyChangeRecord
Constructs anOWLOntologyChangeRecord
object which holds information about a change to a particular ontology identified by anOWLOntologyID
object and also change details specified by theOWLOntologyChangeData
object.- Parameters:
ontologyID
- TheOWLOntologyID
which identifies the ontology that the change was applied to.data
- TheOWLOntologyChangeData
that describes the particular details of the change.
-
-
Method Details
-
createFromOWLOntologyChange
A convenience method that creates anOWLOntologyChangeRecord
by deriving data from anOWLOntologyChange
object.- Parameters:
change
- TheOWLOntologyChange
object.- Returns:
- instance of
OWLOntologyChangeRecord
-
getOntologyID
Gets theOWLOntologyID
that identifies the ontology associated with this change record.- Returns:
- The
OWLOntologyID
.
-
getData
Gets theOWLOntologyChangeData
which is associated with thisOWLOntologyChangeRecord
.- Returns:
- The
OWLOntologyChangeData
.
-
createOntologyChange
Creates anOWLOntologyChange
from theOWLOntologyID
andOWLOntologyChangeData
associated with thisOWLOntologyChangeRecord
object. TheOWLOntology
that is the target of the resultingOWLOntologyChange
is derived from anOWLOntologyManager
. The manager must contain an ontology that has anOWLOntologyID
which is equal to theOWLOntologyID
associated with thisOWLOntologyChangeRecord
object.- Parameters:
manager
- The manager which will be used to obtain a reference to anOWLOntology
object having the sameOWLOntologyID
as theOWLOntologyID
associated with thisOWLOntologyChangeRecord
.- Returns:
- The
OWLOntologyChange
object that is derived from this record'sOWLOntologyID
andOWLOntologyChangeData
. The specific concrete subclass of the returnedOWLOntologyChange
will depend upon the specific concrete subclass of theOWLOntologyChangeData
associated with thisOWLOntologyChangeRecord
. - Throws:
UnknownOWLOntologyException
- if the specified manager does not contain an ontology which has anOWLOntologyID
equal to theOWLOntologyID
associated with thisOWLOntologyChangeRecord
.
-
equals
-
hashCode
public int hashCode() -
toString
-
getName
- Returns:
- a name for the object class
-