SAP NetWeaver '04

com.sapportals.wcm.service.indexmanagement.retrieval.classification
Class AbstractClassificationIndex

[contained in: com.sap.km.cm.service.par - km.shared.service.indexmanagement_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.service.indexmanagement.AbstractIndex
        |
        +--com.sapportals.wcm.service.indexmanagement.retrieval.classification.AbstractClassificationIndex
All Implemented Interfaces:
IIndex

public abstract class AbstractClassificationIndex
extends AbstractIndex

The AbstractClassificationIndex offers classification functionality, which is independent from the index implementation.


Inner classes inherited from class com.sapportals.wcm.service.indexmanagement.AbstractIndex
AbstractIndex.ErrorState, AbstractIndex.IndexingState, AbstractIndex.Reindexer, AbstractIndex.RunningState, AbstractIndex.WhatToIndex
 
Field Summary
protected  java.util.Map m_inboxFiller
           
protected static java.lang.String m_taxonomyRmPrefix
           
protected static boolean m_useBestClasses
           
 
Fields inherited from class com.sapportals.wcm.service.indexmanagement.AbstractIndex
CFG_PLUGIN_CM_INDEXES, CFG_PLUGIN_CM_INDEXES_INDEX_FOLDERS, INDEX_STRING_AS_STRING, m_crawlerProfileId, m_crawlerQueue, m_indexFolders, m_indexGroup, m_indexId, m_indexName, m_isActive, m_serviceId, m_serviceUserId, PROPERTIES
 
Constructor Summary
AbstractClassificationIndex(java.lang.String indexId, java.lang.String indexName, java.lang.String indexGroup, IIndexFolderList indexFolders, java.lang.String serviceId, java.lang.String serviceUserId, java.util.Properties indexServiceProperties)
          Deprecated. as of NW04. Use constructor with crawler profile ID
AbstractClassificationIndex(java.lang.String indexId, java.lang.String indexName, java.lang.String indexGroup, IIndexFolderList indexFolders, java.lang.String serviceId, java.lang.String crawlerProfileId, java.lang.String serviceUserId, java.util.Properties indexServiceProperties)
           
 
Method Summary
protected  void addResourceToClassificationIndex(RID resourceRID, IResourceContext context)
          Adds a resource to the list of resources that are index in the index.
 void addTaxonomy(java.lang.String taxonomy)
          Deprecated. as of NW04. Use addTaxonomy(String,IResourceContext)
 void addTaxonomy(java.lang.String taxonomy, IResourceContext context)
          Add Taxonomy to the AbstractClassificationIndex object.
 void autoClassifyDocs(java.lang.String taxonomyName, IResourceContext context)
          Requests proposals for the best categories for documents that have no classification and sets these categories automatically as document classification.
 void autoClassifyDocs(java.lang.String taxonomyName, IResourceList docList, IResourceContext context)
          Requests proposals for the best categories for the documents and sets these categories automatically as document classification.
 void autoClassifyDocs(java.lang.String taxonomyName, IRidList docRidList, IResourceContext context)
          Requests proposals for the best categories for the documents and sets these categories automatically as document classification.
 void checkUpdateTaxonomyStateDuringStartUp()
           
 java.util.Collection classifyDocuments(IResourceList resourceDocuments, java.lang.String taxonomyName)
          Classifies documents (which taxonomy class folders do the documents fit best)
 java.util.Collection classifyDocuments(IResourceList resourceDocuments, java.lang.String taxonomyName, float threshold, int maxResults)
          Classifies documents (which taxonomy class folders do the documents fit best).
 java.util.Collection classifyDocuments(IResourceList resourceDocuments, java.lang.String taxonomyName, int maxResults)
          Classifies documents (which taxonomy class folders do the documents fit best)
protected  ICollection createTaxRmIndexFolder(IResourceContext context)
          Creates the folder that represents the index in the taxonomy repository.
 void deleteClassificationProperties(IResource resource)
           
protected  void deleteIndexTaxDocClassification(IRidList documentIDs)
          Deletes the classification of the documents regarding the taxonomies of this index.
protected  void deleteTaxRmIndexFolder(IResourceContext context)
          Deletes the whole folder hierarchy of an index in the taxonomy repository.
 void finishXPostClear()
           
static void getAllCollections(ICollection col, IResourceList resources)
           
 java.util.Collection getBestClasses(IResourceList resourceDocuments, java.lang.String taxonomyName)
           
 java.util.Collection getBestClasses(IResourceList resourceDocuments, java.lang.String taxonomyName, java.util.Map thresholds)
           
 java.util.Collection getBestClassesOld(IResourceList resourceDocuments, java.lang.String taxonomyName)
           
 IRidList getClassDocumentRids(ICollection taxonomyClass)
          Gets the resource IDs of all documents of a taxonomy class
 IRidList getClassDocumentRids(RID taxonomyClassRid, IResourceContext context)
          Gets the resource IDs of all documents of a taxonomy class
 IResourceList getClassDocuments(ICollection taxonomyClass)
          Gets all documents of a taxonomy class
 IResourceList getClassDocuments(RID taxonomyClassRid, IResourceContext context)
          Gets all documents of a taxonomy class
 IDocClassificationMap getDocClassification(IResource document)
          Gets the classification that has been set for the document.
 IDocClassificationMapList getDocListClassification(IResourceList documents)
          Gets the classifications that have been set for the documents.
 java.util.Map getDocumentClassification(IResource document)
          Deprecated. as of NW04. Use getDocClassification(IResource)
 ClassificationStatus getDocumentClassificationStatus(IResource document, java.lang.String taxonomyName)
           
 IRidList getDocumentRidsNeverToClassify(java.lang.String taxonomyName, IResourceContext context)
          Gets all rids of documents of an index that have the status "never to classify" within a taxonomy
 IRidList getDocumentRidsToClassify(java.lang.String taxonomyName, IResourceContext context)
          Gets all rids of documents of an index that have the status "to classify" within a taxonomy
 IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName)
          Deprecated. as of NW04.
 IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName, IResourceContext context)
          Gets all documents of an index that have the status "never to classify" within a taxonomy
 IResourceList getDocumentsToClassify(java.lang.String taxonomyName)
          Deprecated. as of NW04.
 IResourceList getDocumentsToClassify(java.lang.String taxonomyName, IResourceContext context)
          Gets all documents of an index that have the status "to classify" within a taxonomy
 IRidList getDocumentTrainingClasses(IResource document)
           
 IRidList getManuallyDeclassifiedClasses(IResource document)
           
