anl.aida.client
Class CacheElement

java.lang.Object
  extended by anl.aida.client.CacheElement

public class CacheElement
extends java.lang.Object

Encapsulates details about a timestamped section of the cache.


Nested Class Summary
private static class CacheElement.AllDocs
           
private static class CacheElement.DIIter
           
 
Field Summary
private static simphony.util.messages.MessageCenter center
           
private  java.util.List<CacheDocumentSet> docSets
           
private  anl.aida.core.STCHeader header
           
private  int id
           
private  anl.aida.core.KeywordGenerator keyGen
           
private  Keywords keywords
           
private  anl.aida.core.ScoredTermsCollection stc
           
private  java.io.File stcLocation
           
static java.lang.String SV_FILES_DIR
           
private  anl.aida.sv.SemanticVectorStore svStore
           
 
Constructor Summary
CacheElement(int id, java.io.File stcLocation, anl.aida.core.STCHeader header)
           
 
Method Summary
 void addDocumentSet(CacheDocumentSet set)
           
 java.lang.Iterable<CacheDocumentSet> documentSets()
           
 int getDocumentCount()
           
 CacheDocumentSet getDocumentSet(int index)
          Gets the document set at the specified index.
 int getDocumentSetCount()
           
 anl.aida.core.STCHeader getHeader()
          Gets the header associated with this cache element.
 int getID()
           
 anl.aida.core.KeywordGenerator getKeywordGenerator()
           
 Keywords getKeywords()
          Gets the keywords for this CacheElement.
 anl.aida.core.ScoredTermsCollection getSTC()
           
 java.io.File getSTCLocation()
           
private  java.io.File[] getSVFiles(java.io.File stcLoc, anl.aida.core.ScoredTermsCollection stc)
           
 anl.aida.sv.SemanticVectorStore getSVS()
           
 int getTermCount()
           
private  void initSTC()
           
private  void initSV()
           
 void release()
          Releases any resources (STC etc.) acquired by this CacheElement.
 void setKeyword(Keywords keywords)
          Sets the keywords for this cache element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

center

private static final simphony.util.messages.MessageCenter center

SV_FILES_DIR

public static final java.lang.String SV_FILES_DIR
See Also:
Constant Field Values

stcLocation

private java.io.File stcLocation

header

private anl.aida.core.STCHeader header

stc

private anl.aida.core.ScoredTermsCollection stc

keyGen

private anl.aida.core.KeywordGenerator keyGen

svStore

private anl.aida.sv.SemanticVectorStore svStore

id

private int id

keywords

private Keywords keywords

docSets

private java.util.List<CacheDocumentSet> docSets
Constructor Detail

CacheElement

public CacheElement(int id,
                    java.io.File stcLocation,
                    anl.aida.core.STCHeader header)
Method Detail

getKeywords

public Keywords getKeywords()
Gets the keywords for this CacheElement. This may contain keywords with no docs in this element.

Returns:
the keywords for this CacheElement. This may contain keywords with no docs in this element.

setKeyword

public void setKeyword(Keywords keywords)
Sets the keywords for this cache element.

Parameters:
keywords - the new keywords

getDocumentSet

public CacheDocumentSet getDocumentSet(int index)
Gets the document set at the specified index.

Parameters:
index - the index
Returns:
the document set at the specified index.

getHeader

public anl.aida.core.STCHeader getHeader()
Gets the header associated with this cache element.

Returns:
the header associated with this cache element.

release

public void release()
Releases any resources (STC etc.) acquired by this CacheElement.


initSTC

private void initSTC()

initSV

private void initSV()

getID

public int getID()

getSTC

public anl.aida.core.ScoredTermsCollection getSTC()

getSVS

public anl.aida.sv.SemanticVectorStore getSVS()

getKeywordGenerator

public anl.aida.core.KeywordGenerator getKeywordGenerator()

documentSets

public java.lang.Iterable<CacheDocumentSet> documentSets()

addDocumentSet

public void addDocumentSet(CacheDocumentSet set)

getDocumentSetCount

public int getDocumentSetCount()

getSVFiles

private java.io.File[] getSVFiles(java.io.File stcLoc,
                                  anl.aida.core.ScoredTermsCollection stc)
                           throws java.io.IOException
Throws:
java.io.IOException

getDocumentCount

public int getDocumentCount()

getTermCount

public int getTermCount()

getSTCLocation

public java.io.File getSTCLocation()