it.unimo.dbgroup.momis.annotationOntology
Class OntologyManagerCacheLemma

java.lang.Object
  extended byit.unimo.dbgroup.momis.annotationOntology.OntologyManagerCache
      extended byit.unimo.dbgroup.momis.annotationOntology.OntologyManagerCacheLemma

public class OntologyManagerCacheLemma
extends OntologyManagerCache

Cache used by the OntologyManager for Lemmas

Author:
Alberto Corni (Aug 2003)

Field Summary
private  java.util.Map _cacheLemma_LemmaSynsets
          
Key.
private  java.util.Map _cacheLemmaIdentifier
          
Key.
private  java.util.Map _cacheLemmaName
          
Key.
private  java.util.Map _cacheLemmaSyntacticCategory
          
Key.
 
Fields inherited from class it.unimo.dbgroup.momis.annotationOntology.OntologyManagerCache
 
Constructor Summary
OntologyManagerCacheLemma(OntologyManager ontologyManager)
           
 
Method Summary
 void clear()
          clean the cache
private  java.lang.String getCacheLemmaSyntacticCategoryKey(java.lang.String lemmaName, int syntacticCategory)
          Build the key for the LemmaSyntacticCategory cache
 OntologyLemma getLemma(java.lang.Object lemmaIdentifier)
           
 OntologyLemma getLemma(java.lang.String lemmaName, int syntacticCategory)
          retriveLemmaSynsets method: this method retrive lemma synset connected to the input parameter.
 java.util.Vector getLemmas(java.lang.String lemmaName)
          retrives all lemma with the given "lemma" name.
 java.util.Vector getLemmaSynsets(OntologyLemma ontologyLemma)
           
private  void putInCache(OntologyLemma ontologyLemma)
          The correct way to add an entry to the cache
 
Methods inherited from class it.unimo.dbgroup.momis.annotationOntology.OntologyManagerCache
getOntologyManager, setOntologyManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cacheLemmaSyntacticCategory

private java.util.Map _cacheLemmaSyntacticCategory

Key. lemma+SyntacticCategory
value. the OntologyLemma


_cacheLemmaIdentifier

private java.util.Map _cacheLemmaIdentifier

Key. OntologyLemmaIdentifier
value. the OntologyLemma


_cacheLemma_LemmaSynsets

private java.util.Map _cacheLemma_LemmaSynsets

Key. OntologyLemmaIdentifier
value. A vector of OntologyLemmaSynsets related to the given Lemma


_cacheLemmaName

private java.util.Map _cacheLemmaName

Key. a LemmaName (e.g. "house", "horse", etc.)
value. A vector of OntologyLemmas with the key LemmaName

Constructor Detail

OntologyManagerCacheLemma

public OntologyManagerCacheLemma(OntologyManager ontologyManager)
Method Detail

getLemma

public OntologyLemma getLemma(java.lang.String lemmaName,
                              int syntacticCategory)
                       throws java.lang.Exception
retriveLemmaSynsets method: this method retrive lemma synset connected to the input parameter. -

Parameters:
lemmaName - name of the lemma
syntacticCategory - number of the syntactic category
Returns:
the OntologyLemma lemma.
Throws:
java.lang.Exception

getLemma

public OntologyLemma getLemma(java.lang.Object lemmaIdentifier)
                       throws java.lang.Exception
Parameters:
lemmaIdentifier - the object identifier for the lemma
Throws:
java.lang.Exception

getLemmas

public java.util.Vector getLemmas(java.lang.String lemmaName)
                           throws java.lang.Exception
retrives all lemma with the given "lemma" name.

Returns:
a Vector of OntologyLemma
Throws:
java.lang.Exception

getLemmaSynsets

public java.util.Vector getLemmaSynsets(OntologyLemma ontologyLemma)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

putInCache

private void putInCache(OntologyLemma ontologyLemma)
The correct way to add an entry to the cache


getCacheLemmaSyntacticCategoryKey

private java.lang.String getCacheLemmaSyntacticCategoryKey(java.lang.String lemmaName,
                                                           int syntacticCategory)
Build the key for the LemmaSyntacticCategory cache


clear

public void clear()
clean the cache

Specified by:
clear in class OntologyManagerCache


Universita' di Modena e Reggio Emilia