org.grinvin.io.list
Class GraphListSaver
java.lang.Object
org.grinvin.io.list.GraphListSaver
public final class GraphListSaver
extends java.lang.Object
Helper methods for saving graph list elements, lists of graphs
and lists of invariants to disk.
save
public static void save(GraphList list,
OutputStream out)
throws IOException
Save a list of graphs as an XML file. The XML file will only contain URL-references
to the corresponding graph bundles, and not the graph bundle contents. These should
be saved separately.
If the parameter
ilist is not null, also the invariants in that
list are stored into the XML file.
Creates a file with contents of the form
<graphlistelements name="...">
<graphlistelement graphURI="..."/>
...
<invariant invariantId="..."/>
...
</graphlistelements>
Note: Graphs without an URI ar note saved
list
- Graph list to be stored
saveIntoWorkspace
public static void saveIntoWorkspace(GraphList list,
SectionSaver ssaver)
throws IOException
Save a (session) graph list into a (workspace) directory. Uses the uri
of the graph list to determine the destination file name. If no URI was
assigned, a new URI is created. Note that the graph list elements themselves
need to be saved separately.
saveIntoWorkspace(GraphListElement gle, File directory)