it.unimo.dbgroup.momis.om
Class WnReverseIndex

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byit.unimo.dbgroup.momis.om.BaseWnReverseIndex
          extended byit.unimo.dbgroup.momis.om.WnReverseIndex
All Implemented Interfaces:
org.apache.torque.om.Persistent, java.io.Serializable

public class WnReverseIndex
extends BaseWnReverseIndex
implements org.apache.torque.om.Persistent

The skeleton for this class was autogenerated by Torque on: [Mon Sep 30 11:06:07 CEST 2002] You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.

See Also:
Serialized Form

Field Summary
private  java.util.Map _glossLength
          Parser generated data structure:
key: synsetId, value: the synset gloss length
private  java.util.Map _glossTermPosition
          Parser generated data structure:
key: synsetId, value: a vector containing all position of the term of the synset gloss length
 
Fields inherited from class it.unimo.dbgroup.momis.om.BaseWnReverseIndex
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
WnReverseIndex()
          Basic constructor
WnReverseIndex(java.lang.String term)
          Construct the object adding the term this is related to
 
Method Summary
 void addSynsetId(org.apache.torque.om.NumberKey synId, int glossLength, java.util.Vector positions)
          Add a synset id and comma to the actual list of synset id in this tuple of WnReverseIndex
NOTA: if the WnReverseIndex is new and the Id is not defined, I'll return the same object retrieved from the database that will contain the right ID.
 int getGlossLen(org.apache.torque.om.NumberKey synsetId)
          Returns the gloss lenght for the given synset.
 int getGlossOccurences(org.apache.torque.om.NumberKey synsetId)
          Returns the occurrences of the term in the gloss of the given synset.
 int getListSize()
          Retrieve how many synsets' glosses contain this term
 void getSynsetIdAsNumberKey(java.util.HashMap glossLengthMap, java.util.HashMap occMap, java.util.HashMap termMap)
           
 void old_getSynsetIdAsNumberKey(java.util.HashMap glossLengthMap, java.util.HashMap occMap, java.util.HashMap termMap)
          Parsing of the string
 void setNotParsed()
          Force to run again the parser at next call
private  void wnSynsetIdListParser()
          Parses the wnSynsetIdList field and fills the private data structures.
 
Methods inherited from class it.unimo.dbgroup.momis.om.BaseWnReverseIndex
copy, copyInto, getByName, getByPeerName, getByPosition, getFieldNames, getPeer, getPrimaryKey, getTerm, getWnReverseIndexId, getWnSynsetIdList, save, save, save, setPrimaryKey, setPrimaryKey, setTerm, setWnReverseIndexId, setWnReverseIndexId, setWnSynsetIdList
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getCategory, getPrimaryKeyAsBigDecimal, getPrimaryKeyAsInt, getPrimaryKeyAsLong, getPrimaryKeyAsString, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

_glossLength

private java.util.Map _glossLength
Parser generated data structure:
key: synsetId, value: the synset gloss length


_glossTermPosition

private java.util.Map _glossTermPosition
Parser generated data structure:
key: synsetId, value: a vector containing all position of the term of the synset gloss length

Constructor Detail

WnReverseIndex

public WnReverseIndex()
Basic constructor


WnReverseIndex

public WnReverseIndex(java.lang.String term)
Construct the object adding the term this is related to

Method Detail

addSynsetId

public void addSynsetId(org.apache.torque.om.NumberKey synId,
                        int glossLength,
                        java.util.Vector positions)
                 throws java.lang.Exception
Add a synset id and comma to the actual list of synset id in this tuple of WnReverseIndex
NOTA: if the WnReverseIndex is new and the Id is not defined, I'll return the same object retrieved from the database that will contain the right ID. -

Parameters:
synId - synset Id
glossLength - length of the synset's gloss
positions - where this term appears in the gloss is a vector since the term can appear several times
Throws:
java.lang.Exception

setNotParsed

public void setNotParsed()
Force to run again the parser at next call


wnSynsetIdListParser

private void wnSynsetIdListParser()
                           throws org.apache.torque.TorqueException
Parses the wnSynsetIdList field and fills the private data structures. -

Throws:
org.apache.torque.TorqueException

getGlossLen

public int getGlossLen(org.apache.torque.om.NumberKey synsetId)
                throws org.apache.torque.TorqueException
Returns the gloss lenght for the given synset.

Throws:
org.apache.torque.TorqueException

getGlossOccurences

public int getGlossOccurences(org.apache.torque.om.NumberKey synsetId)
                       throws org.apache.torque.TorqueException
Returns the occurrences of the term in the gloss of the given synset.

Throws:
org.apache.torque.TorqueException

getSynsetIdAsNumberKey

public void getSynsetIdAsNumberKey(java.util.HashMap glossLengthMap,
                                   java.util.HashMap occMap,
                                   java.util.HashMap termMap)
                            throws org.apache.torque.TorqueException
Parameters:
glossLengthMap - Key: SynsetId, Value: Lenght of the gloss
Throws:
org.apache.torque.TorqueException

old_getSynsetIdAsNumberKey

public void old_getSynsetIdAsNumberKey(java.util.HashMap glossLengthMap,
                                       java.util.HashMap occMap,
                                       java.util.HashMap termMap)
                                throws org.apache.torque.TorqueException
Parsing of the string

Throws:
org.apache.torque.TorqueException

getListSize

public int getListSize()
                throws org.apache.torque.TorqueException
Retrieve how many synsets' glosses contain this term

Throws:
org.apache.torque.TorqueException


Universita' di Modena e Reggio Emilia