protected  IPropertyName getPropertyNameTaxonomy(java.lang.String taxonomyName)
           
 IQueryFolder getQueryFolder(RID taxonomyClassRid)
          Gets a query folder instance
 RID getSpecialFolderRID(java.lang.String taxonomyName, SpecialFolder specialFolderType)
           
 java.util.List getTaxonomies()
          Get the Taxonomies attribute of the AbstractClassificationIndex object.
 BestClassesSensitivity getTaxonomyBestClassesSensitivity(java.lang.String taxonomyName)
          Gets the sensitivity level of the best classes algorithm
 float getTaxonomyClassificationThreshold(java.lang.String taxonomyName, java.lang.String thresholdId)
          Gets the threshold of a taxonomy
 java.lang.String getTaxonomyRmPrefix()
          Get the TaxonomyRmPrefix attribute of the AbstractClassificationIndex object.
 RID getTaxonomyTrainingRid(java.lang.String taxonomyName)
          Gets the uri of the root folder of the hierarchy that has been used to train/create the given taxonomy.
 URI getTaxonomyTrainingUri(java.lang.String taxonomyName)
          Deprecated. as of NW04. Use getTaxonomyTrainingRid(String)
 TaxonomyType getTaxonomyType(java.lang.String taxonomyName)
           
 UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName)
           
 UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName, java.util.Locale locale)
           
 boolean hasTaxonomy(java.lang.String name)
           
 void indexDocument(IResource resource, java.lang.String taxonomyName, IRidList taxonomyClasses, boolean isSearchRelevant)
          indexes a document (method for internal use)
 void indexDocument(IResource resource, java.lang.String taxonomyName, IUriList taxonomyClasses, boolean isSearchRelevant)
          Deprecated. as of NW04. Use indexDocument(IResource, String, IRidList, boolean)
protected abstract  void indexDocumentClassification(IResource document, IIndexService indexService)
           
 void indexDocuments(IResourceList resources)
          Indexes a list of documents
 void indexDocuments(IResourceList resources, boolean reindexMode, boolean sendLinkEvents)
          Indexes a list of documents
 void indexDocuments(IResourceList resources, java.lang.String taxonomyName, IRidList taxonomyClasses, boolean isSearchRelevant)
          Indexes a list of documents (method for internal use)
 void indexDocuments(IResourceList resources, java.lang.String taxonomyName, IUriList taxonomyClasses, boolean isSearchRelevant)
          Deprecated. as of NW04. Use indexDocuments(IResourceList, String, IRidList, boolean)
 void indexManualTrainDocs()
           
 void initTaxonomies(java.util.List taxonomies)
          Sets the index taxonomies initially before generating the index.
protected abstract  java.util.Collection internalClassifyDocuments(IResourceList resourceDocuments, java.lang.String taxonomyName, float threshold, int maxResults)
          Classifies documents (which taxonomy class folders do the documents fit best)
protected  void internalIndexDocuments(IResourceList resources, IResourceEvent resourceEvent)
          indexes a list of documents (method for internal use)
protected abstract  void internalIndexDocuments(IResourceList resources, java.lang.String taxonomyName, IRidList taxonomyClasses, IResourceEvent resourceEvent, boolean isSearchRelevant, boolean reindexMode, boolean sendLinkEvents)
          Indexes a list of documents (method for internal use)
 boolean isDocClassifiedInAnyTax(IResource resource)
           
 boolean isIndexOnlyClassifiedDocs()
          Returns true, if only documents are indexed, which could be assigned to categories.
 boolean isManuallyDeclassifiedDocument(IResource document, RID taxonomyClassRid)
           
 boolean isTrainingDocument(IResource document, RID taxonomyClassRid)
           
protected  void reindexPostClear(IIndexFolderList preClearIndexFolders)
          Deprecated. as of NW04. Does not work with the new crawlers
protected  boolean reindexTrainingResources(IIndexFolderList preClearIndexFolders)
           
 void removeCategoryAssignments(ICollection deletedCategoryFolder)
          Removes the assignment of all documents of the index to a category.
protected  void removeResourceFromClassificationIndex(RID resourceRID, IResourceContext context)
          Removes a resource from the list of resources that are indexed in the index.
 void removeTaxonomy(java.lang.String taxonomy)
          Deprecated. as of NW04. Use removeTaxonomy(String,IResourceContext)
 void removeTaxonomy(java.lang.String taxonomy, IResourceContext context)
          for internal use - to remove a taxonomy delete the taxonomy collection
 void setDocClassification(IDocClassificationMap documentClassificationMap)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocClassification(IDocClassificationMap documentClassificationMap, boolean indexDocumentClassification)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocClassification(IDocClassificationMap documentClassificationMap, boolean indexDocumentClassification, boolean isTrainingDocument)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocClassification(IDocClassificationMap documentClassificationMap, boolean indexDocumentClassification, boolean isTrainingDocument, boolean sendLinkEvents)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocClassification(IDocClassificationMap documentClassificationMap, boolean indexDocumentClassification, boolean isTrainingDocument, boolean sendLinkEvents, java.lang.String notToSend)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocClassification(IDocClassificationMap documentClassificationMap, java.lang.String notToSend)
          Stores the document classification that has been choosen by manual or automatic classification.
 void setDocListClassification(IDocClassificationMapList documentClassificationMapList)
          Stores the documents classifications that has been choosen by manual or automatic classification.
 void setDocumentClassification(IResource document, java.util.Map classification)
          Deprecated. as of NW04. Use setDocClassification(IResource,Map)
 void setDocumentClassification(IResource document, java.util.Map classification, boolean indexDocumentClassification)
          Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean)
 void setDocumentClassification(IResource document, java.util.Map classification, boolean indexDocumentClassification, boolean isTrainingDocument)
          Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean, boolean)
 void setDocumentClassificationStatus(IResourceList documents, java.lang.String taxonomyName, ClassificationStatus status)
          Sets the classification status for a list of documents for a taxonomy.
 void setDocumentClassificationStatus(IResource document, java.lang.String taxonomyName, ClassificationStatus status)
          Sets the classification status of a document for a taxonomy
 void setDocumentClassificationStatus(IResource document, java.lang.String taxonomyName, ClassificationStatus status, boolean sendEvents, java.lang.String notToSend)
          Sets the classification status of a document for a taxonomy
 void setDocumentClassificationStatus(IResource document, java.lang.String taxonomyName, ClassificationStatus status, java.lang.String notToSend)
          Sets the classification status of a document for a taxonomy
 void setIndexOnlyClassifiedDocs(boolean indexOnlyClassifiedDocs)
          If set on true, only documents are indexed, which are also assigned to categories, otherwise all documents are indexed.
 void setQueryFolderExternalFast(IQueryFolder queryFolder, IQueryEntryList query)
           
 void setTaxonomyBestClassesSensitivity(java.lang.String taxonomyName, BestClassesSensitivity sensitivity)
          Sets the threshold of a taxonomy
 void setTaxonomyClassificationThreshold(java.lang.String taxonomyName, java.lang.String thresholdId, float threshold)
          Set the TaxonomyClassificationThreshold attribute of the AbstractClassificationIndex object.
 void setTaxonomyTrainingRid(java.lang.String taxonomyName, RID trainingRid)
          Set the TaxonomyTrainingUri attribute of the AbstractClassificationIndex object.
 void setTaxonomyTrainingUri(java.lang.String taxonomyName, URI trainingUri)
          Deprecated. as of NW04. Use setTaxonomyTrainingRid(String,RID)
 void setTaxonomyType(java.lang.String taxonomyName, TaxonomyType taxonomyType)
          Sets the type for the taxonomy
 void setUpdateTaxonomyState(java.lang.String state, java.lang.String taxonomyName, int visitedCategories, int catgoriesToUpdate, int allCategories)
           
 void startTaxonomyTrainingCrawler(ICollection taxonomyCollection, boolean isSearchRelevant)
          Deprecated. as of NW04. Crawlers can only be queued - use queueTaxonomyTrainingCrawler
