Class DirectedEdgeLabelFormat
java.lang.Object
org.variantsync.diffdetective.variation.diff.serialize.edgeformat.EdgeLabelFormat<DiffLinesLabel>
org.variantsync.diffdetective.mining.formats.DirectedEdgeLabelFormat
- All Implemented Interfaces:
LinegraphFormat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordDirectedEdgeLabelFormat.Edge<L extends DiffLinesLabel>Nested classes/interfaces inherited from class org.variantsync.diffdetective.variation.diff.serialize.edgeformat.EdgeLabelFormat
EdgeLabelFormat.Direction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final MiningNodeFormatprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionDirectedEdgeLabelFormat(MiningNodeFormat nodeFormatter) DirectedEdgeLabelFormat(MiningNodeFormat nodeFormatter, boolean useDirectionHeuristic, EdgeLabelFormat.Direction direction) -
Method Summary
Modifier and TypeMethodDescriptionprotected <L extends DiffLinesLabel>
voidconnectAccordingToLabel(DiffNode<L> child, DiffNode<L> parent, String edgeLabel) Adds the given child node as the child of the given parent node for all times described by the given label (viaDiffNode.addChild(DiffNode, Time)) In particular, this method checks if the given edge label starts withLineGraphConstants.BEFORE_PARENT,LineGraphConstants.AFTER_PARENT, orLineGraphConstants.BEFORE_AND_AFTER_PARENTand connects both nodes accordingly.Name of the format that uniquely identifies the format.<L extends DiffLinesLabel>
StringlabelOf(StyledEdge<L> edge) Converts aStyledEdgeinto a label suitable for exporting.private <L extends DiffLinesLabel>
DirectedEdgeLabelFormat.Edge<L> recoverEdgeDirectionFromLabelIfPossible(DiffNode<L> hypothesizedFrom, DiffNode<L> hypothesizedTo, String edgeLabel) Methods inherited from class org.variantsync.diffdetective.variation.diff.serialize.edgeformat.EdgeLabelFormat
connect, getEdgeDirection, multilineLabelOf, setEdgeDirectionMethods 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.LinegraphFormat
getShortName
-
Field Details
-
LABEL_SEPARATOR
- See Also:
-
nodeFormatter
-
useDirectionHeuristic
private final boolean useDirectionHeuristic
-
-
Constructor Details
-
DirectedEdgeLabelFormat
-
DirectedEdgeLabelFormat
public DirectedEdgeLabelFormat(MiningNodeFormat nodeFormatter, boolean useDirectionHeuristic, EdgeLabelFormat.Direction direction)
-
-
Method Details
-
recoverEdgeDirectionFromLabelIfPossible
private <L extends DiffLinesLabel> DirectedEdgeLabelFormat.Edge<L> recoverEdgeDirectionFromLabelIfPossible(DiffNode<L> hypothesizedFrom, DiffNode<L> hypothesizedTo, String edgeLabel) -
connectAccordingToLabel
protected <L extends DiffLinesLabel> void connectAccordingToLabel(DiffNode<L> child, DiffNode<L> parent, String edgeLabel) Description copied from class:EdgeLabelFormatAdds the given child node as the child of the given parent node for all times described by the given label (viaDiffNode.addChild(DiffNode, Time)) In particular, this method checks if the given edge label starts withLineGraphConstants.BEFORE_PARENT,LineGraphConstants.AFTER_PARENT, orLineGraphConstants.BEFORE_AND_AFTER_PARENTand connects both nodes accordingly.- Overrides:
connectAccordingToLabelin classEdgeLabelFormat<DiffLinesLabel>- Parameters:
child- The node that should be the child of the given parent at the times described by the label.parent- The node that should be the parent of the given child at the times described by the label.edgeLabel- The label that describes the time, the edge exists at, by being prefixed with one of the LineGraphConstants described above.
-
labelOf
Description copied from class:EdgeLabelFormatConverts aStyledEdgeinto a label suitable for exporting. This may be human readable text or machine parseable metadata.- Specified by:
labelOfin classEdgeLabelFormat<DiffLinesLabel>- Parameters:
edge- TheStyledEdgeto be labeled- Returns:
- a label for
edge
-
getIdentifier
Description copied from interface:LinegraphFormatName of the format that uniquely identifies the format.
-