|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A classification index is a specialized index where document classification and
other taxonomy-related operations can be performed.
This interface gives access to these functions.
To get a classification index, follow this example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IClassificationIndex classificationIndex = (IClassificationIndex)indexService.getIndex("abc");
Note that the index that is requested must support the IClassificationIndex interface.
Otherwise a ClassCastException is thrown.
| Field Summary | |
static java.lang.String |
AINBOX_CATEGORY_TO_CLASSIFY
Deprecated. as of NW04. |
static java.lang.String |
DEFAULT_THRESHOLD_LEVEL1
Default threshold 1 property. |
static java.lang.String |
DEFAULT_THRESHOLD_LEVEL2
Default threshold 2 property. |
static java.lang.String |
PROP_NAME_BEST_CLASSES_SENSITIVITY
Property name of the "BestClassesSensitivity"-property of a taxonomy folder The best classes sensitivity is defined for each taxonomy. |
static java.lang.String |
PROP_NAME_THRESHOLD_LEVEL1
Property name of the "threshold 1"-property of a taxonomy folder The taxonomy namespace is used. It is recommended that you do not access the value directly from the property. |
static java.lang.String |
PROP_NAME_THRESHOLD_LEVEL2
Property name of the "threshold 2"-property of a taxonomy folder The taxonomy namespace is used. It is recommended that you do not access the value directly from the property. |
static java.lang.String |
PROP_NAME_TRAINING_URI
Property name of the "training URI"-property of a taxonomy folder The training URI is saved as a property of a taxonomy folder if the taxonomy has been built by copying an existing hierarchy. |
static java.lang.String |
TAX_THRESHOLD_DEFAULT_VALUE
Default value of the threshold properties if no threshold value is set for a taxonomy. |
static java.lang.String |
TAXONOMY_NAMESPACE
The namespace suffix of resource properties related to taxonomies and classification To get the complete namespace of a taxonomy property, this suffix has to be appended to the cm namespace. |
static java.lang.String |
WORKLIST_FOLDER_NAME
Deprecated. as of NW04. |
| Method Summary | |
void |
addTaxonomy(java.lang.String taxonomyName)
Deprecated. as of NW04. Use addTaxonomy(String,IResourceContext) |
void |
addTaxonomy(java.lang.String taxonomyName,
IResourceContext context)
Adds a new taxonomy to the index By adding the taxonomy name, a folder is created for the taxonomy in the taxonomy repository and the taxonomy is saved with the index. |
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. |
java.util.Collection |
classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
java.util.Collection |
classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName,
float threshold,
int maxResults)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
java.util.Collection |
classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName,
int maxResults)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
java.util.Collection |
clusterDocuments(IResourceList resourceDocuments,
int maxResults)
Divides documents into clusters of documents The clustering is done on the basis of content similarity. |
void |
createTaxonomyHierarchyByCopiing(java.lang.String taxonomyName,
ICollection existingHierarchy)
The taxonomy hierarchy is created by copiing an existing hierarchy. |
java.util.Map |
doGeneric(java.lang.String function,
java.util.Map parameters)
Enables an index service to perform classification actions that are not reflected by the interface |
java.util.Collection |
getBestClasses(IResourceList resourceDocuments,
java.lang.String taxonomyName)
|
IResourceList |
getClassDocuments(ICollection taxonomyClass)
Gets all documents of a taxonomy class The taxonomy class is a folder in the taxonomy repository To get the resource ID of a taxonomy class, first the resource ID of the taxonomy root must be determined by using the getSpecialFolderRID(taxonomyName,SpecialFolder.TAXONOMY) method.
|
java.util.Collection |
getClassFeatures(java.util.Collection taxonomyClassUris,
java.lang.String taxonomyName,
int maxResults)
Deprecated. as of NW04. Use getClassFeatures(IRidList taxonomyClassRids,String taxonomyName, int maxResults) |
java.util.Collection |
getClassFeatures(IRidList taxonomyClassRids,
java.lang.String taxonomyName,
int maxResults)
Gets the features of taxonomy categories The most characteristic key words of a category are returned for each category. |
IDocClassificationMap |
getDocClassification(IResource document)
Gets the categories to which the document is assigned To get proposals of categories that a document might match, use classifyDocuments.
|
IDocClassificationMapList |
getDocListClassification(IResourceList documents)
Gets the categories to which the documents are assigned To get proposals of categories into which documents might fit, use classifyDocuments.
|
java.util.Map |
getDocumentClassification(IResource document)
Deprecated. as of NW04. Use getDocClassification(IResource) |
ClassificationStatus |
getDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName)
Gets the classification status of a document for a taxonomy |
IRidList |
getDocumentRidsNeverToClassify(java.lang.String taxonomyName,
IResourceContext context)
Gets all RIDs of documents for an index that have the status "never to classify" in a taxonomy |
IRidList |
getDocumentRidsToClassify(java.lang.String taxonomyName,
IResourceContext context)
Gets all RIDs of documents of an index that have the status "to classify" in a taxonomy |
IResourceList |
getDocumentsNeverToClassify(java.lang.String taxonomyName)
Deprecated. as of NW04. Use getDocumentsNeverToClassify(String,IResourceContext) |
IResourceList |
getDocumentsNeverToClassify(java.lang.String taxonomyName,
IResourceContext context)
Gets all documents of an index that have the status "never to classify" in a taxonomy |
IResourceList |
getDocumentsToClassify(java.lang.String taxonomyName)
Deprecated. as of NW04. Use getDocumentsToClassify(String,IResourceContext) |
IResourceList |
getDocumentsToClassify(java.lang.String taxonomyName,
IResourceContext context)
Gets all documents of an index that have the status "to classify" in a taxonomy |
IRidList |
getDocumentTrainingClasses(IResource document)
Gets all taxonomy classes for which the document is a training document |
IRidList |
getManuallyDeclassifiedClasses(IResource document)
|
IClassificationIndexCollection |
getNewClassificationIndexCollection()
Returns an index collection where classification operations for multiple indexes can be performed |
RID |
getSpecialFolderRID(java.lang.String taxonomyName,
SpecialFolder specialFolderType)
|
java.util.List |
getTaxonomies()
Names of all taxonomies of an index The name of a taxonomy is also the name of the taxonomy folder in the taxonomy repository. |
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()
|
java.lang.Runnable |
getTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
Deprecated. as of NW04. Use startTaxonomyTrainingCrawler |
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)
Returns the actual state of the taxonomy with respect to an actually running update. |
UpdateTaxonomyState |
getUpdateTaxonomyState(java.lang.String taxonomyName,
java.util.Locale locale)
Returns the actual state of the taxonomy with respect to an actually running update. |
boolean |
hasTaxonomy(java.lang.String name)
|
void |
indexDocument(IResource resource,
java.lang.String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
Puts a document into the index It is recommended that you do not index a document manually using this method. For repositories that send cm events, documents are indexed automatically when their content or their properties are changed. For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. |
void |
indexDocument(IResource resource,
java.lang.String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
Deprecated. as of NW04. Use indexDocument(IResource, String, IRidList, boolean) |
void |
indexDocuments(IResourceList resources,
java.lang.String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
Indexes a list of documents It is recommended that you do not index documents manually using this method. For repositories that send cm events, documents are indexed automatically when their content or their properties are changed. For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. |
void |
indexDocuments(IResourceList resources,
java.lang.String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
Deprecated. as of NW04. Use indexDocuments(IResourceList, String, IRidList, boolean) |
void |
initTaxonomies(java.util.List taxonomies)
Sets the index taxonomies initially before generating the index After the index has been created, the taxonomy folders are created automatically. |
boolean |
isTrainingDocument(IResource document,
RID taxonomyClassRid)
|
void |
queueTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
Deprecated. as of NW04. Use queueTaxonomyTrainingCrawler(String,ICollection,boolean) |
void |
queueTaxonomyTrainingCrawler(java.lang.String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant)
Adds a taxonomy training crawler to the index management crawler queue. |
void |
removeCategoryAssignments(ICollection deletedCategoryFolder)
Removes the assignment to a deleted category for all documents in the index |
void |
removeTaxonomy(java.lang.String taxonomyName)
Deprecated. as of NW04. Use removeTaxonomy(String,IResourceContext) |
void |
removeTaxonomy(java.lang.String taxonomyName,
IResourceContext context)
Removes a taxonomy form the index By removing a taxonomy, the folder for the taxonomy in the taxonomy repository is deleted and the taxonomy itself is removed from the index. |
void |
setDocClassification(IDocClassificationMap documentClassificationMap)
Stores the document classification that has been chosen by manual or automatic classification |
void |
setDocClassification(IDocClassificationMap documentClassificationMap,
boolean indexDocumentClassification)
Stores the document classification that has been chosen by manual or automatic classification |
void |
setDocClassification(IDocClassificationMap documentClassificationMap,
boolean indexDocumentClassification,
boolean isTrainingDocument)
Stores the document classification that has been chosen by manual or automatic classification |
void |
setDocClassification(IDocClassificationMap documentClassificationMap,
java.lang.String notToSend)
|
void |
setDocListClassification(IDocClassificationMapList documentClassificationMapList)
Stores the documents classification that has been chosen 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)
This method is for internal usage only |
void |
setDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName,
ClassificationStatus status,
java.lang.String notToSend)
This method is for internal usage only |
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)
Sets the threshold of a taxonomy |
void |
setTaxonomyTrainingRid(java.lang.String taxonomyName,
RID trainingRid)
Sets the RID of the root folder of the hierarchy that has been used to train/create the given taxonomy. |
void |
setTaxonomyTrainingUri(java.lang.String taxonomyName,
URI trainingUri)
Deprecated. as of NW04. Use setTaxonomyTrainingRid(String, RID) |
void |
setTaxonomyType(java.lang.String taxonomyName,
TaxonomyType taxonomyType)
|
void |
startTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
Deprecated. as of NW04. Crawlers can only be queued - use queueTaxonomyTrainingCrawler(String,ICollection,boolean) |
void |
startTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant,
boolean clearVisitedList,
ISemaphore semaphore)
Deprecated. as of NW04. Use startTaxonomyTrainingCrawler(String,ICollection,boolean,boolean,ISemaphore) |
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. |
void |
updateSearchCategoryAttributes(IResourceList oldResourceListe,
IResourceList newResourceListe,
java.lang.String taxonomyName,
RID categoryRid)
The attributes neccessary for searching in taxonomies are modified on the index server only. |
boolean |
useBestClasses()
|
| Field Detail |
public static final java.lang.String TAXONOMY_NAMESPACE
Example:
String namespace = new StringBuffer(IWcmConst.SAP_WCM_NAMESPACE).append(IClassificationIndex.TAXONOMY_NAMESPACE).toString();
public static final java.lang.String PROP_NAME_THRESHOLD_LEVEL1
getTaxonomyClassificationThreshold should be used instead.TAXONOMY_NAMESPACE,
getTaxonomyClassificationThreshold(String,String)public static final java.lang.String PROP_NAME_THRESHOLD_LEVEL2
getTaxonomyClassificationThreshold should be used instead.TAXONOMY_NAMESPACE,
getTaxonomyClassificationThreshold(String,String)public static final java.lang.String PROP_NAME_BEST_CLASSES_SENSITIVITY
getTaxonomyBestClassesSensitivity should be used instead.TAXONOMY_NAMESPACE,
getTaxonomyBestClassesSensitivity(String)public static final java.lang.String PROP_NAME_TRAINING_URI
getTaxonomyTrainingRid should be used instead.TAXONOMY_NAMESPACE,
getTaxonomyTrainingRid(String)public static final java.lang.String DEFAULT_THRESHOLD_LEVEL1
public static final java.lang.String DEFAULT_THRESHOLD_LEVEL2
public static final java.lang.String TAX_THRESHOLD_DEFAULT_VALUE
public static final java.lang.String WORKLIST_FOLDER_NAME
public static final java.lang.String AINBOX_CATEGORY_TO_CLASSIFY
| Method Detail |
public java.util.List getTaxonomies()
String) of the classification index
public void addTaxonomy(java.lang.String taxonomyName)
throws WcmException
addTaxonomy(String,IResourceContext)
taxonomyName - name of the taxonomy to be added to the indexWcmException - exception raised in failure situation
public void addTaxonomy(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy to be added to the indexcontext - user contextWcmException - exception raised in failure situationpublic void removeTaxonomy(java.lang.String taxonomyName)
removeTaxonomy(String,IResourceContext)
taxonomyName - name of the taxonomy to remove
public void removeTaxonomy(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy to removecontext - user context
public void indexDocument(IResource resource,
java.lang.String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
java.io.IOException
public void indexDocument(IResource resource,
java.lang.String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
java.io.IOException
resource - resource to indextaxonomyName - name of the taxonomy where the taxonomy classes have to be indexed with the documenttaxonomyClasses - taxonomy classes to index with the documentisSearchRelevant - if true, the document can be found in a search if false the document is only for training the taxonomy classesResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public void indexDocuments(IResourceList resources,
java.lang.String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
java.io.IOException
public void indexDocuments(IResourceList resources,
java.lang.String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
java.io.IOException
resources - resources to indextaxonomyName - name of the taxonomy where the taxonomy classes have to be indexed with the documenttaxonomyClasses - taxonomy classes to index with the documentsisSearchRelevant - if true, the documents can be found in a search; if false the document is only for training the taxonomy classesResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public java.util.Collection getClassFeatures(java.util.Collection taxonomyClassUris,
java.lang.String taxonomyName,
int maxResults)
throws WcmException
taxonomyClassUris - collection of URI that represent taxonomy class folderstaxonomyName - name of the taxonomy you want to have class features formaxResults - maximum number of class features returnedWcmException - exception raised in failure situation
public java.util.Collection getClassFeatures(IRidList taxonomyClassRids,
java.lang.String taxonomyName,
int maxResults)
throws WcmException
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IClassificationIndex classificationIndex = (IClassificationIndex)indexService.getIndex("abc");
IRidList categoryRids = new RidList();
categoryRids.add(RID.getRID("/taxonomies/abc/taxonomyXY/catXY"));
Collection classificationResults = classificationIndex.getClassFeatures(categoryRids,"taxonomyXY",5);
IClassificationResult classificationResult = (IClassificationResult)classificationResults.get(0);
Collection featuresList = classificationResult.getResults();
Iterator featureIterator = featuresList.iterator();
String feature = null;
while(featureIterator.hasNext()){
feature = (String)featureIterator.next();
}
taxonomyClassRids - list of RIDs that represent taxonomy class folderstaxonomyName - name of the taxonomy you want to have class features formaxResults - maximum number of class features returnedIClassificationResultWcmException - exception raised in failure situationIClassificationResult
public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName,
int maxResults)
throws WcmException
setDocClassification. To get the categories that have
been assigned to a document, use getDocClassification.
Example:
IResource document = ResourceFactory.getInstance().getResource(RID.getRID("/documents/abc.doc"),context);
IResourceList documents = new ResourceList();
documents.add(document);
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IClassificationIndex classificationIndex = (IClassificationIndex)indexService.getIndex("abc");
Collection classificationResults = classificationIndex.classifyDocuments(documents,"taxonomyXY",5);
IClassificationResult classificationResult = (IClassificationResult)classificationResults.get(0);
Collection resultClasses = classificationResult.getResults();
Iterator resultClassesIterator = resultClasses.iterator();
IClassificationClass resultClass = null;
RID resultClassRID = null;
float rankValue = 0.0F;
while(resultClassesIterator.hasNext()){
resultClass = (IClassificationClass)resultClassesIterator.next();
resultClassRID = resultClass.getResultClassRid();
rankValue = resultClass.getRankValue();
}
resourceDocuments - list of documents you want to classifytaxonomyName - name of the taxonomy for which classification proposals have to be foundmaxResults - maximum number of returned proposals for each documentIClassificationResultWcmException - exception raised in failure situationIClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName)
throws WcmException
setDocClassification. To get the categories that have
been assigned to a document, use getDocClassification.
Example:
IResource document = ResourceFactory.getInstance().getResource(RID.getRID("/documents/abc.doc"),context);
IResourceList documents = new ResourceList();
documents.add(document);
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IClassificationIndex classificationIndex = (IClassificationIndex)indexService.getIndex("abc");
Collection classificationResults = classificationIndex.classifyDocuments(documents,"taxonomyXY");
IClassificationResult classificationResult = (IClassificationResult)classificationResults.get(0);
Collection resultClasses = classificationResult.getResults();
Iterator resultClassesIterator = resultClasses.iterator();
IClassificationClass resultClass = null;
RID resultClassRID = null;
float rankValue = 0.0F;
while(resultClassesIterator.hasNext()){
resultClass = (IClassificationClass)resultClassesIterator.next();
resultClassRID = resultClass.getResultClassRid();
rankValue = resultClass.getRankValue();
}
resourceDocuments - list of documents you want to classifytaxonomyName - name of the taxonomy for which classification proposals have to be foundIClassificationResult- Throws:
WcmException - exception raised in failure situation- See Also:
IClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public java.util.Collection classifyDocuments(IResourceList resourceDocuments,
java.lang.String taxonomyName,
float threshold,
int maxResults)
throws WcmException
setDocClassification. To get the categories that have
been assigned to a document, use getDocClassification.
Example:
IResource document = ResourceFactory.getInstance().getResource(RID.getRID("/documents/abc.doc"),context);
IResourceList documents = new ResourceList();
documents.add(document);
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IClassificationIndex classificationIndex = (IClassificationIndex)indexService.getIndex("abc");
//returns a maximum of 5 classes for each document that have rank values higher than 0.7
Collection classificationResults = classificationIndex.classifyDocuments(documents,"taxonomyXY",0.7F,5);
IClassificationResult classificationResult = (IClassificationResult)classificationResults.get(0);
Collection resultClasses = classificationResult.getResults();
Iterator resultClassesIterator = resultClasses.iterator();
IClassificationClass resultClass = null;
RID resultClassRID = null;
float rankValue = 0.0F;
while(resultClassesIterator.hasNext()){
resultClass = (IClassificationClass)resultClassesIterator.next();
resultClassRID = resultClass.getResultClassRid();
rankValue = resultClass.getRankValue();
}
resourceDocuments - resource list of documents you want to classifytaxonomyName - name of the taxonomy for which classification proposals have to be foundthreshold - lowest rank value of a returned taxonomy classmaxResults - maximum number of proposals returned for each documentIClassificationResultWcmException - exception raised in failure situationIClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public java.util.Collection clusterDocuments(IResourceList resourceDocuments,
int maxResults)
throws WcmException
Note: This method is not yet supported by the implementing classes.
resourceDocuments - list of documents you want to clustermaxResults - maximum number of returned clustersICluster)WcmException - exception raised in failure situationICluster
public IClassificationIndexCollection getNewClassificationIndexCollection()
throws ResourceException
ResourceException - exception raised in failure situation
public IResourceList getClassDocuments(ICollection taxonomyClass)
throws WcmException,
ResourceException
getSpecialFolderRID(taxonomyName,SpecialFolder.TAXONOMY) method.
Then the path from the taxonomy root to the category must be appended to this resource ID.
Example:
RID taxonomyRid = classificationIndex.getSpecialFolderRID("taxonomyXY",SpecialFolder.TAXONOMY);
RID categoryRid = taxonomyRid.add(RID.getRID("/categoryXY"));
Result: "/taxonomies/indexXY/taxonomyXY/categoryXY"ICollection category = (ICollection)ResourceFactory.getInstance().getResource(categoryRid,context);
taxonomyClass - taxonomy class folder you want to have documents forWcmException - exception raised in failure situationResourceException - exception raised in failure situationgetSpecialFolderRID(String,SpecialFolder)public void initTaxonomies(java.util.List taxonomies)
taxonomies - list of taxonomy names (String)
public java.util.Map doGeneric(java.lang.String function,
java.util.Map parameters)
throws WcmException
function - name of the function that has to be performedparameters - parameters for the function that has to be performedWcmException - exception raised in failure situation
public java.util.Map getDocumentClassification(IResource document)
throws WcmException
setDocumentClassification().document - document for which the classification has to be returnedString) taxonomy name. Value is IRidList of
taxonomy class rids.WcmException - exception raised in failure situation
public IDocClassificationMap getDocClassification(IResource document)
throws WcmException
classifyDocuments.
Example:
IDocClassificationMap docClassification = classificationIndex.getDocClassification(document); String taxonomyName = "taxonomyXY"; IRidList taxonomyCategories = docClassification.getClasses(taxonomyName);The example returns a list of resource IDs for category folders in the taxonomy repository to which the document is assigned as regards taxonomy "taxonomyXY".
document - document for which the classification has to be returnedIDocClassificationMap with classifications for each taxonomy nameWcmException - exception raised in failure situation
public IDocClassificationMapList getDocListClassification(IResourceList documents)
throws WcmException
classifyDocuments.
Example:
IDocClassificationMapList docClassificationList = classificationIndex.getDocListClassification(documents); IDocClassificationMap docClassification = docClassificationList.get(0); String taxonomyName = "taxonomyXY"; IRidList taxonomyCategories = docClassification.getClasses(taxonomyName);The example returns a list of resource IDs for category folders in the taxonomy repository to which the first document in the list is assigned as regards taxonomy "taxonomyXY".
documents - list of documents for which the classification has to be returnedIDocClassificationMapList that contains
an IDocClassificationMap for every documentWcmException - exception raised in failure situation
public void setDocClassification(IDocClassificationMap documentClassificationMap)
throws WcmException
documentClassificationMap - container with the document and its classification for all taxonomiesWcmException - exception raised in failure situation
public void setDocClassification(IDocClassificationMap documentClassificationMap,
java.lang.String notToSend)
throws WcmException
public void setDocClassification(IDocClassificationMap documentClassificationMap,
boolean indexDocumentClassification)
throws WcmException
documentClassificationMap - container with the document and its classification for all taxonomiesindexDocumentClassification - 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 the document is indexed immediately before or after the call by another routine.WcmException - exception raised in failure situation
public void setDocClassification(IDocClassificationMap documentClassificationMap,
boolean indexDocumentClassification,
boolean isTrainingDocument)
throws WcmException
documentClassificationMap - container with the document and its classification for all taxonomiesindexDocumentClassification - 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 the document is indexed immediately before or after the call by another routine.isTrainingDocument - if true, the classification is indexed to train the indexWcmException - exception raised in failure situation
public void setDocListClassification(IDocClassificationMapList documentClassificationMapList)
throws WcmException
documentClassificationMapList - list of containers with the document and its classification for all taxonomiesWcmException - exception raised in failure situation
public void setDocumentClassification(IResource document,
java.util.Map classification)
throws WcmException
document - document for which the classification has to be setclassification - map with document classification. Key is (String) taxonomy name. Value is IRidList of
taxonomy class RIDs.WcmException - exception raised in failure situation
public void setDocumentClassification(IResource document,
java.util.Map classification,
boolean indexDocumentClassification)
throws WcmException
document - document for which the classification has to be setclassification - map with document classification. Key is (String) taxonomy name. Value is
IRidList of taxonomy class RIDs.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 the document is indexed immediately before or after the call by another routine.WcmException - exception raised in failure situation
public void setDocumentClassification(IResource document,
java.util.Map classification,
boolean indexDocumentClassification,
boolean isTrainingDocument)
throws WcmException
document - document for which the classification has to be setclassification - map with document classification. Key is (String) taxonomy name. Value is
IRidList of taxonomy class RIDs.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 immediately before or after the call by another routine.isTrainingDocument - if true, the classification is indexed to train the indexWcmException - exception raised in failure situation
public java.lang.Runnable getTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
throws WcmException
startTaxonomyTrainingCrawler
isSearchRelevant - indicates whether the documents are to become part of the index or should only be used to
train the indextaxonomyCollection - start collection of the hierarchy that is used to build up the taxonomy- Example:
Runnable taxonomyTrainingCrawler = clIndex.getTaxonomyTrainingCrawler(taxonomyCollection,false); Thread crawlerThread = new Thread(taxonomyTrainingCrawler);
crawlerThread.start();
WcmException - exception raised in failure situation
public void startTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
throws WcmException
taxonomyCollection - start collection of the hierarchy that is used to build up the taxonomyisSearchRelevant - indicates whether the documents are to become part of the index or should only be used to train the indexWcmException - exception raised in failure situation
public void startTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant,
boolean clearVisitedList,
ISemaphore semaphore)
throws WcmException
taxonomyCollection - start collection of the hierarchy that is used to build up the taxonomyisSearchRelevant - indicates whether the documents are to become part of the index or should only be used to train the indexclearVisitedList - clears all entries from the visited list of the index before crawlingsemaphore - 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.WcmException - exception raised in failure situation
semaphore can be null
public void startTaxonomyTrainingCrawler(java.lang.String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant,
boolean clearVisitedList,
ISemaphore semaphore)
throws WcmException
taxonomyName - name of the taxonomytaxonomyCollection - start collection of the hierarchy that is used to build up the taxonomyisSearchRelevant - indicates whether the documents are to become part of the index or should only be used to train the indexclearVisitedList - clears all entries from the visited list of the index before crawlingsemaphore - 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.WcmException - exception raised in failure situation
semaphore can be null
public void queueTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
throws WcmException
isSearchRelevant - indicates whether the documents are to become part of the index or should only be used to
train the indextaxonomyCollection - start collection of the hierarchy that is used to build up the taxonomyWcmException - exception raised in failure situation
public void queueTaxonomyTrainingCrawler(java.lang.String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant)
throws WcmException
taxonomyName - name of the taxonomytaxonomyCollection - start collection of the hierarchy that is used to build up the taxonomyisSearchRelevant - indicates whether the documents are to become part of the index or should only be used to
train the indexWcmException - exception raised in failure situation
public void createTaxonomyHierarchyByCopiing(java.lang.String taxonomyName,
ICollection existingHierarchy)
throws WcmException
taxonomyName - name of the taxonomyexistingHierarchy - root folder of the hierarchy to copy
public float getTaxonomyClassificationThreshold(java.lang.String taxonomyName,
java.lang.String thresholdId)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)thresholdId - Constant IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL1 or
IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL2WcmException - exception raised in failure situation
public void setTaxonomyClassificationThreshold(java.lang.String taxonomyName,
java.lang.String thresholdId,
float threshold)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)thresholdId - Constant IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL1 or
IClassificationIndex.PROP_NAME_THRESHOLD_LEVEL2threshold - the threshold value for the specified taxonomy that has to be setWcmException - exception raised in failure situation
public URI getTaxonomyTrainingUri(java.lang.String taxonomyName)
throws WcmException
public RID getTaxonomyTrainingRid(java.lang.String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)WcmException - exception raised in failure situation
public void setTaxonomyTrainingUri(java.lang.String taxonomyName,
URI trainingUri)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)trainingUri - the training URI for the specified taxonomyWcmException - exception raised in failure situation
public void setTaxonomyTrainingRid(java.lang.String taxonomyName,
RID trainingRid)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)trainingRid - the training RID for the specified taxonomyWcmException - exception raised in failure situationpublic java.lang.String getTaxonomyRmPrefix()
public boolean useBestClasses()
public java.util.Collection getBestClasses(IResourceList resourceDocuments,
java.lang.String taxonomyName)
throws WcmException
resourceDocuments - resource list of documents you want to classifytaxonomyName - taxonomy for which the best classes have to be proposedWcmException - exception raised in failure situation
public BestClassesSensitivity getTaxonomyBestClassesSensitivity(java.lang.String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)WcmException - exception raised in failure situation
public void setTaxonomyBestClassesSensitivity(java.lang.String taxonomyName,
BestClassesSensitivity sensitivity)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)sensitivity - the new TaxonomyBestClassesSensitivity valueWcmException - exception raised in failure situation
public boolean isTrainingDocument(IResource document,
RID taxonomyClassRid)
throws WcmException
document - the document to checktaxonomyClassRid - the RID of the taxonomy class that has to be checked
if the document is a training document
public ClassificationStatus getDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName)
throws WcmException
document - document to get the classification status fortaxonomyName - name of the taxonomy
public void setDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName,
ClassificationStatus status)
throws WcmException
document - document to get the classification status fortaxonomyName - name of the taxonomythe - documents classification status in the taxonomy
public void setDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName,
ClassificationStatus status,
java.lang.String notToSend)
throws WcmException
public void setDocumentClassificationStatus(IResource document,
java.lang.String taxonomyName,
ClassificationStatus status,
boolean sendEvents,
java.lang.String notToSend)
throws WcmException
public void setDocumentClassificationStatus(IResourceList documents,
java.lang.String taxonomyName,
ClassificationStatus status)
throws WcmException
documents - documents to set the classification status fortaxonomyName - name of the taxonomythe - documents classification status in the taxonomy
public IResourceList getDocumentsToClassify(java.lang.String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are to classify should be returned
public IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are never to be classified should be returned
public IResourceList getDocumentsToClassify(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are to classify should be returnedcontext - user context
public IResourceList getDocumentsNeverToClassify(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are never to be classified should be returnedcontext - user context
public IRidList getDocumentRidsToClassify(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are to be classified should be returnedcontext - user context
public IRidList getDocumentRidsNeverToClassify(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are never to be classified should be returnedcontext - user context
public RID getSpecialFolderRID(java.lang.String taxonomyName,
SpecialFolder specialFolderType)
throws WcmException
taxonomyName - name of the taxonomyspecialFolderType - type of special folder
public TaxonomyType getTaxonomyType(java.lang.String taxonomyName)
throws WcmException
taxonomyName - the name of the taxonomy
public void setTaxonomyType(java.lang.String taxonomyName,
TaxonomyType taxonomyType)
throws WcmException
public IRidList getDocumentTrainingClasses(IResource document)
throws WcmException
document - document for which the training classes have to be returned
public IRidList getManuallyDeclassifiedClasses(IResource document)
throws WcmException
document - document for that the manually declassified classes have to be returned
public void removeCategoryAssignments(ICollection deletedCategoryFolder)
throws WcmException
deletedCategoryFolder - category that has been deleted
public void autoClassifyDocs(java.lang.String taxonomyName,
IRidList docRidList,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomydocRidList - list IDs of documents of a taxonomy to be reclassifiedcontext - user context
public void autoClassifyDocs(java.lang.String taxonomyName,
IResourceList docList,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomydocList - list documents of a taxonomy to be reclassifiedcontext - user context
public void autoClassifyDocs(java.lang.String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomycontext - user context
public void synchronizeTaxonomyMetaData(java.lang.String taxonomyName)
throws WcmException
taxonomyName - taxonomy that has to be redefined
public void updateSearchCategoryAttributes(IResourceList oldResourceListe,
IResourceList newResourceListe,
java.lang.String taxonomyName,
RID categoryRid)
throws WcmException
categoryRid for the specified taxonomy is removed from
the index server for all resources in oldResourceListe and added to
all resources in newResourceListe.oldResourceListe - resources for which category attribute is deleted.newResourceListe - resources for which category attribute is deleted.WcmException - in case of an errorpublic boolean hasTaxonomy(java.lang.String name)
public UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName)
throws WcmException
taxonomyName - WcmException -
public UpdateTaxonomyState getUpdateTaxonomyState(java.lang.String taxonomyName,
java.util.Locale locale)
throws WcmException
taxonomyName - locale - WcmException -
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||