abstract  void startTaxonomyTrainingCrawler(java.lang.String taxonomyName, ICollection taxonomyCollection, boolean isSearchRelevant, boolean clearVisitedList, ISemaphore semaphore)
          Runs a taxonomy training crawler.
 void synchronizeTaxonomyMetaData(java.lang.String taxonomyName)
          Rebuilds the taxonomy meta data on the classification engine.
 java.util.Collection unfilteredClassifyDocuments(IResourceList resourceDocuments, java.lang.String taxonomyName, float threshold, int maxResults)
          Classifies documents (which taxonomy class folders do the documents fit best)
abstract  void updateCategoryContents(java.lang.String taxonomyName, boolean dirtyOnly, IResourceContext context)
          Starts a process that checks and updates categories of a taxonomy where the query is not in sync with the documents of category.
 boolean useBestClasses()
           
 
Methods inherited from class com.sapportals.wcm.service.indexmanagement.AbstractIndex
addFolderUri, checkIndexIsActive, checkProperties, compareTo, createIndexOnServer, deindexDocument, deindexDocument, deindexDocument, deindexDocuments, deindexDocuments, deindexDocuments, deleteOnServer, deleteOnServer, deltaReindex, equals, getActiveTime, getConfigServiceUser, getCrawlerProfileId, getDetailsMonitorPageText, getDetailsMonitorPageURL, getDetailsMonitorURL1, getDetailsMonitorURL2, getDetailsMonitorURL3, getDisplayNameAsStringPropName, getErrorState, getFolderUris, getFrameSizes, getIndexedProperties, getIndexFolderForDocument, getIndexFolders, getIndexGroup, getIndexId, getIndexingState, getIndexName, getLanguagesOfIndexedDocuments, getNumberOfCrawler, getNumberOfDocumentsInQueue, getNumberOfErrors, getNumberOfSuccessfullyIndexedDocs, getProperties, getResourceInfo, getRID, getRunningState, getSchedulerTimeTable, getServiceId, getServiceTypes, getSupportedOptions, getWhatToIndex, getWhatToIndexString, indexDocument, indexDocument, indexDocuments, indexInternalLinks, init, internalAddQueuedCrawler, internalDeindexDocuments, internalRunQueuedIfNoActive, internalSetIndexFolders, isActive, reduceNumberOfCrawler, reindex, reindex, reindexNotTrainingDocs, reindexXPostClear, removeAllFolderUris, removeFolderUri, repaireConfigurable, restartAll, resumeAll, setActive, setActiveDuringStartup, setCrawlerProfileId, setInactiveIndexHasChanged, setIndexGroup, setIndexingState, setIndexName, setNumberOfCrawler, setProperties, setSchedulerTimeTable, setStateAndNumberOfCrawler, setWhatToIndex, startReindexer, stopAll, suspendAll, typeShouldBeIndexed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.service.indexmanagement.IIndex
clear, delete, delete, generate, generate, getResourceInfo, getServiceTypes
 

Field Detail

m_taxonomyRmPrefix

protected static java.lang.String m_taxonomyRmPrefix

m_useBestClasses

protected static boolean m_useBestClasses

m_inboxFiller

protected java.util.Map m_inboxFiller
Constructor Detail

AbstractClassificationIndex

public AbstractClassificationIndex(java.lang.String indexId,
                                   java.lang.String indexName,
                                   java.lang.String indexGroup,
                                   IIndexFolderList indexFolders,
                                   java.lang.String serviceId,
                                   java.lang.String serviceUserId,
                                   java.util.Properties indexServiceProperties)
                            throws WcmException
Deprecated. as of NW04. Use constructor with crawler profile ID

Parameters:
indexId - index identifier
indexName - display name of the index
indexGroup - the group the index has been assigned to
serviceId - the identifier of the index service
serviceUserId - id of the index management service user, to set the service context
indexServiceProperties - config properties of the index management service
folderRids - list of rids that are assigned to the index
Throws:
WcmException - Exception raised in failure situation

AbstractClassificationIndex

public AbstractClassificationIndex(java.lang.String indexId,
                                   java.lang.String indexName,
                                   java.lang.String indexGroup,
                                   IIndexFolderList indexFolders,
                                   java.lang.String serviceId,
                                   java.lang.String crawlerProfileId,
                                   java.lang.String serviceUserId,
                                   java.util.Properties indexServiceProperties)
                            throws WcmException
Parameters:
indexId - index identifier
indexName - display name of the index
indexGroup - the group the index has been assigned to
serviceId - the identifier of the index service
crawlerProfileId - - ID of the default crawler profile for all index folders of the index
serviceUserId - id of the index management service user, to set the service context
indexServiceProperties - config properties of the index management service
folderRids - list of rids that are assigned to the index
Throws:
WcmException - Exception raised in failure situation
Method Detail

setDocumentClassification

public void setDocumentClassification(IResource document,
                                      java.util.Map classification)
                               throws WcmException
Deprecated. as of NW04. Use setDocClassification(IResource,Map)

This call stores the document classification that has been choosen by manual or automatic classification.
Parameters:
document - The new DocumentClassification value
classification - The new DocumentClassification value
Throws:
WcmException - Exception raised in failure situation

