public class Node extends Object
Constructor and Description |
---|
Node(int depth)
Constructor.
|
Node(int depth,
HashMap<String,ArrayList<Integer>> accessions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccession(String accession,
ArrayList<Integer> indexes)
Adds an accession to the node.
|
void |
clearAccessions()
Clears the accessions of this node.
|
HashMap<String,ArrayList<Integer>> |
getAccessions()
Returns the accessions attribute.
|
HashMap<String,ArrayList<Integer>> |
getAllMappings()
Returns all the protein mapping of the node.
|
int |
getDepth()
Returns the depth of the node in the tree.
|
Long |
getIndex()
Returns the index of the node when saved.
|
HashMap<String,ArrayList<Integer>> |
getProteinMapping(String peptideSequence)
Returns the protein mappings for the given peptide sequence.
|
long |
getSize()
Returns the size of the node in accession*tag.
|
HashMap<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(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 HashMap<String,ArrayList<Integer>> getProteinMapping(String peptideSequence) throws IOException, InterruptedException, ClassNotFoundException
peptideSequence
- the given peptide sequenceIOException
InterruptedException
ClassNotFoundException
public boolean splitNode(int maxNodeSize) throws IOException, IllegalArgumentException, InterruptedException, ClassNotFoundException
maxNodeSize
- the maximal node size allowed when splittingIOException
IllegalArgumentException
InterruptedException
ClassNotFoundException
public void addAccession(String accession, ArrayList<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 HashMap<String,ArrayList<Integer>> getAccessions()
public HashMap<Character,Node> getSubtree()
public void clearAccessions()
public boolean isEmpty()
public void loadAccessions() throws IOException
IOException
public int getDepth()
public HashMap<String,ArrayList<Integer>> getAllMappings() throws IOException
IOException
public Long getIndex()
public void setIndex(Long index)
index
- the index of the node when saveCopyright © 2013. All Rights Reserved.