|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | 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 String |
AINBOX_CATEGORY_TO_CLASSIFY
Deprecated. as of NW04. |
static String |
DEFAULT_THRESHOLD_LEVEL1
Default threshold 1 property. |
static String |
DEFAULT_THRESHOLD_LEVEL2
Default threshold 2 property. |
static 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 String |
PROP_NAME_THRESHOLD_LEVEL1
Property name of the "threshold 1"-property of a taxonomy folder The taxonomy namespace is used. |
static String |
PROP_NAME_THRESHOLD_LEVEL2
Property name of the "threshold 2"-property of a taxonomy folder The taxonomy namespace is used. |
static 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 String |
TAX_THRESHOLD_DEFAULT_VALUE
Default value of the threshold properties if no threshold value is set for a taxonomy. |
static 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 String |
WORKLIST_FOLDER_NAME
Deprecated. as of NW04. |
| Method Summary | |
void |
addTaxonomy(String taxonomyName)
Deprecated. as of NW04. Use addTaxonomy(String,IResourceContext) |
void |
addTaxonomy(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(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(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(String taxonomyName,
IRidList docRidList,
IResourceContext context)
Requests proposals for the best categories for the documents and sets these categories automatically as document classification. |
Collection |
classifyDocuments(IResourceList resourceDocuments,
String taxonomyName)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
Collection |
classifyDocuments(IResourceList resourceDocuments,
String taxonomyName,
float threshold,
int maxResults)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
Collection |
classifyDocuments(IResourceList resourceDocuments,
String taxonomyName,
int maxResults)
Classifies documents into existing categories of a taxonomy The returned results are only proposals. |
Collection |
clusterDocuments(IResourceList resourceDocuments,
int maxResults)
Divides documents into clusters of documents The clustering is done on the basis of content similarity. |
void |
createTaxonomyHierarchyByCopiing(String taxonomyName,
ICollection existingHierarchy)
The taxonomy hierarchy is created by copiing an existing hierarchy. |
Map |
doGeneric(String function,
Map parameters)
Enables an index service to perform classification actions that are not reflected by the interface |
Collection |
getBestClasses(IResourceList resourceDocuments,
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.
|
Collection |
getClassFeatures(Collection taxonomyClassUris,
String taxonomyName,
int maxResults)
Deprecated. as of NW04. Use getClassFeatures(IRidList taxonomyClassRids,String taxonomyName, int maxResults) |
Collection |
getClassFeatures(IRidList taxonomyClassRids,
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.
|
Map |
getDocumentClassification(IResource document)
Deprecated. as of NW04. Use getDocClassification(IResource) |
ClassificationStatus |
getDocumentClassificationStatus(IResource document,
String taxonomyName)
Gets the classification status of a document for a taxonomy |
IRidList |
getDocumentRidsNeverToClassify(String taxonomyName,
IResourceContext context)
Gets all RIDs of documents for an index that have the status "never to classify" in a taxonomy |
IRidList |
getDocumentRidsToClassify(String taxonomyName,
IResourceContext context)
Gets all RIDs of documents of an index that have the status "to classify" in a taxonomy |
IResourceList |
getDocumentsNeverToClassify(String taxonomyName)
Deprecated. as of NW04. Use getDocumentsNeverToClassify(String,IResourceContext) |
IResourceList |
getDocumentsNeverToClassify(String taxonomyName,
IResourceContext context)
Gets all documents of an index that have the status "never to classify" in a taxonomy |
IResourceList |
getDocumentsToClassify(String taxonomyName)
Deprecated. as of NW04. Use getDocumentsToClassify(String,IResourceContext) |
IResourceList |
getDocumentsToClassify(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(String taxonomyName,
SpecialFolder specialFolderType)
|
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(String taxonomyName)
Gets the sensitivity level of the best classes algorithm |
float |
getTaxonomyClassificationThreshold(String taxonomyName,
String thresholdId)
Gets the threshold of a taxonomy |
String |
getTaxonomyRmPrefix()
|
Runnable |
getTaxonomyTrainingCrawler(ICollection taxonomyCollection,
boolean isSearchRelevant)
Deprecated. as of NW04. Use startTaxonomyTrainingCrawler |
RID |
getTaxonomyTrainingRid(String taxonomyName)
Gets the URI of the root folder of the hierarchy that has been used to train/create the given taxonomy. |
URI |
getTaxonomyTrainingUri(String taxonomyName)
Deprecated. as of NW04. Use getTaxonomyTrainingRid(String) |
TaxonomyType |
getTaxonomyType(String taxonomyName)
|
UpdateTaxonomyState |
getUpdateTaxonomyState(String taxonomyName)
Returns the actual state of the taxonomy with respect to an actually running update. |
UpdateTaxonomyState |
getUpdateTaxonomyState(String taxonomyName,
Locale locale)
Returns the actual state of the taxonomy with respect to an actually running update. |
boolean |
hasTaxonomy(String name)
|
void |
indexDocument(IResource resource,
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. |
void |
indexDocument(IResource resource,
String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
Deprecated. as of NW04. Use indexDocument(IResource, String, IRidList, boolean) |
void |
indexDocuments(IResourceList resources,
String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
Indexes a list of documents It is recommended that you do not index documents manually using this method. |
void |
indexDocuments(IResourceList resources,
String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
Deprecated. as of NW04. Use indexDocuments(IResourceList, String, IRidList, boolean) |
void |
initTaxonomies(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(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(String taxonomyName)
Deprecated. as of NW04. Use removeTaxonomy(String,IResourceContext) |
void |
removeTaxonomy(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,
String notToSend)
|
void |
setDocListClassification(IDocClassificationMapList documentClassificationMapList)
Stores the documents classification that has been chosen by manual or automatic classification |
void |
setDocumentClassification(IResource document,
Map classification)
Deprecated. as of NW04. Use setDocClassification(IResource,Map) |
void |
setDocumentClassification(IResource document,
Map classification,
boolean indexDocumentClassification)
Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean) |
void |
setDocumentClassification(IResource document,
Map classification,
boolean indexDocumentClassification,
boolean isTrainingDocument)
Deprecated. as of NW04. Use setDocClassification(IResource,Map,boolean, boolean) |
void |
setDocumentClassificationStatus(IResourceList documents,
String taxonomyName,
ClassificationStatus status)
Sets the classification status for a list of documents for a taxonomy |
void |
setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status)
Sets the classification status of a document for a taxonomy |
void |
setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status,
boolean sendEvents,
String notToSend)
This method is for internal usage only |
void |
setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status,
String notToSend)
This method is for internal usage only |
void |
setTaxonomyBestClassesSensitivity(String taxonomyName,
BestClassesSensitivity sensitivity)
Sets the threshold of a taxonomy |
void |
setTaxonomyClassificationThreshold(String taxonomyName,
String thresholdId,
float threshold)
Sets the threshold of a taxonomy |
void |
setTaxonomyTrainingRid(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(String taxonomyName,
URI trainingUri)
Deprecated. as of NW04. Use setTaxonomyTrainingRid(String, RID) |
void |
setTaxonomyType(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(String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant,
boolean clearVisitedList,
ISemaphore semaphore)
Runs a taxonomy training crawler. |
void |
synchronizeTaxonomyMetaData(String taxonomyName)
Rebuilds the taxonomy meta data on the classification engine. |
void |
updateSearchCategoryAttributes(IResourceList oldResourceListe,
IResourceList newResourceListe,
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 String TAXONOMY_NAMESPACE
Example:
String namespace = new StringBuffer(IWcmConst.SAP_WCM_NAMESPACE).append(IClassificationIndex.TAXONOMY_NAMESPACE).toString();
public static final String PROP_NAME_THRESHOLD_LEVEL1
getTaxonomyClassificationThreshold should be used instead.
TAXONOMY_NAMESPACE,
getTaxonomyClassificationThreshold(String,String),
Constant Field Valuespublic static final String PROP_NAME_THRESHOLD_LEVEL2
getTaxonomyClassificationThreshold should be used instead.
TAXONOMY_NAMESPACE,
getTaxonomyClassificationThreshold(String,String),
Constant Field Valuespublic static final String PROP_NAME_BEST_CLASSES_SENSITIVITY
getTaxonomyBestClassesSensitivity should be used instead.
TAXONOMY_NAMESPACE,
getTaxonomyBestClassesSensitivity(String),
Constant Field Valuespublic static final String PROP_NAME_TRAINING_URI
getTaxonomyTrainingRid should be used instead.
TAXONOMY_NAMESPACE,
getTaxonomyTrainingRid(String),
Constant Field Valuespublic static final String DEFAULT_THRESHOLD_LEVEL1
public static final String DEFAULT_THRESHOLD_LEVEL2
public static final String TAX_THRESHOLD_DEFAULT_VALUE
public static final String WORKLIST_FOLDER_NAME
public static final String AINBOX_CATEGORY_TO_CLASSIFY
| Method Detail |
public List getTaxonomies()
String) of the classification index
public void addTaxonomy(String taxonomyName)
throws WcmException
addTaxonomy(String,IResourceContext)
taxonomyName - name of the taxonomy to be added to the index
WcmException - exception raised in failure situation
public void addTaxonomy(String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy to be added to the indexcontext - user context
WcmException - exception raised in failure situationpublic void removeTaxonomy(String taxonomyName)
removeTaxonomy(String,IResourceContext)
taxonomyName - name of the taxonomy to remove
public void removeTaxonomy(String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy to removecontext - user context
WcmException
public void indexDocument(IResource resource,
String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
IOException
ResourceException
WcmException
IOException
public void indexDocument(IResource resource,
String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
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 classes
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
IOException - exception raised in failure situation
public void indexDocuments(IResourceList resources,
String taxonomyName,
IUriList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
IOException
ResourceException
WcmException
IOException
public void indexDocuments(IResourceList resources,
String taxonomyName,
IRidList taxonomyClasses,
boolean isSearchRelevant)
throws ResourceException,
WcmException,
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 classes
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
IOException - exception raised in failure situation
public Collection getClassFeatures(Collection taxonomyClassUris,
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 returned
WcmException - exception raised in failure situation
public Collection getClassFeatures(IRidList taxonomyClassRids,
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 returned
IClassificationResult
WcmException - exception raised in failure situationIClassificationResult
public Collection classifyDocuments(IResourceList resourceDocuments,
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 document
IClassificationResult
WcmException - exception raised in failure situationIClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public Collection classifyDocuments(IResourceList resourceDocuments,
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 found
IClassificationResult
- Throws:
WcmException - exception raised in failure situation- See Also:
IClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public Collection classifyDocuments(IResourceList resourceDocuments,
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 document
IClassificationResult
WcmException - exception raised in failure situationIClassificationResult,
getDocClassification(IResource),
setDocClassification(IDocClassificationMap)
public 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 clusters
ICluster)
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 for
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situationgetSpecialFolderRID(String,SpecialFolder)public void initTaxonomies(List taxonomies)
taxonomies - list of taxonomy names (String)
public Map doGeneric(String function,
Map parameters)
throws WcmException
function - name of the function that has to be performedparameters - parameters for the function that has to be performed
WcmException - exception raised in failure situation
public Map getDocumentClassification(IResource document)
throws WcmException
setDocumentClassification().
document - document for which the classification has to be returned
String) 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 returned
IDocClassificationMap with classifications for each taxonomy name
WcmException - 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 returned
IDocClassificationMapList that contains
an IDocClassificationMap for every document
WcmException - exception raised in failure situation
public void setDocClassification(IDocClassificationMap documentClassificationMap)
throws WcmException
documentClassificationMap - container with the document and its classification for all taxonomies
WcmException - exception raised in failure situation
public void setDocClassification(IDocClassificationMap documentClassificationMap,
String notToSend)
throws WcmException
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 index
WcmException - exception raised in failure situation
public void setDocListClassification(IDocClassificationMapList documentClassificationMapList)
throws WcmException
documentClassificationMapList - list of containers with the document and its classification for all taxonomies
WcmException - exception raised in failure situation
public void setDocumentClassification(IResource document,
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,
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,
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 index
WcmException - exception raised in failure situation
public 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 index
WcmException - 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(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 taxonomy
WcmException - exception raised in failure situation
public void queueTaxonomyTrainingCrawler(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 index
WcmException - exception raised in failure situation
public void createTaxonomyHierarchyByCopiing(String taxonomyName,
ICollection existingHierarchy)
throws WcmException
taxonomyName - name of the taxonomyexistingHierarchy - root folder of the hierarchy to copy
WcmException
public float getTaxonomyClassificationThreshold(String taxonomyName,
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_LEVEL2
WcmException - exception raised in failure situation
public void setTaxonomyClassificationThreshold(String taxonomyName,
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 set
WcmException - exception raised in failure situation
public URI getTaxonomyTrainingUri(String taxonomyName)
throws WcmException
WcmException
public RID getTaxonomyTrainingRid(String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)
WcmException - exception raised in failure situation
public void setTaxonomyTrainingUri(String taxonomyName,
URI trainingUri)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)trainingUri - the training URI for the specified taxonomy
WcmException - exception raised in failure situation
public void setTaxonomyTrainingRid(String taxonomyName,
RID trainingRid)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)trainingRid - the training RID for the specified taxonomy
WcmException - exception raised in failure situationpublic String getTaxonomyRmPrefix()
public boolean useBestClasses()
public Collection getBestClasses(IResourceList resourceDocuments,
String taxonomyName)
throws WcmException
resourceDocuments - resource list of documents you want to classifytaxonomyName - taxonomy for which the best classes have to be proposed
WcmException - exception raised in failure situation
public BestClassesSensitivity getTaxonomyBestClassesSensitivity(String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)
WcmException - exception raised in failure situation
public void setTaxonomyBestClassesSensitivity(String taxonomyName,
BestClassesSensitivity sensitivity)
throws WcmException
taxonomyName - name of the taxonomy (must exist for index)sensitivity - the new TaxonomyBestClassesSensitivity value
WcmException - 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
WcmException
public ClassificationStatus getDocumentClassificationStatus(IResource document,
String taxonomyName)
throws WcmException
document - document to get the classification status fortaxonomyName - name of the taxonomy
WcmException
public void setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status)
throws WcmException
document - document to get the classification status fortaxonomyName - name of the taxonomy
WcmException
public void setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status,
String notToSend)
throws WcmException
WcmException
public void setDocumentClassificationStatus(IResource document,
String taxonomyName,
ClassificationStatus status,
boolean sendEvents,
String notToSend)
throws WcmException
WcmException
public void setDocumentClassificationStatus(IResourceList documents,
String taxonomyName,
ClassificationStatus status)
throws WcmException
documents - documents to set the classification status fortaxonomyName - name of the taxonomy
WcmException
public IResourceList getDocumentsToClassify(String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are to classify should be returned
WcmException
public IResourceList getDocumentsNeverToClassify(String taxonomyName)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are never to be classified should be returned
WcmException
public IResourceList getDocumentsToClassify(String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomy for which the documents that are to classify should be returnedcontext - user context
WcmException
public IResourceList getDocumentsNeverToClassify(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
WcmException
public IRidList getDocumentRidsToClassify(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
WcmException
public IRidList getDocumentRidsNeverToClassify(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
WcmException
public RID getSpecialFolderRID(String taxonomyName,
SpecialFolder specialFolderType)
throws WcmException
taxonomyName - name of the taxonomyspecialFolderType - type of special folder
WcmException
public TaxonomyType getTaxonomyType(String taxonomyName)
throws WcmException
taxonomyName - the name of the taxonomy
WcmException
public void setTaxonomyType(String taxonomyName,
TaxonomyType taxonomyType)
throws WcmException
WcmException
public IRidList getDocumentTrainingClasses(IResource document)
throws WcmException
document - document for which the training classes have to be returned
WcmException
public IRidList getManuallyDeclassifiedClasses(IResource document)
throws WcmException
document - document for that the manually declassified classes have to be returned
WcmException
public void removeCategoryAssignments(ICollection deletedCategoryFolder)
throws WcmException
deletedCategoryFolder - category that has been deleted
WcmException
public void autoClassifyDocs(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
WcmException
public void autoClassifyDocs(String taxonomyName,
IResourceList docList,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomydocList - list documents of a taxonomy to be reclassifiedcontext - user context
WcmException
public void autoClassifyDocs(String taxonomyName,
IResourceContext context)
throws WcmException
taxonomyName - name of the taxonomycontext - user context
WcmException
public void synchronizeTaxonomyMetaData(String taxonomyName)
throws WcmException
taxonomyName - taxonomy that has to be redefined
WcmException
public void updateSearchCategoryAttributes(IResourceList oldResourceListe,
IResourceList newResourceListe,
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(String name)
public UpdateTaxonomyState getUpdateTaxonomyState(String taxonomyName)
throws WcmException
taxonomyName -
WcmException
public UpdateTaxonomyState getUpdateTaxonomyState(String taxonomyName,
Locale locale)
throws WcmException
taxonomyName - locale -
WcmException
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||