Serializable
public class OWLOntologyChangeRecord extends Object implements Serializable
OWLOntologyID
with ontology-less change data.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.OWLOntologyChange
object contains two important pieces of
information:
OWLOntologyID
that identifies the ontology that the change
pertains to.OWLOntologyChangeData
that describes the change specific
data. For each kind of OWLOntologyChange
there is a corresponding
OWLOntologyChangeData
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.Constructor | Description |
---|---|
OWLOntologyChangeRecord(OWLOntologyID ontologyID,
OWLOntologyChangeData data) |
Constructs an
OWLOntologyChangeRecord object which holds
information about a change to a particular ontology identified by an
OWLOntologyID object and also change details specified by the
OWLOntologyChangeData object. |
Modifier and Type | Method | Description |
---|---|---|
static OWLOntologyChangeRecord |
createFromOWLOntologyChange(OWLOntologyChange change) |
A convenience method that creates an
OWLOntologyChangeRecord by
deriving data from an OWLOntologyChange object. |
OWLOntologyChange |
createOntologyChange(OWLOntologyManager manager) |
Creates an
OWLOntologyChange from the OWLOntologyID and
OWLOntologyChangeData associated with this
OWLOntologyChangeRecord object. |
boolean |
equals(Object obj) |
|
OWLOntologyChangeData |
getData() |
Gets the
OWLOntologyChangeData which is associated with this
OWLOntologyChangeRecord . |
String |
getName() |
|
OWLOntologyID |
getOntologyID() |
Gets the
OWLOntologyID that identifies the ontology associated
with this change record. |
int |
hashCode() |
|
String |
toString() |
public OWLOntologyChangeRecord(@Nonnull OWLOntologyID ontologyID, @Nonnull OWLOntologyChangeData data)
OWLOntologyChangeRecord
object which holds
information about a change to a particular ontology identified by an
OWLOntologyID
object and also change details specified by the
OWLOntologyChangeData
object.ontologyID
- The OWLOntologyID
which identifies the ontology that the
change was applied to.data
- The OWLOntologyChangeData
that describes the particular
details of the change.@Nonnull public static OWLOntologyChangeRecord createFromOWLOntologyChange(@Nonnull OWLOntologyChange change)
OWLOntologyChangeRecord
by
deriving data from an OWLOntologyChange
object.change
- The OWLOntologyChange
object.@Nonnull public OWLOntologyID getOntologyID()
OWLOntologyID
that identifies the ontology associated
with this change record.OWLOntologyID
.@Nonnull public OWLOntologyChangeData getData()
OWLOntologyChangeData
which is associated with this
OWLOntologyChangeRecord
.OWLOntologyChangeData
.public OWLOntologyChange createOntologyChange(OWLOntologyManager manager)
OWLOntologyChange
from the OWLOntologyID
and
OWLOntologyChangeData
associated with this
OWLOntologyChangeRecord
object. The OWLOntology
that is
the target of the resulting OWLOntologyChange
is derived from an
OWLOntologyManager
. The manager must contain an ontology
that has an OWLOntologyID
which is equal to the
OWLOntologyID
associated with this
OWLOntologyChangeRecord
object.manager
- The manager which will be used to obtain a reference to an
OWLOntology
object having the same OWLOntologyID
as the OWLOntologyID
associated with this
OWLOntologyChangeRecord
.OWLOntologyChange
object that is derived from this
record's OWLOntologyID
and OWLOntologyChangeData
.
The specific concrete subclass of the returned
OWLOntologyChange
will depend upon the specific concrete
subclass of the OWLOntologyChangeData
associated with
this OWLOntologyChangeRecord
.UnknownOWLOntologyException
- if the specified manager does not contain an ontology which has
an OWLOntologyID
equal to the OWLOntologyID
associated with this OWLOntologyChangeRecord
.public String getName()
Copyright © 2018 The University of Manchester. All rights reserved.