Package org.graffiti.plugin.io
Class AbstractInputSerializer
java.lang.Object
org.graffiti.plugin.io.AbstractInputSerializer
- All Implemented Interfaces:
InputSerializer
,Serializer
- Direct Known Subclasses:
BioPAX_OWL_Reader
,DOTreader
,GMLReader
,GraphMLReader
,KEGG_XML_Reader
,KEGG_XML_Reader_g
,KEGG2_XML_Reader
,MetaToolReader
,PajekReader
,PNTReader
,SBML_XML_Reader
,SIFreader
,TextListReader
,XGMMLReader
public abstract class AbstractInputSerializer extends Object implements InputSerializer
Provides additional methods to access a graph file from different kinds of
input.
- Version:
- $Revision: 1.6 $
-
Constructor Summary
Constructors Constructor Description AbstractInputSerializer()
-
Method Summary
Modifier and Type Method Description Graph
read(InputStream in)
Reads in a graph from the given input stream.abstract void
read(InputStream in, Graph g)
Reads in a graph from the given input stream.void
read(String filename, Graph g)
Reads in a graph from the given filename.void
read(URL url, Graph g)
Reads in the graph from the given url.boolean
validFor(InputStream reader)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graffiti.plugin.io.InputSerializer
read
Methods inherited from interface org.graffiti.plugin.io.Serializer
getExtensions, getFileTypeDescriptions
-
Constructor Details
-
AbstractInputSerializer
public AbstractInputSerializer()
-
-
Method Details
-
read
Reads in a graph from the given filename.- Specified by:
read
in interfaceInputSerializer
- Parameters:
filename
- The name of the file to read the graph from.g
- The graph to add the newly read graph to.- Throws:
IOException
- If an IO error occurs.
-
validFor
- Specified by:
validFor
in interfaceInputSerializer
- Parameters:
reader
- Warning: The Inputstream-Length may be limited in size, e.g. may only provide access to the first 5000 bytes.- Returns:
-
read
Reads in the graph from the given url.- Specified by:
read
in interfaceInputSerializer
- Parameters:
url
- The URL to read the graph from.g
- The graph to add the newly read graph to.- Throws:
IOException
- If an IO error occurs.
-
read
Reads in a graph from the given input stream.- Specified by:
read
in interfaceInputSerializer
- Parameters:
in
- The input stream to read the graph from.g
- The graph to add the newly read graph to.- Throws:
IOException
- If an IO error occurs.
-
read
Reads in a graph from the given input stream.- Specified by:
read
in interfaceInputSerializer
- Parameters:
in
- The input stream to read the graph from.- Returns:
- The newly read graph.
- Throws:
IOException
- If an IO error occurs.
-