public class NodeFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
separator
The separator used to separate line contents.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the factory, closes all connection and deletes the file.
|
HashMap<String,ArrayList<Integer>> |
getAccessions(long index)
Returns the accessions at a given index.
|
static NodeFactory |
getInstance()
Static method returning the instance of the factory.
|
static NodeFactory |
getInstance(File folder)
Static method returning the instance of the factory and setting the
serialization folder.
|
void |
initiateFactory()
Initiates the factory on the sequence factory.
|
void |
saveAccessions(Node node,
boolean emptyNode)
Saves all the downstream accessions.
|
public static final String separator
public static NodeFactory getInstance(File folder)
folder
- the serialization folderpublic static NodeFactory getInstance()
public void initiateFactory() throws IOException
IOException
public void saveAccessions(Node node, boolean emptyNode) throws IOException
node
- the nodeemptyNode
- boolean indicating whether the node should be emptied
(if true the accession mapping will be cleared)IOException
public HashMap<String,ArrayList<Integer>> getAccessions(long index) throws IOException
index
- the index of the nodeIOException
public void close() throws IOException
IOException
Copyright © 2013. All Rights Reserved.