com.autonomy.aci.businessobjects
Class Category

java.lang.Object
  extended bycom.autonomy.aci.businessobjects.AciBusinessObject
      extended bycom.autonomy.aci.businessobjects.Category
All Implemented Interfaces:
java.io.Serializable

public class Category
extends AciBusinessObject

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_ENCODING
           
static java.lang.String DEFAULT_LANGUAGE
           
static int DEFAULT_NUM_RESULTS
           
static int DEFAULT_THRESHOLD
           
static java.lang.String HOME_CATEGORY_ID
           
static java.lang.String HOME_CATEGORY_NAME
           
 
Constructor Summary
Category()
           
Category(CategoryPath categorylocation)
           
Category(java.lang.String sCategoryID)
           
 
Method Summary
 void addDatabase(java.lang.String sDatabase)
           
 void addSubCategory(Category subcategory)
          Set a category as a sub-category of this one.
 void addTrainingDoc(CategoryTrainingDocument doc)
           
 void clearCatFields()
          Deletes all existing category fields and their values.
 void clearDatabases()
           
 void clearSubCategories()
          Remove all categories from the list of sub-categories.
 void clearTrainingDocs()
           
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this category.
 java.lang.String getBooleanTraining()
           
 java.util.Set getCatFieldNames()
           
 java.util.HashMap getCatFields()
           
 java.lang.String getCatFieldValue(java.lang.String sFieldname)
           
 java.lang.String getCatFieldValue(java.lang.String sFieldname, java.lang.String sDefaultValue)
           
static java.util.Comparator getComparator()
           
 java.util.ArrayList getDatabases()
           
 java.lang.String getEncoding()
           
 TermsNWeights getGeneratedTermsAndWeights()
           
 java.lang.String getLanguage()
           
 CategoryPath getLocation()
           
 TermsNWeights getModifiedTermsAndWeights()
           
 java.lang.String getName()
           
 int getNumResults()
           
 TermsNWeights getQueryTermsAndWeights()
           
 java.lang.String getStatus()
           
 java.util.ArrayList getSubCategories()
          Obtains the list of categories that are contained within this category in the category hierarchy.
 int getThreshold()
           
 java.util.ArrayList getTrainingDocs()
          Obtains the list of documents that this category is trained on.
 java.lang.String getTrainingText()
           
 boolean hasSubCategories()
           
 void removeCatField(java.lang.String sFieldName)
          Deletes the category parameter entry for the specified field, if it exists.
 void removeSubCategory(Category subcategory)
          Remove a category as a sub-category of this one.
 void removeTrainingDoc(CategoryTrainingDocument doc)
           
 void setBooleanTraining(java.lang.String sBooleanTraining)
           
 void setCatField(java.lang.String sFieldName, java.lang.String sFieldValue)
          Set the value of an category field.
 void setCatFields(java.util.Map fieldMap)
          Replaces any existing category fields with those provided.
 void setDatabases(java.util.ArrayList databaseList)
           
 void setEncoding(java.lang.String sEncoding)
           
 void setGeneratedTermsAndWeights(TermsNWeights termsAndWeights)
           
 void setLanguage(java.lang.String sLanguage)
           
 void setLocation(CategoryPath categorylocation)
           
 void setModifiedTermsAndWeights(TermsNWeights termsAndWeights)
           
 void setName(java.lang.String sName)
           
 void setNumResults(int nNumResults)
           
 void setQueryTermsAndWeights(TermsNWeights termsAndWeights)
           
 void setStatus(java.lang.String sStatus)
           
 void setSubCategories(java.util.ArrayList subCategoryList)
          Specify which categories are contained within this category in the category hierarchy.
 void setThreshold(int nThreshold)
           
 void setTrainingDocs(java.util.List trainingDocsList)
           
 void setTrainingText(java.lang.String sTrainingText)
           
 java.lang.String toString()
           
 
Methods inherited from class com.autonomy.aci.businessobjects.AciBusinessObject
getUID, setUID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOME_CATEGORY_ID

public static final java.lang.String HOME_CATEGORY_ID
See Also:
Constant Field Values

HOME_CATEGORY_NAME

public static final java.lang.String HOME_CATEGORY_NAME
See Also:
Constant Field Values

DEFAULT_LANGUAGE

public static final java.lang.String DEFAULT_LANGUAGE
See Also:
Constant Field Values

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

DEFAULT_THRESHOLD

public static final int DEFAULT_THRESHOLD
See Also:
Constant Field Values

DEFAULT_NUM_RESULTS

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

Category

public Category()

Category

public Category(java.lang.String sCategoryID)

