Class ReleaseMiningDiffNodeFormat
java.lang.Object
org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
- All Implemented Interfaces:
MiningNodeFormat,LinegraphFormat,DiffNodeLabelFormat<DiffLinesLabel>
Formats for DiffNodes for mining.
The label of a node starts with c (for code) if it is an artifact node and with m (for macro) otherwise.
The label of artifact nodes is followed by the index of its matched edit class.
The label of diff nodes is followed by the ordinal of its diff type and the ordinal of its node type.
Examples:
DiffNode with nodeType=ARTIFACT and edit class AddWithMapping gets the label "c1" because AddWithMapping has index 1.
DiffNode with nodeType=ELSE and difftype=REM gets the label "m23" because the ordinal or REM is 2 and the ordinal of ELSE is 3.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromEncodedTypes(String tag) private static EditClassfromId(int id) private static inttoLabel(DiffNode<? extends DiffLinesLabel> node) Converts aDiffNodeinto a label suitable for exporting.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.nodeformat.DiffNodeLabelFormat
fromLineGraphLine, toMultilineLabelMethods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.LinegraphFormat
getIdentifier, getShortNameMethods inherited from interface org.variantsync.diffdetective.mining.formats.MiningNodeFormat
fromLabelAndId
-
Field Details
-
ARTIFACT_PREFIX
- See Also:
-
ANNOTATION_PREFIX
- See Also:
-
-
Constructor Details
-
ReleaseMiningDiffNodeFormat
public ReleaseMiningDiffNodeFormat()
-
-
Method Details
-
toId
-
fromId
-
toLabel
Description copied from interface:DiffNodeLabelFormatConverts aDiffNodeinto a label suitable for exporting. This may be human readable text or machine parseable metadata.- Specified by:
toLabelin interfaceDiffNodeLabelFormat<DiffLinesLabel>- Parameters:
node- TheDiffNodeto be labeled- Returns:
- a label for
node
-
fromEncodedTypes
- Specified by:
fromEncodedTypesin interfaceMiningNodeFormat
-