Class LineGraphImport
java.lang.Object
org.variantsync.diffdetective.variation.diff.serialize.LineGraphImport
Import VariationDiffs from line graph files.
- Author:
- Kevin Jedelhauser, Paul Maximilian Bittner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<VariationDiff<DiffLinesLabel>>
fromFile
(Path path, LineGraphImportOptions<DiffLinesLabel> options) Import all VariationDiffs from the given linegraph file.static List<VariationDiff<DiffLinesLabel>>
fromLineGraph
(BufferedReader lineGraph, Path originalFile, LineGraphImportOptions<DiffLinesLabel> options) Import all VariationDiffs from the given linegraph file.private static VariationDiff<DiffLinesLabel>
parseVariationDiff
(String lineGraph, Path inFile, List<DiffNode<DiffLinesLabel>> diffNodeList, LineGraphImportOptions<DiffLinesLabel> options) Generates aVariationDiff
from the given, already parsed parameters.
-
Constructor Details
-
LineGraphImport
public LineGraphImport()
-
-
Method Details
-
fromFile
public static List<VariationDiff<DiffLinesLabel>> fromFile(Path path, LineGraphImportOptions<DiffLinesLabel> options) throws IOException Import all VariationDiffs from the given linegraph file.- Parameters:
path
- Path to a linegraph file in which only VariationDiffs are stored.options
- Options for the import, such as hints for the used formats for node and edge labels.- Returns:
- All
VariationDiffs
contained in the linegraph file. - Throws:
IOException
- whenfromLineGraph(BufferedReader, Path, LineGraphImportOptions)
throws.
-
fromLineGraph
public static List<VariationDiff<DiffLinesLabel>> fromLineGraph(BufferedReader lineGraph, Path originalFile, LineGraphImportOptions<DiffLinesLabel> options) throws IOException Import all VariationDiffs from the given linegraph file.- Parameters:
lineGraph
- Reader that reads the linegraph file.originalFile
- Path to the file from which the lineGraph reader is reading.options
- Options for the import, such as hints for the used formats for node and edge labels.- Returns:
- All
VariationDiffs
contained in the linegraph text. - Throws:
IOException
-
parseVariationDiff
private static VariationDiff<DiffLinesLabel> parseVariationDiff(String lineGraph, Path inFile, List<DiffNode<DiffLinesLabel>> diffNodeList, LineGraphImportOptions<DiffLinesLabel> options) Generates aVariationDiff
from the given, already parsed parameters.- Parameters:
lineGraph
- The header line in the linegraph that describes the VariationDiff (starting witht #
).inFile
- Path to the linegraph file that is currently parsed.diffNodeList
- All nodes of the VariationDiff that is to be created. The nodes can be assumed to be complete and already connected.options
-LineGraphImportOptions
- Returns:
VariationDiff
generated from the given, already parsed parameters.
-