Salt
3.4.2
A powerful, tagset-independent and theory-neutral meta model and API for storing, manipulating, and representing nearly all types of linguistic data .
|
Public Member Functions | |
AbstractDiff (final S template, final S other) | |
Initializes Diff object with the two graphs template and other . More... | |
AbstractDiff (final S template, final S other, DiffOptions optionMap) | |
boolean | isIsomorph () |
Compares the set graphs and returns if they are isomorphic or not. More... | |
Set< Difference > | findDiffs () |
Compares the set graphs and returns if they are isomorphic or not. More... | |
Protected Member Functions | |
BiMap< SNode, SNode > | getIsoNodes () |
Return BiMap with isomorphic SNodes key= template, value= other. More... | |
Set< Difference > | getDifferences () |
Returns a list containing all computed differences. More... | |
void | addDifference (final Object templateObject, final Object otherObject, final Object container, final DIFF_TYPES diffType, final Set< Difference > subDiffs) |
Adds a difference to the differences set. More... | |
boolean | compareIdentifiableElements (final IdentifiableElement template, final IdentifiableElement other, final Set< Difference > subDiffs) |
Checks whether two IdentifiableElement objects are isomorph. More... | |
boolean | compareAnnotationContainers (final SAnnotationContainer template, final SAnnotationContainer other, final Set< Difference > subDiffs) |
Checks whether two SAnnotationContainer objects are isomorph and returns true if this is the case, false otherwise. More... | |
abstract boolean | findDiffs (boolean diffsRequested) |
Protected Attributes | |
final S | templateObject |
final S | otherObject |
final DiffOptions | options |
Set< Difference > | differences = null |
boolean | diffsRequested = false |
if false, only isomorphie is computed, which makes the process faster but does not collect all differences | |
org.corpus_tools.salt.util.internal.AbstractDiff< S extends Object >.AbstractDiff | ( | final S | template, |
final S | other | ||
) |
Initializes Diff object with the two graphs template
and other
.
template | |
other |
|
protected |
Adds a difference to the differences set.
templateObject | first Salt object |
otherObject | second Salt object |
container | Object containing the given object, e.g. used for layers |
diffType | type of the difference |
|
protected |
Checks whether two SAnnotationContainer objects are isomorph and returns true if this is the case, false otherwise.
If subdiffs is not null, the differences will be added to that list, if that list is empty the method returns false when the first difference was found.
The behavior of this method depends on options: OPTION_IGNORE_META_ANNOTATIONS, OPTION_IGNORE_PROCESSING_ANNOTATIONS, OPTION_IGNORE_ANNOTATIONS and OPTION_IGNORE_FEATURES
templateNode | |
otherNode | |
subDiffs | if differences shall be computed, this list must not have to be empty |
|
protected |
Checks whether two IdentifiableElement objects are isomorph.
If option OPTION_IGNORE_ID is false, this method returns true, if the id values of both are equal, false otherwise.If subdiffs is not null, the differences will be added to that list, if that list is empty the method returns false when the first difference was found.
templateNode | |
otherNode | |
subDiffs |
Set<Difference> org.corpus_tools.salt.util.internal.AbstractDiff< S extends Object >.findDiffs | ( | ) |
Compares the set graphs and returns if they are isomorphic or not.
If graphs are not isomporphic, this method finds and records all differences and lists them. This means the entire graphs have to be compared and could slow down the computation. If you are only interested in the result and not in the particular differences, use method isIsomorph().
|
protected |
Returns a list containing all computed differences.
|
protected |
boolean org.corpus_tools.salt.util.internal.AbstractDiff< S extends Object >.isIsomorph | ( | ) |
Compares the set graphs and returns if they are isomorphic or not.
In case of the graphs are not isomorphic, this method does not record all differences. TO speed up the computation. it just detects the first difference and returns false. To get a full list of all differences, use method findDiffs().