sg.edu.nus.comp.nlp.ims.lexelt
Class ALexelt

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.lexelt.ALexelt
All Implemented Interfaces:
java.io.Serializable, ILexelt
Direct Known Subclasses:
CLexelt

public abstract class ALexelt
extends java.lang.Object
implements ILexelt

abstract lexelt.

Author:
zhongzhi
See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<java.lang.String> m_IDs
           
protected  java.util.ArrayList<IInstance> m_Instances
           
protected  java.lang.String m_LexeltID
           
protected  IStatistic m_Statistic
           
 
Constructor Summary
ALexelt(java.lang.String p_LexeltID)
          constructor with lexelt id
 
Method Summary
 boolean addInstance(IInstance p_Instance)
          the same as addInstance(p_iInstance, false)
 java.lang.String getID()
          get the ID of this lexelt
 IInstance getInstance(int p_Index)
          get instance with index p_Index
 java.lang.String getInstanceDocID(int p_Index)
          get the document id of instance p_Index
 java.lang.String getInstanceID(int p_Index)
          get the instance id of instance p_Index
 java.util.ArrayList<java.lang.String> getInstanceIDs()
          get the instance id list of all the instances in Lexelt
 IStatistic getStatistic()
          get the statistic information of this lexelt
 java.util.ArrayList<java.lang.String> getTag(int p_Index)
          get the tags of instance
 java.util.ArrayList<java.lang.String> getTag(java.lang.String p_InstanceID)
          get the tag of p_InstanceID
 java.lang.String getValue(int p_Index, int p_KeyIndex)
          get the p_Key's value of instance p_Index
 java.lang.String getValue(int p_Index, java.lang.String p_Key)
          get the p_Key's value of instance p_Index
 java.lang.String getValue(java.lang.String p_InstanceID, java.lang.String p_Key)
          get the p_Key's value of instance p_InstanceID
 IInstance removeInstance(java.lang.String p_InstanceID)
          remove the instance of index p_Index.
 boolean setStatistic(IStatistic p_Statistic)
          set the statistic information to the lexelt
 int size()
          get the number of instances in lexelt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sg.edu.nus.comp.nlp.ims.lexelt.ILexelt
addInstance, removeInstance
 

Field Detail

m_Statistic

protected IStatistic m_Statistic

m_IDs

protected java.util.ArrayList<java.lang.String> m_IDs

m_Instances

protected java.util.ArrayList<IInstance> m_Instances

m_LexeltID

protected java.lang.String m_LexeltID
Constructor Detail

ALexelt

public ALexelt(java.lang.String p_LexeltID)
constructor with lexelt id

Parameters:
p_LexeltID - lexelt id
Method Detail

getID

public java.lang.String getID()
Description copied from interface: ILexelt
get the ID of this lexelt

Specified by:
getID in interface ILexelt
Returns:
lexelt ID

getInstanceIDs

public java.util.ArrayList<java.lang.String> getInstanceIDs()
Description copied from interface: ILexelt
get the instance id list of all the instances in Lexelt

Specified by:
getInstanceIDs in interface ILexelt
Returns:
instance id list

getStatistic

public IStatistic getStatistic()
Description copied from interface: ILexelt
get the statistic information of this lexelt

Specified by:
getStatistic in interface ILexelt
Returns:
the statistic information

getInstanceID

public java.lang.String getInstanceID(int p_Index)
Description copied from interface: ILexelt
get the instance id of instance p_Index

Specified by:
getInstanceID in interface ILexelt
Parameters:
p_Index - instance id
Returns:
instance id

getInstanceDocID

public java.lang.String getInstanceDocID(int p_Index)
Description copied from interface: ILexelt
get the document id of instance p_Index

Specified by:
getInstanceDocID in interface ILexelt
Parameters:
p_Index - instance id
Returns:
doc id

size

public int size()
Description copied from interface: ILexelt
get the number of instances in lexelt

Specified by:
size in interface ILexelt
Returns:
size

getTag

public java.util.ArrayList<java.lang.String> getTag(java.lang.String p_InstanceID)
Description copied from interface: ILexelt
get the tag of p_InstanceID

Specified by:
getTag in interface ILexelt
Parameters:
p_InstanceID - instance id
Returns:
instance tags

getTag

public java.util.ArrayList<java.lang.String> getTag(int p_Index)
Description copied from interface: ILexelt
get the tags of instance

Specified by:
getTag in interface ILexelt
Parameters:
p_Index - instance index
Returns:
instance tags

getValue

public java.lang.String getValue(java.lang.String p_InstanceID,
                                 java.lang.String p_Key)
Description copied from interface: ILexelt
get the p_Key's value of instance p_InstanceID

Specified by:
getValue in interface ILexelt
Parameters:
p_InstanceID - instance id
p_Key - feature name
Returns:
feature value

getValue

public java.lang.String getValue(int p_Index,
                                 java.lang.String p_Key)
Description copied from interface: ILexelt
get the p_Key's value of instance p_Index

Specified by:
getValue in interface ILexelt
Parameters:
p_Index - instance index
p_Key - feature name
Returns:
feature value

getValue

public java.lang.String getValue(int p_Index,
                                 int p_KeyIndex)
Description copied from interface: ILexelt
get the p_Key's value of instance p_Index

Specified by:
getValue in interface ILexelt
Parameters:
p_Index - instance index
p_KeyIndex - feature index
Returns:
feature value

getInstance

public IInstance getInstance(int p_Index)
Description copied from interface: ILexelt
get instance with index p_Index

Specified by:
getInstance in interface ILexelt
Parameters:
p_Index - instance index
Returns:
instance

addInstance

public boolean addInstance(IInstance p_Instance)
Description copied from interface: ILexelt
the same as addInstance(p_iInstance, false)

Specified by:
addInstance in interface ILexelt
Parameters:
p_Instance - instance
Returns:
add success or not

setStatistic

public boolean setStatistic(IStatistic p_Statistic)
Description copied from interface: ILexelt
set the statistic information to the lexelt

Specified by:
setStatistic in interface ILexelt
Parameters:
p_Statistic - statistic information
Returns:
success or not

removeInstance

public IInstance removeInstance(java.lang.String p_InstanceID)
Description copied from interface: ILexelt
remove the instance of index p_Index. whether the information of this instance will be removed from the statistic is according to the implementation

Specified by:
removeInstance in interface ILexelt
Parameters:
p_InstanceID - instance id
Returns:
removed instance