fr.umlv.unitex.io
Class GraphIO

java.lang.Object
  extended by fr.umlv.unitex.io.GraphIO

public class GraphIO
extends java.lang.Object

This class provides methods for loading and saving graphs.

Author:
Sébastien Paumier

Field Summary
 java.util.ArrayList boxes
          Boxes of a graph
 int height
          Height of a graph
 int nBoxes
          Number of boxes of a graph
 Preferences pref
          Rendering properties of a graph
 int width
          Width of a graph
 
Constructor Summary
GraphIO()
           
 
Method Summary
static GraphIO loadGraph(java.io.File grfFile)
          This method loads a graph.
static GraphIO loadSentenceGraph(java.io.File file)
          This method loads a sentence graph.
 void saveGraph(java.io.File grfFile)
          Saves the graph referenced by the field of this GraphIO object
 void saveSentenceGraph(java.io.File file)
          Saves the sentence graph described by the fields of this GraphIO object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boxes

public java.util.ArrayList boxes
Boxes of a graph


pref

public Preferences pref
Rendering properties of a graph


width

public int width
Width of a graph


height

public int height
Height of a graph


nBoxes

public int nBoxes
Number of boxes of a graph

Constructor Detail

GraphIO

public GraphIO()
Method Detail

loadGraph

public static GraphIO loadGraph(java.io.File grfFile)
This method loads a graph.

Parameters:
grfFile - name of the graph
Returns:
a GraphIO object describing the graph

saveGraph

public void saveGraph(java.io.File grfFile)
Saves the graph referenced by the field of this GraphIO object

Parameters:
grfFile - graph file

loadSentenceGraph

public static GraphIO loadSentenceGraph(java.io.File file)
This method loads a sentence graph.

Parameters:
file - sentence graph file
Returns:
a GraphIO object describing the sentence graph

saveSentenceGraph

public void saveSentenceGraph(java.io.File file)
Saves the sentence graph described by the fields of this GraphIO object.

Parameters:
file - sentence graph file