Category

public Category(CategoryPath categorylocation)
Method Detail

setSubCategories

public void setSubCategories(java.util.ArrayList subCategoryList)
Specify which categories are contained within this category in the category hierarchy.

Parameters:
subCategoryList - an ArrayList of Categorys which are sub-categories of this category.

addSubCategory

public void addSubCategory(Category subcategory)
Set a category as a sub-category of this one. The category is added as the last in the list of sub-categories.

Parameters:
subcategory - the sub-category to add. This should be a fully populated category preferably as read in using a LauneService.

removeSubCategory

public void removeSubCategory(Category subcategory)
Remove a category as a sub-category of this one.

Parameters:
subcategory - the sub-category to remove. This must have at least the category ID set.

clearSubCategories

public void clearSubCategories()
Remove all categories from the list of sub-categories.


getSubCategories

public java.util.ArrayList getSubCategories()
Obtains the list of categories that are contained within this category in the category hierarchy.

Returns:
an ArrayList of Categorys.

getName

public java.lang.String getName()

setName

public void setName(java.lang.String sName)

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String sEncoding)

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String sLanguage)

getStatus

public java.lang.String getStatus()

setStatus

public void setStatus(java.lang.String sStatus)

getThreshold

public int getThreshold()

setThreshold

public void setThreshold(int nThreshold)

getNumResults

public int getNumResults()

setNumResults

public void setNumResults(int nNumResults)

getDatabases

public java.util.ArrayList getDatabases()

clearDatabases

public void clearDatabases()

addDatabase

public void addDatabase(java.lang.String sDatabase)

setDatabases

public void setDatabases(java.util.ArrayList databaseList)

getTrainingText

public java.lang.String getTrainingText()

setTrainingText

public void setTrainingText(java.lang.String sTrainingText)

getBooleanTraining

public java.lang.String getBooleanTraining()

setBooleanTraining

public void setBooleanTraining(java.lang.String sBooleanTraining)

getQueryTermsAndWeights

public TermsNWeights getQueryTermsAndWeights()

setQueryTermsAndWeights

public void setQueryTermsAndWeights(TermsNWeights termsAndWeights)

getGeneratedTermsAndWeights

public TermsNWeights getGeneratedTermsAndWeights()

setGeneratedTermsAndWeights

public void setGeneratedTermsAndWeights(TermsNWeights termsAndWeights)

getModifiedTermsAndWeights

public TermsNWeights getModifiedTermsAndWeights()

setModifiedTermsAndWeights

public void setModifiedTermsAndWeights(TermsNWeights termsAndWeights)

setTrainingDocs

public void setTrainingDocs(java.util.List trainingDocsList)

addTrainingDoc

public void addTrainingDoc(CategoryTrainingDocument doc)

removeTrainingDoc

public void removeTrainingDoc(CategoryTrainingDocument doc)

clearTrainingDocs

public void clearTrainingDocs()

getTrainingDocs

public java.util.ArrayList getTrainingDocs()
Obtains the list of documents that this category is trained on.

Returns:
an ArrayList of Documents representing the training documents.

setCatFields

public void setCatFields(java.util.Map fieldMap)
Replaces any existing category fields with those provided. Both the keys and the values assosciated in the Map must be Strings.

Parameters:
fieldMap - a Map assosciating String pairs representing the field names and values.

setCatField

public void setCatField(java.lang.String sFieldName,
                        java.lang.String sFieldValue)
Set the value of an category field. If the specified field does not already exist, a new one is created. If the field is already set, it's value is overwritten with the new value.

Parameters:
sFieldName - the name of the category field to set.
sFieldValue - the value to give the field (can be null).

removeCatField

public void removeCatField(java.lang.String sFieldName)
Deletes the category parameter entry for the specified field, if it exists.

Parameters:
sFieldName - the name of the field to delete.

clearCatFields

public void clearCatFields()
Deletes all existing category fields and their values.


getCatFields

public java.util.HashMap getCatFields()

getCatFieldNames

public java.util.Set getCatFieldNames()

getCatFieldValue

public java.lang.String getCatFieldValue(java.lang.String sFieldname,
                                         java.lang.String sDefaultValue)

getCatFieldValue

public java.lang.String getCatFieldValue(java.lang.String sFieldname)

getLocation

public CategoryPath getLocation()

setLocation

public void setLocation(CategoryPath categorylocation)

clone

public java.lang.Object clone()

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this category. This is taken to mean that they have the same unique ID.

Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

getComparator

public static java.util.Comparator getComparator()

toString

public java.lang.String toString()

hasSubCategories

public boolean hasSubCategories()