001    /**
002     * CRNIndexEntry.java
003     * jCOLIBRI2 framework. 
004     * @author 
005     * 14/12/2007
006     */
007    package jcolibri.extensions.textual.IE.common.crn;
008    
009    
010    public class CRNIndexEntry 
011    {
012    /**
013     * This represents a single entry in the Indexing structure comprising the Token (word, phrase or sentence), 
014     * caseId and the frequency of the unit in the particular Case
015     * @author iaa
016     */
017    
018        private String unit;
019        private Object caseId; 
020        private short freq;
021        
022        /** Creates a new instance of CRNIndexEntry */
023        public CRNIndexEntry(String unit,Object caseId,short freq) 
024        {
025            this.unit= unit;
026            this.caseId= caseId;
027            this.freq= freq;
028        }
029        
030        /** Returns the textual unit in this entry 
031         * @return The textual unit being indexed
032         */
033        public String getUnit()
034        {
035            return unit;
036        }
037        
038        /** Returns the caseId in this entry 
039         * @return ID of the case containing the textual unit
040         */
041        public Object getCaseId()
042        {
043            return caseId;
044        }
045        
046        /** Returns the frequency in this entry 
047         * @return Frequency of the textual unit in the case
048         */
049        public short getFreq()
050        {
051            return freq;
052        }
053        
054        public void print()
055        {
056            System.out.println(unit+ " "+ caseId.toString()+ " " + freq);
057        }
058    }