setDocumentClassification

public void setDocumentClassification(IResource document,
                                      java.util.Map classification,
                                      boolean indexDocumentClassification)
                               throws WcmException
Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean)

This call stores the document classification that has been choosen by manual or automatic classification.
Parameters:
document - The new DocumentClassification value
classification - The new DocumentClassification value
indexDocumentClassification - The new DocumentClassification value
Throws:
WcmException - Exception raised in failure situation

setDocumentClassification

public void setDocumentClassification(IResource document,
                                      java.util.Map classification,
                                      boolean indexDocumentClassification,
                                      boolean isTrainingDocument)
                               throws WcmException
Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean, boolean)

Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
document - document for that the classification has to be set.
classification - map with document classification. Key is (String) taxonomy name. Value is IRidList of taxonomy class rids. The entire document classification must be set. To add classes first get the old document classification and add the new classes. To remove classes get the old document classification and remove the classes from the class list. To delete a whole taxonomy for the document set an empty class list for the taxonomy name.
indexDocumentClassification - if true the document classification is indexed. If false the document classification is only stored as an application property with the document and is not indexed. Warning: Should only be "false" if document is indexed imediately before or after the call by another routine.
isTrainingSet - if true the added classes are indexed to train the index
Throws:
WcmException - Exception raised in failure situation

isTrainingDocument

public boolean isTrainingDocument(IResource document,
                                  RID taxonomyClassRid)
                           throws WcmException
Parameters:
document - the document to check
taxonomyClassRid - the rid of the taxonomy class for that has to be checked if the document is a training document if taxonomyClassRid is null, it returns true if the document is a training document for any taxonomy category of the index.
Returns:
true if document is a training document for the taxonomy class

isDocClassifiedInAnyTax

public boolean isDocClassifiedInAnyTax(IResource resource)
                                throws WcmException

isManuallyDeclassifiedDocument

public boolean isManuallyDeclassifiedDocument(IResource document,
                                              RID taxonomyClassRid)
                                       throws WcmException
Parameters:
document - the document to check
taxonomyClassRid - the rid of the taxonomy class for that has to be checked if the document is a manually declassified document if taxonomyClassRid is null, it returns true if the document is a manually declassified document for any taxonomy category of the index.
Returns:
true if document is a manually declassified document for the taxonomy class

setTaxonomyClassificationThreshold

public void setTaxonomyClassificationThreshold(java.lang.String taxonomyName,
                                               java.lang.String thresholdId,
                                               float threshold)
                                        throws WcmException
Set the TaxonomyClassificationThreshold attribute of the AbstractClassificationIndex object.
Parameters:
taxonomyName - The new TaxonomyClassificationThreshold value
thresholdId - The new TaxonomyClassificationThreshold value
threshold - The new TaxonomyClassificationThreshold value
Throws:
WcmException - Exception raised in failure situation

setTaxonomyTrainingUri

public void setTaxonomyTrainingUri(java.lang.String taxonomyName,
                                   URI trainingUri)
                            throws WcmException
Deprecated. as of NW04. Use setTaxonomyTrainingRid(String,RID)

Set the TaxonomyTrainingUri attribute of the AbstractClassificationIndex object.
Parameters:
taxonomyName - The new TaxonomyTrainingUri value
trainingUri - The new TaxonomyTrainingUri value
Throws:
WcmException - Exception raised in failure situation

setTaxonomyTrainingRid

public void setTaxonomyTrainingRid(java.lang.String taxonomyName,
                                   RID trainingRid)
                            throws WcmException
Set the TaxonomyTrainingUri attribute of the AbstractClassificationIndex object.
Parameters:
taxonomyName - The new TaxonomyTrainingRid value
trainingRid - The new TaxonomyTrainingRid value
Throws:
WcmException - Exception raised in failure situation

setTaxonomyBestClassesSensitivity

public void setTaxonomyBestClassesSensitivity(java.lang.String taxonomyName,
                                              BestClassesSensitivity sensitivity)
                                       throws WcmException
Sets the threshold of a taxonomy
Parameters:
taxonomyName - name of the taxonomy (must exist for index)
sensitivity - The new TaxonomyBestClassesSensitivity value
Throws:
WcmException - Exception raised in failure situation

hasTaxonomy

public boolean hasTaxonomy(java.lang.String name)

getTaxonomies

public java.util.List getTaxonomies()
Get the Taxonomies attribute of the AbstractClassificationIndex object.
Returns:
The Taxonomies value

getDocumentClassification

public java.util.Map getDocumentClassification(IResource document)
                                        throws WcmException
Deprecated. as of NW04. Use getDocClassification(IResource)

Gets the classification that has been set for the document. This call has nothing to do with classify documents. It only gives the document classes set by setDocumentClassification();
Parameters:
document - Document to get the classification for
Returns:
The DocumentClassification value
Throws:
WcmException - Exception raised in failure situation

getTaxonomyClassificationThreshold

public float getTaxonomyClassificationThreshold(java.lang.String taxonomyName,
                                                java.lang.String thresholdId)
                                         throws WcmException
Gets the threshold of a taxonomy
Parameters:
taxonomyName - name of the taxonomy (must exist for index)
thresholdId - Constant IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL1 or IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL2
Returns:
the requested threshold value for the specified taxonomy
Throws:
WcmException - Exception raised in failure situation

getTaxonomyTrainingUri

public URI getTaxonomyTrainingUri(java.lang.String taxonomyName)
                           throws WcmException
Deprecated. as of NW04. Use getTaxonomyTrainingRid(String)


getTaxonomyTrainingRid

public RID getTaxonomyTrainingRid(java.lang.String taxonomyName)
                           throws WcmException
Gets the uri of the root folder of the hierarchy that has been used to train/create the given taxonomy. The information about the location of the training uri is necessary when reindexing an index.
Parameters:
taxonomyName - name of the taxonomy (must exist for index)
Returns:
the requested training rid for the specified taxonomy. The rid may be null if no training uri exists for the taxonomy.
Throws:
WcmException - Exception raised in failure situation

getTaxonomyRmPrefix

public java.lang.String getTaxonomyRmPrefix()
Get the TaxonomyRmPrefix attribute of the AbstractClassificationIndex object.
Returns:
The TaxonomyRmPrefix value

getClassDocuments

public IResourceList getClassDocuments(ICollection taxonomyClass)
                                throws WcmException,
                                       ResourceException
Gets all documents of a taxonomy class
Parameters:
taxonomyClass - the taxonomy class folder you want to have documents for
Returns:
resource list of taxonomy class documents
Throws:
WcmException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getClassDocuments

