textclassifier.mining
Class fitem

java.lang.Object
  extended by textclassifier.mining.fitem

public class fitem
extends java.lang.Object

Class representing an item of a frequent itemset


Field Summary
 int type
          Data type (from java.sql)
 
Constructor Summary
fitem(java.lang.String attribute_name, double attribute_value)
          Constructor of the item with double value
fitem(java.lang.String attribute_name, int attribute_value)
          Constructor of the item with integer value
fitem(java.lang.String attribute_name, java.lang.String attribute_value)
          Constructor of the item with string value
 
Method Summary
 boolean covers(fitem fitem2)
          Tests if the items is covered by other item
 boolean equals(java.lang.Object ofitem2)
          Tests if two items are equal
 java.lang.String getAttributeName()
          Returns a name of attribute in the item
 int getAttributeNameMyHash()
          Returns a hashed value generated form the name of the attribute
 int getAttributeType()
          Returns java.sql type of the value in the item
 double getAttributeValueDouble()
          Returns the value of the item, if its type is double
 int getAttributeValueInt()
          Returns the value of the item, if its type is integer
 java.lang.String getAttributeValueString()
          Returns the value of the item, if its type is string
 DiscInterval getDiscretedInterval()
          Returns a discretized interval, if an item is discretized, else null
 java.lang.String getStringCondition()
          Returns an SQL condition for WHERE clause corresponding to the content of the item
 int hashCode()
          Returns a hashed code of the whole system - it takes both attribute name and its value
 boolean isAttributeDouble()
          Tests if the attribute type is double
 boolean isAttributeInt()
          Tests if the attribute type is integer
 boolean isAttributeString()
          Tests if the attribute type is string
 boolean isDiscreted()
          Tests if an item contains discretized interval
 void setDiscretedInterval(DiscInterval d)
          Sets a discretized interval of the item
 java.lang.String toString()
          Converts information about the item into a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type
Data type (from java.sql)

Constructor Detail

fitem

public fitem(java.lang.String attribute_name,
             java.lang.String attribute_value)
Constructor of the item with string value

Parameters:
attribute_name - attribute of the item
attribute_value - string value of the item

fitem

public fitem(java.lang.String attribute_name,
             int attribute_value)
Constructor of the item with integer value

Parameters:
attribute_name - attribute of the item
attribute_value - integer value of the item

fitem

public fitem(java.lang.String attribute_name,
             double attribute_value)
Constructor of the item with double value

Parameters:
attribute_name - attribute of the item
attribute_value - double value of the item
Method Detail

getDiscretedInterval

public DiscInterval getDiscretedInterval()
Returns a discretized interval, if an item is discretized, else null

Returns:
discretized interval

setDiscretedInterval

public void setDiscretedInterval(DiscInterval d)
Sets a discretized interval of the item

Parameters:
d - discretized interval

isDiscreted

public boolean isDiscreted()
Tests if an item contains discretized interval

Returns:
boolean value, true if an item is dicretized

toString

public java.lang.String toString()
Converts information about the item into a string

Overrides:
toString in class java.lang.Object
Returns:
string with informations about the item

getAttributeName

public java.lang.String getAttributeName()
Returns a name of attribute in the item

Returns:
string containing the attribute name

getAttributeNameMyHash

public int getAttributeNameMyHash()
Returns a hashed value generated form the name of the attribute

Returns:
integer value containing the hash

getAttributeType

public int getAttributeType()
Returns java.sql type of the value in the item

Returns:
type of value

isAttributeInt

public boolean isAttributeInt()
Tests if the attribute type is integer

Returns:
boolean value, true if the type is integer

isAttributeString

public boolean isAttributeString()
Tests if the attribute type is string

Returns:
boolean value, true if the type is string

isAttributeDouble

public boolean isAttributeDouble()
Tests if the attribute type is double

Returns:
boolean value, true if the type is double

getStringCondition

public java.lang.String getStringCondition()
Returns an SQL condition for WHERE clause corresponding to the content of the item

Returns:
string with SQL condition

getAttributeValueString

public java.lang.String getAttributeValueString()
Returns the value of the item, if its type is string

Returns:
a string value of the item

getAttributeValueInt

public int getAttributeValueInt()
Returns the value of the item, if its type is integer

Returns:
an integer value of the item

getAttributeValueDouble

public double getAttributeValueDouble()
Returns the value of the item, if its type is double

Returns:
a double value of the item

hashCode

public int hashCode()
Returns a hashed code of the whole system - it takes both attribute name and its value

Overrides:
hashCode in class java.lang.Object
Returns:
integer hash code

equals

public boolean equals(java.lang.Object ofitem2)
Tests if two items are equal

Overrides:
equals in class java.lang.Object
Parameters:
ofitem2 - the second item to compare
Returns:
boolean value, true if two items are equal

covers

public boolean covers(fitem fitem2)
Tests if the items is covered by other item

Parameters:
fitem2 - the second tested item
Returns:
boolean value, true if one item is covered by the other