public abstract class OWLOntologyChange extends Object implements HasSignature, Serializable
Constructor and Description |
---|
OWLOntologyChange(OWLOntology ont) |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(OWLOntologyChangeVisitor visitor)
Accepts a visitor
|
abstract <O> O |
accept(OWLOntologyChangeVisitorEx<O> visitor)
Accepts a visitor
|
Optional<OWLAxiom> |
getAddedAxiom() |
Optional<OWLAxiom> |
getAddedOrRemovedAxiom() |
abstract OWLAxiom |
getAxiom()
If the change is an axiom change (i.e.
|
abstract OWLOntologyChangeData |
getChangeData()
Gets the data (independent of the ontology) associated with this specific change.
|
OWLOntologyChangeRecord |
getChangeRecord()
Gets a
OWLOntologyChangeRecord that is derived from this OWLOntologyChange 's
OWLOntologyID and it's OWLOntologyChangeData . |
OWLOntology |
getOntology()
Gets the ontology that the change is/was applied to.
|
Optional<OWLAxiom> |
getRemovedAxiom() |
abstract Set<OWLEntity> |
getSignature()
Gets the signature of this ontology change.
|
abstract boolean |
isAddAxiom()
Determines if the change will add an axiom to an ontology.
|
abstract boolean |
isAxiomChange()
Determines if the change will cause the addition or removal of an axiom from an ontology.
|
boolean |
isAxiomChange(AxiomType<?> type) |
abstract boolean |
isImportChange()
Determines if this change is an import change and hence causes a change to the imports
closure of an ontology.
|
boolean |
isRemoveAxiom()
Determines if the change will remove an axiom from an ontology.
|
abstract OWLOntologyChange |
reverseChange() |
public OWLOntologyChange(@Nonnull OWLOntology ont)
ont
- the ontology to which the change is to be appliedpublic Optional<OWLAxiom> getAddedOrRemovedAxiom()
getAxiom()
, but it never throws an exception or returns null.public Optional<OWLAxiom> getAddedAxiom()
public Optional<OWLAxiom> getRemovedAxiom()
public boolean isAxiomChange(AxiomType<?> type)
type
- axiom type to checkpublic abstract boolean isAxiomChange()
true
if the change is an OWLAddAxiomChange
or
OWLRemoveAxiomChange
otherwise false
.public abstract boolean isAddAxiom()
true
if the change is an AddAxiom change and it will add an axiom to an
ontology, false
otherwise.public boolean isRemoveAxiom()
true
if the change is a RemoveAxiom change and it will remove an axiom from
an ontology, false
otherwise.@Nonnull public abstract OWLAxiom getAxiom()
IllegalStateException
- if the change has no axiom; UnsupportedOperationException If
the change is not an axiom change (check with the isAxiomChange
method
first).public abstract boolean isImportChange()
true
if this change is an import change, otherwise false
.@Nonnull public OWLOntology getOntology()
@Nonnull public abstract OWLOntologyChangeData getChangeData()
OWLOntologyChangeData
associated with this OWLOntologyChange
.@Nonnull public OWLOntologyChangeRecord getChangeRecord()
OWLOntologyChangeRecord
that is derived from this OWLOntologyChange
's
OWLOntologyID
and it's OWLOntologyChangeData
.OWLOntologyChangeRecord
containing an OWLOntologyID
equal to the
OWLOntologyID
of this OWLOntologyChange
's OWLOntology
. Not
null
.@Nonnull public abstract Set<OWLEntity> getSignature()
getSignature
in interface HasSignature
public abstract void accept(@Nonnull OWLOntologyChangeVisitor visitor)
visitor
- The visitor@Nonnull public abstract <O> O accept(@Nonnull OWLOntologyChangeVisitorEx<O> visitor)
O
- visitor return typevisitor
- The visitorpublic abstract OWLOntologyChange reverseChange()
Copyright © 2020 The University of Manchester. All rights reserved.