public IResourceList getClassDocuments(RID taxonomyClassRid,
                                       IResourceContext context)
                                throws WcmException,
                                       ResourceException
Gets all documents of a taxonomy class
Parameters:
taxonomyClassRid - resource ID of the taxonomy class you want to have documents for
context - user context
Returns:
resource list of taxonomy class documents
Throws:
WcmException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getClassDocumentRids

public IRidList getClassDocumentRids(ICollection taxonomyClass)
                              throws WcmException,
                                     ResourceException
Gets the resource IDs of all documents of a taxonomy class
Parameters:
taxonomyClass - the taxonomy class folder you want to have documents for
Returns:
resource ID list of taxonomy class documents
Throws:
WcmException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getClassDocumentRids

public IRidList getClassDocumentRids(RID taxonomyClassRid,
                                     IResourceContext context)
                              throws WcmException
Gets the resource IDs of all documents of a taxonomy class
Parameters:
taxonomyClassRid - resource ID of the taxonomy class you want to have documents for
context - user context
Returns:
resource ID list of taxonomy class documents
Throws:
WcmException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getBestClassesOld

public java.util.Collection getBestClassesOld(IResourceList resourceDocuments,
                                              java.lang.String taxonomyName)
                                       throws WcmException
Parameters:
resourceDocuments - Resource list of documents you want to classify
taxonomyName - taxonomy for that the best classes have to be proposed for
Returns:
the documents and their best classification results
Throws:
WcmException - Exception raised in failure situation

getBestClasses

public java.util.Collection getBestClasses(IResourceList resourceDocuments,
                                           java.lang.String taxonomyName)
                                    throws WcmException
Parameters:
resourceDocuments - Resource list of documents you want to classify
taxonomyName - taxonomy for that the best classes have to be proposed for
Returns:
the documents and their best classification results
Throws:
WcmException - Exception raised in failure situation

getBestClasses

public java.util.Collection getBestClasses(IResourceList resourceDocuments,
                                           java.lang.String taxonomyName,
                                           java.util.Map thresholds)
                                    throws WcmException

getTaxonomyBestClassesSensitivity

public BestClassesSensitivity getTaxonomyBestClassesSensitivity(java.lang.String taxonomyName)
                                                         throws WcmException
Gets the sensitivity level of the best classes algorithm
Parameters:
taxonomyName - name of the taxonomy (must exist for index)
Returns:
the sensitivity level for the specified taxonomy
Throws:
WcmException - Exception raised in failure situation

initTaxonomies

public void initTaxonomies(java.util.List taxonomies)
Sets the index taxonomies initially before generating the index. After creating the index the taxonomy folders are created automatically.
Parameters:
taxonomies - list of taxonomy names

removeTaxonomy

public void removeTaxonomy(java.lang.String taxonomy)
Deprecated. as of NW04. Use removeTaxonomy(String,IResourceContext)

for internal use - to remove a taxonomy delete the taxonomy collection
Parameters:
taxonomyName - name of the taxonomy to remove

removeTaxonomy

public void removeTaxonomy(java.lang.String taxonomy,
                           IResourceContext context)
                    throws WcmException
for internal use - to remove a taxonomy delete the taxonomy collection
Parameters:
taxonomyName - name of the taxonomy to remove

addTaxonomy

public void addTaxonomy(java.lang.String taxonomy)
                 throws WcmException
Deprecated. as of NW04. Use addTaxonomy(String,IResourceContext)

Add Taxonomy to the AbstractClassificationIndex object.
Parameters:
taxonomy - Taxonomy to be added
Throws:
WcmException - Exception raised in failure situation

addTaxonomy

public void addTaxonomy(java.lang.String taxonomy,
                        IResourceContext context)
                 throws WcmException
Add Taxonomy to the AbstractClassificationIndex object.
Parameters:
taxonomy - Taxonomy to be added
Throws:
WcmException - Exception raised in failure situation

indexDocuments

public void indexDocuments(IResourceList resources,
                           java.lang.String taxonomyName,
                           IUriList taxonomyClasses,
                           boolean isSearchRelevant)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Deprecated. as of NW04. Use indexDocuments(IResourceList, String, IRidList, boolean)


indexDocuments

public void indexDocuments(IResourceList resources,
                           java.lang.String taxonomyName,
                           IRidList taxonomyClasses,
                           boolean isSearchRelevant)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Indexes a list of documents (method for internal use)
Parameters:
resources - resources to index
taxonomyName - name of the taxonomy where the taxonomy classes have to be indexed with the document
taxonomyClasses - axonomy classes to index with the documents
isSearchRelevant - if true the documents can be found in a search if false the document is only for the training of the taxonomy classes
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocument

public void indexDocument(IResource resource,
                          java.lang.String taxonomyName,
                          IUriList taxonomyClasses,
                          boolean isSearchRelevant)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
Deprecated. as of NW04. Use indexDocument(IResource, String, IRidList, boolean)


indexDocuments

public void indexDocuments(IResourceList resources)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Indexes a list of documents
Overrides:
indexDocuments in class AbstractIndex
Parameters:
resources - resources to index
reindexMode - true if the documents are indexed via the reindex call
sendLinkEvents - if true create link event will be send for classification results
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocuments

public void indexDocuments(IResourceList resources,
                           boolean reindexMode,
                           boolean sendLinkEvents)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Indexes a list of documents
Parameters:
resources - resources to index
reindexMode - true if the documents are indexed via the reindex call
sendLinkEvents - if true create link event will be send for classification results
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocument

public void indexDocument(IResource resource,
                          java.lang.String taxonomyName,
                          IRidList taxonomyClasses,
                          boolean isSearchRelevant)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
indexes a document (method for internal use)
Parameters:
resource - resource to index
taxonomyName - name of the taxonomy where the taxonomy classes have to be indexed with the document
taxonomyClasses - taxonomy classes to index with the document
isSearchRelevant - if true the document can be found in a search if false the document is only for the training of the taxonomy classes
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

classifyDocuments

public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
                                              java.lang.String taxonomyName,
                                              int maxResults)
                                       throws WcmException
Classifies documents (which taxonomy class folders do the documents fit best)
Parameters:
resourceDocuments - Resource list of documents you want to classify
maxResults - maximum number of returned taxonomy classes
taxonomyName - name of the taxonomy where
Returns:
Collection of IClassificationResult
Throws:
WcmException - Exception raised in failure situation

classifyDocuments

public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
                                              java.lang.String taxonomyName)
                                       throws WcmException
