com.autonomy.aci.services
Interface ChannelsFunctionality


public interface ChannelsFunctionality


Method Summary
 AciResponse buildCategory(Category category, boolean bBuildChildren)
           
 Category copyCategory(Category category, java.lang.String sNewCategoryName, Category newParentCategory)
           
 Category createCategory(Category category, Category parent)
          Creates and builds a new category.
 AciResponse deleteCategory(Category category)
           
 Category getCategory(java.lang.String sCatID)
          Read the details of a category on the IDOL server and populate a Category object with this information.
 Category getCategoryHierarchy(Category category, boolean bExpandAll)
          Read the category sub-hierarchy headed by a given category.
 ResultList getCategoryResults(Category category, java.util.ArrayList alCategoryGetResultsParams)
          Retrieve the documents that currently match a category's training.
 java.util.ArrayList getCategorySuggest(java.lang.String queryText, java.util.ArrayList alSuggestParameters)
          Suggest categories in IDOL that are similar to a given query text.
 java.util.ArrayList getSimilarCategories(Category category, java.util.ArrayList alSuggestParameters)
          Find categories in IDOL that are similar to a given category.
 AciResponse importCategoriesFromXML(java.lang.String sImportFileName, Category parentCategory)
           
 Category moveCategory(Category category, Category newParent)
           
 Category replaceCategory(Category replacementCategory, Category originalCategory)
           
 Category updateCategory(Category category)
          Update and build a category.
 

Method Detail

getCategoryHierarchy

public Category getCategoryHierarchy(Category category,
                                     boolean bExpandAll)
                              throws AciException,
                                     InvalidCategoryException
Read the category sub-hierarchy headed by a given category. This can also mean the entire category hierarchy stored on IDOL. Note that the Category objects that make up the hierarchy only have the category ID and name set - you should call getCategory to read a category's full details and training from IDOL.

Parameters:
category - The category to return hierarchy details for. This can be null in which case the hierarchy for the root (0) category is returned.
bExpandAll - whether all sub-categories should be read or just the first level of child categories.
Returns:
a Category hierarchy starting from the given category or the root (home) category if this was null.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the parent categories does not exist.

getCategory

public Category getCategory(java.lang.String sCatID)
                     throws AciException,
                            InvalidCategoryException
Read the details of a category on the IDOL server and populate a Category object with this information. The category's basic and hierarchical details, fields, training and terms and weights are read in during this operation.

Parameters:
sCatID - the unique ID of the category to read.
Returns:
a fully populated Category as stored on the IDOL server.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the parent categories does not exist.

createCategory

public Category createCategory(Category category,
                               Category parent)
                        throws AciException,
                               InvalidCategoryException,
                               IDOLException
Creates and builds a new category.

Parameters:
category - the details of the category to create. Must have at least a category name set.
parent - the category whose child the new category should be. If null the new category is created under the root category.
Returns:
details of the new category including category ID and terms and weights infomation.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the parent categories does not exist.
IDOLException - if error is return by IDOL server.

buildCategory

public AciResponse buildCategory(Category category,
                                 boolean bBuildChildren)
                          throws AciException,
                                 InvalidCategoryException
Throws:
AciException
InvalidCategoryException

copyCategory

public Category copyCategory(Category category,
                             java.lang.String sNewCategoryName,
                             Category newParentCategory)
                      throws AciException,
                             InvalidCategoryException
Parameters:
category - the category to copy. Must have at least a category ID set.
sNewCategoryName - the name to give the new category copy.
newParentCategory - the category whose child the new category should be. If null the new copy has the same parent as the original category.
Returns:
details of the new category.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if either of the original or new parent categories does not exist.

moveCategory

public Category moveCategory(Category category,
                             Category newParent)
                      throws AciException,
                             InvalidCategoryException
Throws:
AciException
InvalidCategoryException

replaceCategory

public Category replaceCategory(Category replacementCategory,
                                Category originalCategory)
                         throws AciException,
                                InvalidCategoryException
Throws:
AciException
InvalidCategoryException

deleteCategory

public AciResponse deleteCategory(Category category)
                           throws AciException,
                                  InvalidCategoryException
Throws:
AciException
InvalidCategoryException

updateCategory

public Category updateCategory(Category category)
                        throws AciException,
                               InvalidCategoryException
Update and build a category. This will update all the details that are set on the given category. Training is updated to reflect exactly what is set on the given category - to make sure no training is lost, the category must have been read from IDOL using e.g. getCategory(String).

Parameters:
category - the category to update.
Returns:
the category with updated terms and weights.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the category provided does not exist on IDOL.

getCategoryResults

public ResultList getCategoryResults(Category category,
                                     java.util.ArrayList alCategoryGetResultsParams)
                              throws AciException,
                                     InvalidCategoryException,
                                     DataStoreNotFoundException
Retrieve the documents that currently match a category's training.

Parameters:
category - the category whose results are required.
alCategoryGetResultsParams - extra parameters to send when retrieving category results. Parameters set here will override any parameters set by the category. Can be null.
Returns:
a ResultList containing the documents matching the category's training.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the category does not exist.
DataStoreNotFoundException - if the content partition of IDOL was not available.

getCategorySuggest

public java.util.ArrayList getCategorySuggest(java.lang.String queryText,
                                              java.util.ArrayList alSuggestParameters)
                                       throws AciException,
                                              InvalidCategoryException
Suggest categories in IDOL that are similar to a given query text. This sends a "CategorySuggestFromText" action to IDOL with the given query text. Number of result and threshold values can be specified by setting the parameters in the ArrayList.

Parameters:
queryText - the String for which suggected categories should be found.
alSuggestParameters - any additional parameters to be sent with the action. Values set here will override any that are normally set by this method.
Returns:
an ArrayList of Categorys which have been found to match the given query text.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the category does not exist.

importCategoriesFromXML

public AciResponse importCategoriesFromXML(java.lang.String sImportFileName,
                                           Category parentCategory)
                                    throws AciException,
                                           InvalidCategoryException,
                                           InvalidImportFileException
Throws:
AciException
InvalidCategoryException
InvalidImportFileException

getSimilarCategories

public java.util.ArrayList getSimilarCategories(Category category,
                                                java.util.ArrayList alSuggestParameters)
                                         throws AciException,
                                                InvalidCategoryException
Find categories in IDOL that are similar to a given category. This sends a "CategorySuggestFromCategory" action to IDOL with the given category ID. Number of result and threshold values can be specified by setting the parameters in the ArrayList.

Parameters:
category - the Category for which similar categories should be found.
alSuggestParameters - any additional parameters to be sent with the action. Values set here will override any that are normally set by this method.
Returns:
an ArrayList of Categorys which have been found to match the given category.
Throws:
AciException - if there was an error when making the request.
InvalidCategoryException - if the specified category does not exist on IDOL.