SAP NetWeaver '04

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

[contained in: com.sap.km.cm.service.par - km.shared.service.indexmanagement_api.jar]
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(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.
 java.lang.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.
 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(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

public java.lang.String getIndexID()
Gets the ID of the index where the query is stored.
Returns:
ID of the index

getRID

public RID getRID()
Gets the resource ID of the query folder.
Returns:
resource ID of the query folder

getQuery

public IQueryEntryList getQuery(IResourceContext context)
                         throws 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.

setQuery

public void setQuery(IQueryEntryList query,
                     IResourceContext context)
              throws 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

setQueryFast

public void setQueryFast(IQueryEntryList query,
                         IResourceContext context)
                  throws 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

move

public IQueryFolder move(RID destination,
                         IResourceContext context)
                  throws 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

copy

public IQueryFolder copy(RID destination,
                         IResourceContext context)
                  throws 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

delete

public void delete(IResourceContext context)
            throws WcmException
Deletes the query folder in the QBC-engine and in the CM persistence.
Parameters:
context - user context

setDirty

public void setDirty(boolean isDirty,
                     IResourceContext context)
              throws 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

isDirty

public boolean isDirty(IResourceContext context)
                throws 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.

getQueryDocuments

public ISearchResultList getQueryDocuments(IResourceContext context)
                                    throws 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.

isQueryDefined

public boolean isQueryDefined(IResourceContext context)
                       throws 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

SAP NetWeaver '04

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

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