Classifies documents (which taxonomy class folders do the documents fit best)
Parameters:
resourceDocuments - Resource list of documents you want to classify
taxonomyName - name of the taxonomy for that classification proposals have to be found
Returns:
Collection of IClassificationResult
Throws:
WcmException - Exception raised in failure situation

unfilteredClassifyDocuments

public java.util.Collection unfilteredClassifyDocuments(IResourceList resourceDocuments,
                                                        java.lang.String taxonomyName,
                                                        float threshold,
                                                        int maxResults)
                                                 throws WcmException
Classifies documents (which taxonomy class folders do the documents fit best)
Parameters:
resourceDocuments - Resource list of documents you want to classify
threshold - lowest rank value of a returned taxonomy class
maxResults - maximum number of returned taxonomy classes
taxonomyName - name of the taxonomy for that classification proposals have to be found
Returns:
Collection of IClassificationResult
Throws:
WcmException - Exception raised in failure situation

classifyDocuments

public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
                                              java.lang.String taxonomyName,
                                              float threshold,
                                              int maxResults)
                                       throws WcmException
Classifies documents (which taxonomy class folders do the documents fit best).
If a document is already classified with the proposed class, the class is not returned. To get also these classes use unfilteredClassifyDocuments.
Parameters:
resourceDocuments - Resource list of documents you want to classify
threshold - lowest rank value of a returned taxonomy class
maxResults - maximum number of returned taxonomy classes
taxonomyName - name of the taxonomy for that classification proposals have to be found
Returns:
Collection of IClassificationResult
Throws:
WcmException - Exception raised in failure situation

internalClassifyDocuments

protected abstract java.util.Collection internalClassifyDocuments(IResourceList resourceDocuments,
                                                                  java.lang.String taxonomyName,
                                                                  float threshold,
                                                                  int maxResults)
                                                           throws WcmException
Classifies documents (which taxonomy class folders do the documents fit best)
Parameters:
resourceDocuments - Resource list of documents you want to classify
threshold - lowest rank value of a returned taxonomy class
maxResults - maximum number of returned taxonomy classes
taxonomyName - name of the taxonomy for that classification proposals have to be found
Returns:
Collection of IClassificationResult
Throws:
WcmException - Exception raised in failure situation

useBestClasses

public boolean useBestClasses()
Returns:
if true the best classes algorithm is used note: it must be configured as an index management property in the wcm configuration

internalIndexDocuments

protected abstract void internalIndexDocuments(IResourceList resources,
                                               java.lang.String taxonomyName,
                                               IRidList taxonomyClasses,
                                               IResourceEvent resourceEvent,
                                               boolean isSearchRelevant,
                                               boolean reindexMode,
                                               boolean sendLinkEvents)
                                        throws ResourceException,
                                               WcmException,
                                               java.io.IOException
Indexes a list of documents (method for internal use)
Parameters:
resources - resources to index
taxonomyName - name of the taxonomy where the taxonomy classes have to be indexed with the document
taxonomyClasses - taxonomy classes to index with the documents
isSearchRelevant - if true the documents can be found in a search if false the document is only for the training of the taxonomy classes
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

internalIndexDocuments

protected void internalIndexDocuments(IResourceList resources,
                                      IResourceEvent resourceEvent)
                               throws ResourceException,
                                      WcmException,
                                      java.io.IOException
indexes a list of documents (method for internal use)
Overrides:
internalIndexDocuments in class AbstractIndex
Parameters:
resources - list of resources to index
resourceEvent - event that caused the index request
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocumentClassification

protected abstract void indexDocumentClassification(IResource document,
                                                    IIndexService indexService)
Parameters:
document - document that has to be indexes
indexService - index service from the service factory

reindexPostClear

protected void reindexPostClear(IIndexFolderList preClearIndexFolders)
                         throws WcmException
Deprecated. as of NW04. Does not work with the new crawlers

Lets index implementations perform tasks after the index has been cleared within a reindex call. After this post clear tasks the attached folders of the index are indexed. In this case: train the taxonomies of an classification index before indexing the documents.
Overrides:
reindexPostClear in class AbstractIndex
Parameters:
preClearIndexFolders - index folders that have been attached befor the clear
Throws:
WcmException - Exception raised in failure situation

finishXPostClear

public void finishXPostClear()
                      throws WcmException

reindexTrainingResources

protected boolean reindexTrainingResources(IIndexFolderList preClearIndexFolders)
                                    throws WcmException

indexManualTrainDocs

public void indexManualTrainDocs()
                          throws WcmException

getDocumentClassificationStatus

public ClassificationStatus getDocumentClassificationStatus(IResource document,
                                                            java.lang.String taxonomyName)
                                                     throws WcmException

setDocumentClassificationStatus

public void setDocumentClassificationStatus(IResource document,
                                            java.lang.String taxonomyName,
                                            ClassificationStatus status)
                                     throws WcmException
Sets the classification status of a document for a taxonomy
Parameters:
document - document to get the classification status for
taxonomyName - name of the taxonomy
the - documents classification status in the taxonomy

setDocumentClassificationStatus

public void setDocumentClassificationStatus(IResource document,
                                            java.lang.String taxonomyName,
                                            ClassificationStatus status,
                                            java.lang.String notToSend)
                                     throws WcmException
Sets the classification status of a document for a taxonomy
Parameters:
document - document to get the classification status for
taxonomyName - name of the taxonomy
the - documents classification status in the taxonomy
notToSend - String describing an event, which should be suppressed

setDocumentClassificationStatus

public void setDocumentClassificationStatus(IResource document,
                                            java.lang.String taxonomyName,
                                            ClassificationStatus status,
                                            boolean sendEvents,
                                            java.lang.String notToSend)
                                     throws WcmException
Sets the classification status of a document for a taxonomy
Parameters:
document - document to get the classification status for
taxonomyName - name of the taxonomy
status - the documents classification status in the taxonomy
sendEvents - only send events if true
notToSend - String describing an event, which should be suppressed

setDocumentClassificationStatus

public void setDocumentClassificationStatus(IResourceList documents,
                                            java.lang.String taxonomyName,
                                            ClassificationStatus status)
                                     throws WcmException
Sets the classification status for a list of documents for a taxonomy.
Parameters:
documents - documents to set the classification status for
taxonomyName - name of the taxonomy
the - documents classification status in the taxonomy

getDocumentsToClassify

public IResourceList getDocumentsToClassify(java.lang.String taxonomyName)
                                     throws WcmException
Deprecated. as of NW04.

