All Downloads are FREE. Search and download functionalities are using the official Maven repository.

flatgraph.formats.Exporter.scala Maven / Gradle / Ivy

There is a newer version: 0.0.91
Show newest version
package flatgraph.formats

import java.nio.file.{Path, Paths}
import flatgraph.{Edge, GNode, Graph, Schema}

trait Exporter {

  def defaultFileExtension: String

  def runExport(schema: Schema, nodes: IterableOnce[GNode], edges: IterableOnce[Edge], outputFile: Path): ExportResult

  def runExport(graph: Graph, outputFile: Path): ExportResult =
    runExport(graph.schema, graph.allNodes, graph.allEdges, outputFile)

  def runExport(graph: Graph, outputFile: String): ExportResult =
    runExport(graph, Paths.get(outputFile))
}

case class ExportResult(nodeCount: Int, edgeCount: Int, files: Seq[Path], additionalInfo: Option[String])




© 2015 - 2024 Weber Informatics LLC | Privacy Policy