Class Variable

java.lang.Object
  |
  +--Variable
All Implemented Interfaces:
java.lang.Cloneable

public class Variable
extends java.lang.Object
implements java.lang.Cloneable

Variable.java, This class contains the information needed for variables along with the methods to check if a given O/R can be added to a pre-existing varialbe.


Field Summary
protected  boolean compressibility
          Flag that tell the 3DVR unit if the variable can be simplified to a specific object or relation
 java.util.BitSet feature
          Feature vector that represents the intersection of the features of the mapped objects/relations
 int group
          group_id Number used in handle and generation
 java.util.LinkedList grouped_objects
          linkedlist containing all the objects or relations mapped to this variable
protected  java.lang.String handle
          Name of the variable
 java.lang.String type
          tells if the variable descripes a set of O's or R's
 
Constructor Summary
Variable(DATA info, java.lang.String word, java.lang.String lexeme, java.lang.String type, int variable_number, int for_index)
          Constructor, makes a new variable from the given string representation of a word
Variable(java.util.Hashtable orhash, java.lang.String word, java.lang.String lexeme, java.lang.String type, int variable_number, int for_index)
          Constructor, makes a new variable from the given string representation of a word
 
Method Summary
 boolean add(DATA info, java.lang.String word)
          addition method that adds additional objects/relations to variable if there is an intersection in their ORVectors
 boolean add(java.util.Hashtable orhash, java.lang.String word)
          addition method that adds additional objects/relations to variable if there is an intersection in their ORVectors
 java.lang.Object clone()
          Clone variable.
 boolean get_compressibility()
          compressibility lookup method
 java.lang.String get_handle()
          handle lookup method
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

protected java.lang.String handle
Name of the variable

type

public java.lang.String type
tells if the variable descripes a set of O's or R's

grouped_objects

public java.util.LinkedList grouped_objects
linkedlist containing all the objects or relations mapped to this variable

feature

public java.util.BitSet feature
Feature vector that represents the intersection of the features of the mapped objects/relations

compressibility

protected boolean compressibility
Flag that tell the 3DVR unit if the variable can be simplified to a specific object or relation

group

public int group
group_id Number used in handle and generation
Constructor Detail

Variable

public Variable(DATA info,
                java.lang.String word,
                java.lang.String lexeme,
                java.lang.String type,
                int variable_number,
                int for_index)
Constructor, makes a new variable from the given string representation of a word
Parameters:
info - The DATA node that contains a ORTable, and a LXTable
word - The first object/relation
lexeme - The lexeme that this variable refers to
type - If it is an O or a R
variable_number - A key used to specify what variable is being talked about
for_index - A sub-key used for distingishing variables to the same EnumEntry

Variable

public Variable(java.util.Hashtable orhash,
                java.lang.String word,
                java.lang.String lexeme,
                java.lang.String type,
                int variable_number,
                int for_index)
Constructor, makes a new variable from the given string representation of a word
Parameters:
orhash - The ORTable
word - The first object/relation
lexeme - The lexeme that this variable refers to
type - If it is an O or a R
variable_number - A key used to specify what variable is being talked about
for_index - A sub-key used for distingishing variables to the same EnumEntry
Method Detail

clone

public java.lang.Object clone()
Clone variable. This overrided clone method does deep copying.
Overrides:
clone in class java.lang.Object

get_handle

public java.lang.String get_handle()
handle lookup method
Returns:
the handle of the variable

get_compressibility

public boolean get_compressibility()
compressibility lookup method
Returns:
the compressibility flag

add

public boolean add(DATA info,
                   java.lang.String word)
addition method that adds additional objects/relations to variable if there is an intersection in their ORVectors
Parameters:
info - the DATA node containing the ORTable
word - the object/relation to be added to the variable
Returns:
success flag

add

public boolean add(java.util.Hashtable orhash,
                   java.lang.String word)
addition method that adds additional objects/relations to variable if there is an intersection in their ORVectors
Parameters:
orhash - the ORTable
word - the object/relation to be added to the variable
Returns:
success flag