Gets all documents of an index that have the status "to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are to classify should be returned
Returns:
list of resources that are the documents to classify for the given taxonomy

getDocumentsToClassify

public IResourceList getDocumentsToClassify(java.lang.String taxonomyName,
                                            IResourceContext context)
                                     throws WcmException
Gets all documents of an index that have the status "to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are to classify should be returned
context - user context
Returns:
list of resources that are the documents "to classify" for the given taxonomy

getDocumentsNeverToClassify

public IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName,
                                                 IResourceContext context)
                                          throws WcmException
Gets all documents of an index that have the status "never to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are never to be classified should be returned
context - user context
Returns:
list of resources that are the documents "never to be classified" for the given taxonomy

getDocumentsNeverToClassify

public IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName)
                                          throws WcmException
Deprecated. as of NW04.

Gets all documents of an index that have the status "never to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are never to be classified should be returned
Returns:
list of resources that are the document never to be classified for the given taxonomy

getDocumentRidsToClassify

public IRidList getDocumentRidsToClassify(java.lang.String taxonomyName,
                                          IResourceContext context)
                                   throws WcmException
Gets all rids of documents of an index that have the status "to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are to classify should be returned
context - user context
Returns:
list of rids that are the documents "to classify" for the given taxonomy

getDocumentRidsNeverToClassify

public IRidList getDocumentRidsNeverToClassify(java.lang.String taxonomyName,
                                               IResourceContext context)
                                        throws WcmException
Gets all rids of documents of an index that have the status "never to classify" within a taxonomy
Parameters:
taxonomyName - name of the taxonomy for that the documents that are never to be classified should be returned
context - user context
Returns:
list of rids that are the documents "never to be classified" for the given taxonomy

getSpecialFolderRID

public RID getSpecialFolderRID(java.lang.String taxonomyName,
                               SpecialFolder specialFolderType)
                        throws WcmException
Parameters:
taxonomyName - name of the taxonomy
specialFolderType - type of special folder
Returns:
rid of special folder within the taxonomy manager

getDocClassification

public IDocClassificationMap getDocClassification(IResource document)
                                           throws WcmException
Gets the classification that has been set for the document. This call has nothing to do with classify documents. It only gives the document classes set by setDocClassification();
Parameters:
document - document for that the classification has to be returned
Returns:
IDocClassificationMap with classifications per taxonomy name
Throws:
WcmException - Exception raised in failure situation

getDocListClassification

public IDocClassificationMapList getDocListClassification(IResourceList documents)
                                                   throws WcmException
Gets the classifications that have been set for the documents.
Parameters:
documents - list of documents for that the classification has to be returned
Returns:
IDocClassificationMapList that contains an IDocClassificationMap for every document
Throws:
WcmException - Exception raised in failure situation.

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
Throws:
WcmException - Exception raised in failure situation

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap,
                                 java.lang.String notToSend)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
notToSend - String describing an event, which should be suppressed
Throws:
WcmException - Exception raised in failure situation

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap,
                                 boolean indexDocumentClassification)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
indexDocumentClassification - if true the document classification is indexed. If false the document classification is only stored as an application property with the document and is not indexed. Warning: Should only be "false" if document is indexed imediately before or after the call by another routine.
Throws:
WcmException - Exception raised in failure situation

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap,
                                 boolean indexDocumentClassification,
                                 boolean isTrainingDocument)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
indexDocumentClassification - if true the document classification is indexed. If false the document classification is only stored as an application property with the document and is not indexed. Warning: Should only be "false" if document is indexed imediately before or after the call by another routine.
isTrainingDocument - if true the classification is is indexed to train the index
Throws:
WcmException - Exception raised in failure situation

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap,
                                 boolean indexDocumentClassification,
                                 boolean isTrainingDocument,
                                 boolean sendLinkEvents)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
indexDocumentClassification - if true the document classification is indexed. If false the document classification is only stored as an application property with the document and is not indexed. Warning: Should only be "false" if document is indexed imediately before or after the call by another routine.
isTrainingDocument - if true the classification is is indexed to train the index
sendLinkEvents - if true create link event will be send
Throws:
WcmException - Exception raised in failure situation

setDocClassification

public void setDocClassification(IDocClassificationMap documentClassificationMap,
                                 boolean indexDocumentClassification,
                                 boolean isTrainingDocument,
                                 boolean sendLinkEvents,
                                 java.lang.String notToSend)
                          throws WcmException
Stores the document classification that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMap - container with the document and its classification for all taxonomies
indexDocumentClassification - if true the document classification is indexed. If false the document classification is only stored as an application property with the document and is not indexed. Warning: Should only be "false" if document is indexed imediately before or after the call by another routine.
isTrainingDocument - if true the classification is is indexed to train the index
sendLinkEvents - if true create link event will be send
notToSend - String describing an event, which should be suppressed
Throws:
WcmException - Exception raised in failure situation

setDocListClassification

public void setDocListClassification(IDocClassificationMapList documentClassificationMapList)
                              throws WcmException
Stores the documents classifications that has been choosen by manual or automatic classification.
Parameters:
documentClassificationMapList - list of containers with the document and its classification for all taxonomies
Throws:
WcmException - Exception raised in failure situation

setTaxonomyType

public void setTaxonomyType(java.lang.String taxonomyName,
                            TaxonomyType taxonomyType)
                     throws WcmException
Sets the type for the taxonomy
Parameters:
taxonomyName - name of the taxonomy
taxonomyType - new taxonomy type

setIndexOnlyClassifiedDocs

public void setIndexOnlyClassifiedDocs(boolean indexOnlyClassifiedDocs)
                                throws WcmException
If set on true, only documents are indexed, which are also assigned to categories, otherwise all documents are indexed.
Parameters:
indexOnlyClassifiedDocs -  

getTaxonomyType

public TaxonomyType getTaxonomyType(java.lang.String taxonomyName)
                             throws WcmException
Parameters:
taxonomyName - the name of the taxonomy
Returns:
the taxonomy type

isIndexOnlyClassifiedDocs

public boolean isIndexOnlyClassifiedDocs()
                                  throws WcmException
Returns true, if only documents are indexed, which could be assigned to categories. Otherwise false is returned.
Returns:
true or false

getQueryFolder

public IQueryFolder getQueryFolder(RID taxonomyClassRid)
                            throws WcmException
Gets a query folder instance
Parameters:
taxonomyClassRid - rid of the taxonomy class that is the query folder
Returns:
the query folder instance

getDocumentTrainingClasses

public IRidList getDocumentTrainingClasses(IResource document)
                                    throws WcmException
