Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm
Class Category

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.Category
All Implemented Interfaces:
java.io.Serializable

public class Category
extends MiningObject

An instance of Category represents a value of a categorical attribute, for example, the value "blue" of attribute "color", or number "5" of the attribute "rating". A category may have a display name to be used when ODM displays the category in output results.

Since:
9.0.1
See Also:
Serialized Form

Field Summary
static int MAX_CAT_NAME_LENGTH
           
static int MAX_CAT_VALUE_LENGTH
           

 

Constructor Summary
Category(boolean value)
          Creates a boolean Category instance with display name set to the string representation of the boolean, true or false.
Category(float value)
          Creates a float Category instance with display name set to the string representation of the float.
Category(int value)
          Creates an int Category instance with display name set to the string representation of the int.
Category(java.lang.Object value)
          Creates an object Category instance with display name set to the string representation of the value.
Category(java.lang.String value)
          Creates a string Category instance with display name set to the value.
Category(java.lang.String value, DataType type)
          Creates a Category instance accepting the value as a string with the data type is used for the display name.
Category(java.lang.String displayName, float value)
          Creates a float Category instance with the provided display name.
Category(java.lang.String displayName, int value)
          Creates an int Category instance with the provided display name.
Category(java.lang.String displayName, java.lang.String value)
          Creates a string Category instance with the provided display name.
Category(java.lang.String displayName, java.lang.String value, DataType dataType)
          Creates a Category instance with the provided display name value and data type.

 

Method Summary
 boolean equals(Category cat)
          Returns true if both categories have the same display name and value.
 DataType getDataType()
          Returns the data type of the Category.
 java.lang.String getDisplayName()
          Returns the display name of the Category.
 java.lang.String getValue()
          Returns the value of the Category.
 java.lang.String toString()
          Returns a formatted string representation of the Category instance.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

MAX_CAT_NAME_LENGTH

public static final int MAX_CAT_NAME_LENGTH
See Also:
Constant Field Values

MAX_CAT_VALUE_LENGTH

public static final int MAX_CAT_VALUE_LENGTH
See Also:
Constant Field Values
Constructor Detail

Category

public Category(java.lang.String value,
DataType type)
         throws InvalidArgumentException,
ODMException
Creates a Category instance accepting the value as a string with the data type is used for the display name.
Throws:
InvalidArgumentException -
InvalidArgumentException
ODMException
Since:
9.2.0

Category

public Category(int value)
Creates an int Category instance with display name set to the string representation of the int.
Since:
9.2.0

Category

public Category(float value)
Creates a float Category instance with display name set to the string representation of the float.
Since:
9.2.0

Category

public Category(boolean value)
Creates a boolean Category instance with display name set to the string representation of the boolean, true or false.
Since:
9.2.0

Category

public Category(java.lang.String value)
         throws InvalidArgumentException,
ODMException
Creates a string Category instance with display name set to the value.
Throws:
InvalidArgumentException - when value is null
ODMException - when value length > 4000 characters
InvalidArgumentException
ODMException
Since:
9.2.0

Category

public Category(java.lang.Object value)
         throws InvalidArgumentException,
ODMException
Creates an object Category instance with display name set to the string representation of the value.
Throws:
InvalidArgumentException - when value is null
ODMException - when value is not of type Integer, Float, String or Boolean
InvalidArgumentException
ODMException
Since:
10.1.0

Category

public Category(java.lang.String displayName,
                int value)
         throws InvalidArgumentException,
ODMException
Creates an int Category instance with the provided display name.
Throws:
InvalidArgumentException - when displayName is null
ODMException - when displayName length > 4000 characters.
InvalidArgumentException
ODMException
Since:
9.2.0

Category

public Category(java.lang.String displayName,
                float value)
         throws InvalidArgumentException,
ODMException
Creates a float Category instance with the provided display name.
Throws:
InvalidArgumentException - when displayName is null
ODMException - when displayName length > 4000 characters.
InvalidArgumentException
ODMException
Since:
9.2.0

Category

public Category(java.lang.String displayName,
                java.lang.String value)
         throws InvalidArgumentException,
ODMException
Creates a string Category instance with the provided display name.
Throws:
InvalidArgumentException -
ODMException -
InvalidArgumentException
ODMException
Since:
9.2.0

Category

public Category(java.lang.String displayName,
                java.lang.String value,
DataType dataType)
         throws InvalidArgumentException,
ODMException
Creates a Category instance with the provided display name value and data type.
Throws:
InvalidArgumentException -
ODMException - when value length length > 4000 characters
InvalidArgumentException
ODMException
Method Detail

getValue

public java.lang.String getValue()
Returns the value of the Category.
Returns:
Category value

getDisplayName

public java.lang.String getDisplayName()
Returns the display name of the Category.
Returns:
Category display name

getDataType

public DataType getDataType()
Returns the data type of the Category.
Returns:
Category data type
Since:
9.2.0

toString

public java.lang.String toString()
Returns a formatted string representation of the Category instance.
Overrides:
toString in class java.lang.Object
Returns:
formatted string

equals

public boolean equals(Category cat)
Returns true if both categories have the same display name and value.
Returns:
true if both categories are the same

Copyright © 2003 Oracle Corporation. All Rights Reserved.