public abstract class AbstractDiff<S> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Set<Difference> |
differences |
protected boolean |
diffsRequested
if false, only isomorphie is computed, which makes the process faster but
does not collect all differences
|
protected DiffOptions |
options |
protected S |
otherObject |
protected S |
templateObject |
| Constructor and Description |
|---|
AbstractDiff(S template,
S other)
Initializes Diff object with the two graphs
template and
other. |
AbstractDiff(S template,
S other,
DiffOptions optionMap) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDifference(Object templateObject,
Object otherObject,
Object container,
DIFF_TYPES diffType,
Set<Difference> subDiffs)
Adds a difference to the differences set
|
protected boolean |
compareAnnotationContainers(SAnnotationContainer template,
SAnnotationContainer other,
Set<Difference> subDiffs)
Checks whether two
SAnnotationContainer objects are isomorph and
returns true if this is the case, false otherwise. |
protected boolean |
compareIdentifiableElements(IdentifiableElement template,
IdentifiableElement other,
Set<Difference> subDiffs)
Checks whether two
IdentifiableElement objects are isomorph. |
Set<Difference> |
findDiffs()
Compares the set graphs and returns if they are isomorphic or not.
|
protected abstract boolean |
findDiffs(boolean diffsRequested) |
protected Set<Difference> |
getDifferences()
Returns a list containing all computed differences.
|
protected com.google.common.collect.BiMap<SNode,SNode> |
getIsoNodes()
Return BiMap with isomorphic
SNodes key= template, value= other |
boolean |
isIsomorph()
Compares the set graphs and returns if they are isomorphic or not.
|
protected final S templateObject
protected final S otherObject
protected final DiffOptions options
protected Set<Difference> differences
protected boolean diffsRequested
public AbstractDiff(S template, S other)
template and
other.template - other - public AbstractDiff(S template, S other, DiffOptions optionMap)
protected com.google.common.collect.BiMap<SNode,SNode> getIsoNodes()
SNodes key= template, value= otherSNodesprotected Set<Difference> getDifferences()
protected void addDifference(Object templateObject, Object otherObject, Object container, DIFF_TYPES diffType, Set<Difference> subDiffs)
templateObject - first Salt objectotherObject - second Salt objectcontainer - Object containing the given object, e.g. used for layersdiffType - type of the differencepublic boolean isIsomorph()
findDiffs().public Set<Difference> findDiffs()
isIsomorph().protected boolean compareIdentifiableElements(IdentifiableElement template, IdentifiableElement other, Set<Difference> subDiffs)
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 - protected boolean compareAnnotationContainers(SAnnotationContainer template, SAnnotationContainer other, Set<Difference> subDiffs)
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. #OPTION_IGNORE_META_ANNOTATIONS,
#OPTION_IGNORE_PROCESSING_ANNOTATIONS,
#OPTION_IGNORE_ANNOTATIONS and #OPTION_IGNORE_FEATUREStemplateNode - otherNode - subDiffs - if differences shall be computed, this list must not have to
be emptyprotected abstract boolean findDiffs(boolean diffsRequested)
Copyright © 2009–2020 Humboldt-Universität zu Berlin, INRIA. All rights reserved.