Parameters:
document - document for that the training classes have to be returned
Returns:
rid list of taxonomy classes for that the document is a training document

getManuallyDeclassifiedClasses

public IRidList getManuallyDeclassifiedClasses(IResource document)
                                        throws WcmException
Parameters:
document - document for that the manually declassified classes have to be returned
Returns:
rid list of taxonomy classes for that the document is a manually declassified document

autoClassifyDocs

public void autoClassifyDocs(java.lang.String taxonomyName,
                             IRidList docRidList,
                             IResourceContext context)
                      throws WcmException
Requests proposals for the best categories for the documents and sets these categories automatically as document classification.
Manual classification remains for the document.
Parameters:
taxonomyName - name of the taxonomy
docRidList - list IDs of documents of a taxonomy to be reclassified
context - user context

autoClassifyDocs

public void autoClassifyDocs(java.lang.String taxonomyName,
                             IResourceList docList,
                             IResourceContext context)
                      throws WcmException
Requests proposals for the best categories for the documents and sets these categories automatically as document classification.
Manual classification remains for the document.
Parameters:
taxonomyName - name of the taxonomy
docList - list of documents of a taxonomy to be reclassified
context - user context

autoClassifyDocs

public void autoClassifyDocs(java.lang.String taxonomyName,
                             IResourceContext context)
                      throws WcmException
Requests proposals for the best categories for documents that have no classification and sets these categories automatically as document classification.
Parameters:
taxonomyName - name of the taxonomy
context - user context

deleteTaxRmIndexFolder

protected void deleteTaxRmIndexFolder(IResourceContext context)
                               throws WcmException
Deletes the whole folder hierarchy of an index in the taxonomy repository. This method has to be called in the delete method of any class that is implementing IClassificationIndex.

createTaxRmIndexFolder

protected ICollection createTaxRmIndexFolder(IResourceContext context)
                                      throws WcmException
Creates the folder that represents the index in the taxonomy repository. If taxonomy names have been added to the index, taxonomy folders are created as children of the index folder. This method has to be called in the generate method of any class that is implementing IClassificationIndex.

removeCategoryAssignments

public void removeCategoryAssignments(ICollection deletedCategoryFolder)
                               throws WcmException
Removes the assignment of all documents of the index to a category.
Parameters:
deletedTaxClassFolder - category that has been deleted

deleteIndexTaxDocClassification

protected void deleteIndexTaxDocClassification(IRidList documentIDs)
                                        throws WcmException
Deletes the classification of the documents regarding the taxonomies of this index.
Parameters:
documentIDs - documents for that the classification has to be removed

startTaxonomyTrainingCrawler

public void startTaxonomyTrainingCrawler(ICollection taxonomyCollection,
                                         boolean isSearchRelevant)
                                  throws WcmException
Deprecated. as of NW04. Crawlers can only be queued - use queueTaxonomyTrainingCrawler

Runs a taxonomy training crawler.

Parameters:
taxonomyCollection - start collection of the hierarchy that will be use to build up the taxonomy
isSearchRelevant - indicates wether the documents will become part of the index or should only be used to train the index
Throws:
WcmException - Exception raised in failure situation

startTaxonomyTrainingCrawler

public abstract void startTaxonomyTrainingCrawler(java.lang.String taxonomyName,
                                                  ICollection taxonomyCollection,
                                                  boolean isSearchRelevant,
                                                  boolean clearVisitedList,
                                                  ISemaphore semaphore)
                                           throws WcmException
Runs a taxonomy training crawler.

Parameters:
taxonomyName - name of the taxonomy
taxonomyCollection - start collection of the hierarchy that is used to build up the taxonomy
isSearchRelevant - indicates whether the documents are to become part of the index or should only be used to train the index
clearVisitedList - clears all entries from the visited list of the index before crawling
semaphore - is acquired in the constructor of the training crawler and is blocked as long as the crawler is running The initial state must be unacquired. Other objects that acquire the semaphore must wait until the training crawler releases the semaphore.
Throws:
WcmException - exception raised in failure situation semaphore can be null

getPropertyNameTaxonomy

protected IPropertyName getPropertyNameTaxonomy(java.lang.String taxonomyName)
                                         throws WcmException
Returns:
property name to get document classification from the application properties

updateCategoryContents

public abstract void updateCategoryContents(java.lang.String taxonomyName,
                                            boolean dirtyOnly,
                                            IResourceContext context)
                                     throws WcmException
Starts a process that checks and updates categories of a taxonomy where the query is not in sync with the documents of category.
Parameters:
taxonomyName - name of the taxonomy to check
dirtyOnly - if false all categories are checked, if false only categories that are out of sync (dirty) are updated.
context - user context

addResourceToClassificationIndex

protected void addResourceToClassificationIndex(RID resourceRID,
                                                IResourceContext context)
                                         throws WcmException
Adds a resource to the list of resources that are index in the index.
Parameters:
resourceRID - ID of the resource to add
context - user context

removeResourceFromClassificationIndex

protected void removeResourceFromClassificationIndex(RID resourceRID,
                                                     IResourceContext context)
                                              throws WcmException
Removes a resource from the list of resources that are indexed in the index.
Parameters:
resourceRID - ID of the resource to remove
context - user context

synchronizeTaxonomyMetaData

public void synchronizeTaxonomyMetaData(java.lang.String taxonomyName)
                                 throws WcmException
Rebuilds the taxonomy meta data on the classification engine. Use this method to synchronize the taxonomy information between CM and the connected classification engine.
Parameters:
taxonomyName - taxonomy that has to be redefined

deleteClassificationProperties

public void deleteClassificationProperties(IResource resource)
                                    throws WcmException

getAllCollections

public static void getAllCollections(ICollection col,
                                     IResourceList resources)
Parameters:
dataSearchFromHereResource -  
Returns:
 

getUpdateTaxonomyState

public UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName)
                                           throws WcmException

getUpdateTaxonomyState

public UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName,
                                                  java.util.Locale locale)
                                           throws WcmException

setUpdateTaxonomyState

public void setUpdateTaxonomyState(java.lang.String state,
                                   java.lang.String taxonomyName,
                                   int visitedCategories,
                                   int catgoriesToUpdate,
                                   int allCategories)
                            throws WcmException

checkUpdateTaxonomyStateDuringStartUp

public void checkUpdateTaxonomyStateDuringStartUp()
                                           throws WcmException

setQueryFolderExternalFast

public void setQueryFolderExternalFast(IQueryFolder queryFolder,
                                       IQueryEntryList query)
                                throws WcmException

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.