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

Interface IQueryFolder


public interface IQueryFolder

A query folder is a representation of a query based taxonomies category.

To get a query folder follow this example:

  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IQBClassificationIndex qbcIndex = (IQBClassificationIndex)indexService.getIndex("");
  IQueryFolder queryFolder = qbcIndex.getQueryFolder(RID.getRID("/taxonomies///"));
 


Method Summary
 IQueryFolder copy(com.sapportals.wcm.util.uri.RID destination, IResourceContext context)
          Reflects a copy of a folder in the taxonomy repository to perform the copy also in the hierarchical query structure.
 void delete(IResourceContext context)
          Deletes the query folder in the QBC-engine and in the CM persistence.
 String getIndexID()
          Gets the ID of the index where the query is stored.
 IQueryEntryList getQuery(IResourceContext context)
          Gets the query of the query folder.
 ISearchResultList getQueryDocuments(IResourceContext context)
          Documents of the index that match the query of the folder.
 com.sapportals.wcm.util.uri.RID getRID()
          Gets the resource ID of the query folder.
 boolean isDirty(IResourceContext context)
          A flag for the query folder that indicates whether the documents of the category match the current query or not.
 boolean isQueryDefined(IResourceContext context)
          Checks for existence of a query for the query folder.
 IQueryFolder move(com.sapportals.wcm.util.uri.RID destination, IResourceContext context)
          Reflects a move of a folder in the taxonomy repository to perform the move also in the hierarchical query structure.
 void setDirty(boolean isDirty, IResourceContext context)
          Sets a flag for the query folder that indicates that the documents of the category don't match the current query.
 void setQuery(IQueryEntryList query, IResourceContext context)
          Sets a query for the query folder.
 void setQueryFast(IQueryEntryList query, IResourceContext context)
          Sets a query for the query folder.
 

Method Detail

getIndexID

String getIndexID()
Gets the ID of the index where the query is stored.

Returns:
ID of the index

getRID

com.sapportals.wcm.util.uri.RID getRID()
Gets the resource ID of the query folder.

Returns:
resource ID of the query folder

getQuery

IQueryEntryList getQuery(IResourceContext context)
                         throws com.sapportals.wcm.WcmException
Gets the query of the query folder.
The query is stored with the query folder in CM and also inside the QBC-engine. Here the query is retrieved from the CM persistence.

Parameters:
context - user context
Returns:
query of this query folder.
Throws:
com.sapportals.wcm.WcmException

setQuery

void setQuery(IQueryEntryList query,
              IResourceContext context)
              throws com.sapportals.wcm.WcmException
Sets a query for the query folder.
The query is directly made persistent. The documents of the folder will not automatically change with the query. To update the documents that they match with the query IQBClassificationIndex#updateCategoryContents must be executed.

Parameters:
query - query to set for this query folder
context - user context
Throws:
com.sapportals.wcm.WcmException

setQueryFast

void setQueryFast(IQueryEntryList query,
                  IResourceContext context)
                  throws com.sapportals.wcm.WcmException
Sets a query for the query folder.
The query is directly made persistent. The documents of the folder will not automatically change with the query. To update the documents that they match with the query IQBClassificationIndex#updateCategoryContents must be executed. This is the faster version for Trex than setQuery.

Parameters:
query - query to set for this query folder
context - user context
Throws:
com.sapportals.wcm.WcmException

move

IQueryFolder move(com.sapportals.wcm.util.uri.RID destination,
                  IResourceContext context)
                  throws com.sapportals.wcm.WcmException
Reflects a move of a folder in the taxonomy repository to perform the move also in the hierarchical query structure.

Parameters:
destination - resource ID of the query folder after the move
context - user context
Returns:
the moved query folder
Throws:
com.sapportals.wcm.WcmException

copy

IQueryFolder copy(com.sapportals.wcm.util.uri.RID destination,
                  IResourceContext context)
                  throws com.sapportals.wcm.WcmException
Reflects a copy of a folder in the taxonomy repository to perform the copy also in the hierarchical query structure.

Parameters:
destination - resource ID of the query folder after the copy
Returns:
the copied query folder
Throws:
com.sapportals.wcm.WcmException

delete

void delete(IResourceContext context)
            throws com.sapportals.wcm.WcmException
Deletes the query folder in the QBC-engine and in the CM persistence.

Parameters:
context - user context
Throws:
com.sapportals.wcm.WcmException

setDirty

void setDirty(boolean isDirty,
              IResourceContext context)
              throws com.sapportals.wcm.WcmException
Sets a flag for the query folder that indicates that the documents of the category don't match the current query.
To update the folder IQBClassificationIndex#updateCategoryContents must be executed.

Parameters:
isDirty - true if the query of the folder has been updated but the documents of the folder are still the old.
context - user context
Throws:
com.sapportals.wcm.WcmException

isDirty

boolean isDirty(IResourceContext context)
                throws com.sapportals.wcm.WcmException
A flag for the query folder that indicates whether the documents of the category match the current query or not.

Parameters:
context - user context
Returns:
true if the query of the folder has been updated but the documents of the folder are still old.
Throws:
com.sapportals.wcm.WcmException

getQueryDocuments

ISearchResultList getQueryDocuments(IResourceContext context)
                                    throws com.sapportals.wcm.WcmException
Documents of the index that match the query of the folder.
Since the queries are hierarchical the returned documents also match the queries of the parent folders.

Parameters:
context - user context
Returns:
list of documents with their rank values that match the query of the folder.
Throws:
com.sapportals.wcm.WcmException

isQueryDefined

boolean isQueryDefined(IResourceContext context)
                       throws com.sapportals.wcm.WcmException
Checks for existence of a query for the query folder.

Parameters:
context - user context
Returns:
true if a query is defined for the query folder
Throws:
com.sapportals.wcm.WcmException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice