Interface DiffNodeLabelFormat<L extends Label>

All Superinterfaces:
LinegraphFormat
All Known Subinterfaces:
MiningNodeFormat
All Known Implementing Classes:
DebugDiffNodeFormat, DebugMiningDiffNodeFormat, EditClassesDiffNodeFormat, FormulasAndLineNumbersNodeFormat, FullNodeFormat, LabelOnlyDiffNodeFormat, LineNumberFormat, MappingsDiffNodeFormat, PaperNodeFormat, ReleaseMiningDiffNodeFormat, RenameRootNodeFormat, RWCompositePatternNodeFormat, ShowNodeFormat, TypeDiffNodeFormat
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DiffNodeLabelFormat<L extends Label> extends LinegraphFormat
Reads and writes DiffNodes from and to line graph.
Author:
Paul Bittner, Kevin Jedelhauser
  • Method Details

    • fromLabelAndId

      default DiffNode<DiffLinesLabel> fromLabelAndId(String lineGraphNodeLabel, int nodeId)
      Converts a label of line graph into a DiffNode.
      Parameters:
      lineGraphNodeLabel - A string containing the label of the DiffNode
      nodeId - The id of the DiffNode
      Returns:
      The corresponding DiffNode
    • toLabel

      String toLabel(DiffNode<? extends L> node)
      Converts a DiffNode into a label suitable for exporting. This may be human readable text or machine parseable metadata.
      Parameters:
      node - The DiffNode to be labeled
      Returns:
      a label for node
    • toMultilineLabel

      default List<String> toMultilineLabel(DiffNode<? extends L> node)
      Converts a DiffNode into a multi line label suitable for exporting. This should be human readable text. Use a single line for machine parseable metadata (toLabel(org.variantsync.diffdetective.variation.diff.DiffNode<? extends L>)).
      Parameters:
      node - The DiffNode to be labeled
      Returns:
      a list of lines of the label for node
    • fromLineGraphLine

      default org.variantsync.functjonal.Pair<Integer,DiffNode<DiffLinesLabel>> fromLineGraphLine(String lineGraphLine)
      Converts a line describing a graph (starting with "t # ") in line graph format into a VariationDiffSource.
      Parameters:
      lineGraphLine - A line from a line graph file starting with "t #"
      Returns:
      A pair with the first element being the id of the node specified in the given lineGrapLine. The second entry is the parsed DiffNode described by the label of this line.