com.salesforce.jgrapht.ext.GraphExporter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AptSpringProcessor Show documentation
Show all versions of AptSpringProcessor Show documentation
This project contains the apt processor that implements all the checks enumerated in @Verify. It is a self contained, and
shaded jar.
/*
* (C) Copyright 2016-2017, by Dimitrios Michail and Contributors.
*
* JGraphT : a free Java graph-theory library
*
* This program and the accompanying materials are dual-licensed under
* either
*
* (a) the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation, or (at your option) any
* later version.
*
* or (per the licensee's choosing)
*
* (b) the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation.
*/
package com.salesforce.jgrapht.ext;
import java.io.*;
import java.nio.charset.*;
import com.salesforce.jgrapht.*;
/**
* Interface for graph exporters
*
* @param the graph vertex type
* @param the graph edge type
*/
public interface GraphExporter
{
/**
* Export a graph
*
* @param g the graph to export
* @param out the output stream
* @throws ExportException in case any error occurs
*/
default void exportGraph(Graph g, OutputStream out)
throws ExportException
{
exportGraph(g, new OutputStreamWriter(out, StandardCharsets.UTF_8));
}
/**
* Export a graph
*
* @param g the graph to export
* @param writer the output writer
* @throws ExportException in case any error occurs
*/
void exportGraph(Graph g, Writer writer)
throws ExportException;
/**
* Export a graph
*
* @param g the graph to export
* @param file the file to write to
* @throws ExportException in case any error occurs
*/
default void exportGraph(Graph g, File file)
throws ExportException
{
try {
exportGraph(g, new FileWriter(file));
} catch (IOException e) {
throw new ExportException(e);
}
}
}
// End GraphExporter.java
© 2015 - 2025 Weber Informatics LLC | Privacy Policy