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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromEncodedTypes
(String tag) private static EditClass
fromId
(int id) private static int
toLabel
(DiffNode<? extends DiffLinesLabel> node) Converts aDiffNode
into a label suitable for exporting.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.nodeformat.DiffNodeLabelFormat
fromLineGraphLine, toMultilineLabel
Methods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.LinegraphFormat
getIdentifier, getShortName
Methods 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:DiffNodeLabelFormat
Converts aDiffNode
into a label suitable for exporting. This may be human readable text or machine parseable metadata.- Specified by:
toLabel
in interfaceDiffNodeLabelFormat<DiffLinesLabel>
- Parameters:
node
- TheDiffNode
to be labeled- Returns:
- a label for
node
-
fromEncodedTypes
- Specified by:
fromEncodedTypes
in interfaceMiningNodeFormat
-