public class Node
extends java.lang.Object
Constructor and Description |
---|
Node(int depth)
Constructor.
|
Node(int depth,
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> accessions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccession(java.lang.String accession,
java.util.ArrayList<java.lang.Integer> indexes)
Adds an accession to the node.
|
void |
clearAccessions()
Clears the accessions of this node.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getAccessions()
Returns the accessions attribute.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getAllMappings()
Returns all the protein mapping of the node.
|
int |
getDepth()
Returns the depth of the node in the tree.
|
java.lang.Long |
getIndex()
Returns the index of the node when saved.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getProteinMapping(java.lang.String peptideSequence)
Returns the protein mappings for the given peptide sequence.
|
long |
getSize()
Returns the size of the node in accession*tag.
|
java.util.HashMap<java.lang.Character,Node> |
getSubtree()
Returns the subtree.
|
boolean |
isEmpty()
Indicates whether the node is empty.
|
void |
loadAccessions()
Loads the content of the node from the node factory.
|
void |
setIndex(java.lang.Long index)
Sets the index of the node when saved.
|
boolean |
splitNode(int maxNodeSize)
Splits the node into subnode if its size is larger than the maxNodeSize
and does the same for every sub node.
|
public Node(int depth)
depth
- the depth of the nodepublic Node(int depth, java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> accessions)
depth
- the depth of the nodeaccessions
- the accessions of the nodepublic java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getProteinMapping(java.lang.String peptideSequence) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException
peptideSequence
- the given peptide sequencejava.io.IOException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public boolean splitNode(int maxNodeSize) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException
maxNodeSize
- the maximal node size allowed when splittingjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public void addAccession(java.lang.String accession, java.util.ArrayList<java.lang.Integer> indexes)
accession
- the accession to addindexes
- the indexes in this accession where the key can be found.
Any prior entry will be silently overwrittenpublic long getSize()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getAccessions()
public java.util.HashMap<java.lang.Character,Node> getSubtree()
public void clearAccessions()
public boolean isEmpty()
public void loadAccessions() throws java.io.IOException
java.io.IOException
public int getDepth()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getAllMappings() throws java.io.IOException
java.io.IOException
public java.lang.Long getIndex()
public void setIndex(java.lang.Long index)
index
- the index of the node when saveCopyright © 2013. All Rights Reserved.