Class DocCacheManager


  • public class DocCacheManager
    extends Object
    • Method Detail

      • getGateDoc

        public gate.Document getGateDoc()
      • cacheSentence

        public boolean cacheSentence​(Sentence sent)
        Add a sentence to the cache / replace an existing one
        Parameters:
        sent -
        Returns:
      • cacheToken

        public boolean cacheToken​(Token tok)
        Add a token to the cache / replace an existing one
        Parameters:
        tok -
        Returns:
      • cacheSection

        public boolean cacheSection​(Section sect)
        Add a section to the cache / replace an existing one
        Parameters:
        sect -
        Returns:
      • cacheCandidateTerm

        public boolean cacheCandidateTerm​(CandidateTermOcc cTerm)
        Add a candidate term to the cache / replace an existing one
        Parameters:
        sect -
        Returns:
      • cacheBabelSynsetOcc

        public boolean cacheBabelSynsetOcc​(BabelSynsetOcc babelSynOcc)
        Add a Babelnet synset occurrence to the cache / replace an existing one
        Parameters:
        sect -
        Returns:
      • cacheCitation

        public boolean cacheCitation​(Citation cit)
        Add a candidate term to the cache / replace an existing one
        Parameters:
        sect -
        Returns:
      • getCachedSentence

        public Sentence getCachedSentence​(Integer id)
        Get cached sentence by id; null if the sentence does not exist in cache
        Parameters:
        id -
        Returns:
      • getCachedToken

        public Token getCachedToken​(Integer id)
        Get cached token by id; null if the token does not exist in cache
        Parameters:
        id -
        Returns:
      • getCachedSection

        public Section getCachedSection​(Integer id)
        Get cached section by id; null if the section does not exist in cache
        Parameters:
        id -
        Returns:
      • getCachedCandidateTerm

        public CandidateTermOcc getCachedCandidateTerm​(Integer id)
        Get cached candidate term by id; null if the candidate term does not exist in cache
        Parameters:
        id -
        Returns:
      • getCachedBabelSynsetOcc

        public BabelSynsetOcc getCachedBabelSynsetOcc​(Integer id)
        Get cached Babelnet synset occurrence by id; null if the Babelnet synset occurrence does not exist in cache
        Parameters:
        id -
        Returns:
      • getCachedCitation

        public Citation getCachedCitation​(Integer id)
        Get cached citation by id; null if the citation does not exist in cache
        Parameters:
        id -
        Returns:
      • clearCache

        public void clearCache()
        Clear all cached document elements
      • cleanUp

        public void cleanUp()
        Clear all object pointers