|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.control.released.search.SearchQueryListBuilder
The SearchQueryListBuilder provides auxiliary functions for building a search query list for the KM index management API
Copyright 2004 SAP AG
| Constructor Summary | |
SearchQueryListBuilder()
Constructor of SearchQueryListBuilder |
|
SearchQueryListBuilder(java.util.Hashtable searchParameters)
Constructor method of SearchQueryListBuilder for which the search parameters must be provided initially. |
|
| Method Summary | |
IQueryEntryList |
buildDidYouMeanQueryEntries(IQueryEntryList oldQuery,
java.lang.String oldTerm,
java.lang.String didYouMeanTerm)
Provides an adapted new query entry list for a "Did You Mean" search. |
IQueryEntry |
buildQueryEntryConnector(java.lang.String connector)
Builds a single query entry that can be used as the connection between two query entry lists. |
IQueryEntry |
buildQueryEntryTimeWindow(IPropertyName propertyName,
java.util.Date startDate,
java.util.Date endDate)
Simple method for building a time window query entry list. |
IQueryEntryList |
buildSearchQueryList()
Central method for building query entry list that takes all set conditions into account. |
static byte |
getBestSearchAction(java.lang.String text)
Algorithmus that returns the 'best practice' search method. |
static java.lang.String |
getDidYouMeanTerm(IQueryEntryList queryEntryList,
java.lang.String oldSearchTerm)
Method extracts the "Did you mean" search term. |
java.lang.String |
getSearchAddProps()
Returns the current additional search properties. |
java.lang.String |
getSearchTerm()
Returns the current SearchTerm that will be recognized when building the query entry list. |
java.lang.String |
getSelectedCustomProps()
Returns the current property and value setting for the custom property query condition. |
java.lang.String |
getSelectedDescription()
Returns the current setting for the description condition of a document. |
java.util.Date |
getSelectedEndDate()
Returns the current SelectedEndDate attribute that will be recognized
when building the query entry list.
|
java.lang.String |
getSelectedItems()
Returns the current SelectedItems attribute that will be recognized when building the query entry list.
|
java.lang.String |
getSelectedNotOlderRange()
Returns the current setting for the document time range. |
java.lang.String |
getSelectedSearchAction()
Returns the current search method for the textual search on content, description, and display name for the specified search term. |
java.lang.String |
getSelectedSimilarTerms()
Returns the current setting for the similar terms condition. |
java.util.Date |
getSelectedStartDate()
Returns the current SelectedStartDate attribute that will be recognized when building the query entry list.
|
java.lang.String |
getSelectedTitle()
Returns the current search setting for the selected display name/title of a document. |
java.lang.String |
getTermConnection()
Returns the current setting for term connection mode. |
boolean |
isDescriptionIncluded()
Returns the current setting for the description included flag. |
boolean |
isDisplaynameIncluded()
Returns the current setting for the display name included flag. |
void |
setDescriptionIncluded(boolean value)
Sets flag for search on description during normal term search. |
void |
setDisplaynameIncluded(boolean value)
Sets flag for search on display name during normal term search. |
void |
setSearchAddProps(java.lang.String value)
Sets additional search properties. |
void |
setSearchParameters(java.util.Hashtable searchParameters)
Sets the search parameters by means of a hash table. |
void |
setSearchTerm(java.lang.String searchTerm)
Sets the SearchTerm attribute for the query entry list to be built.
|
void |
setSelectedCustomProps(java.lang.String value)
Sets a combination of property name and value that will be recognized as the custom property query condition. |
void |
setSelectedDescription(java.lang.String value)
Sets the parameter that will be used to search within the description. |
void |
setSelectedEndDate(java.util.Date value)
Sets the SelectedEndDate attribute that will be recognized as the end date when building the
query entry list for the date properties 'Modified' (cm_modified) and 'Created'.
( |
void |
setSelectedItems(java.lang.String value)
Sets the item selection option that will be recognized when building the query entry list. |
void |
setSelectedNotOlderRange(java.lang.String value)
Sets the document time range condition during which the document was last modified. |
void |
setSelectedSearchAction(java.lang.String value)
Sets the search method for the textual search on content, description, and display name for the specified search term. |
void |
setSelectedSimilarTerms(java.lang.String value)
Sets similar terms string. |
void |
setSelectedStartDate(java.util.Date value)
Sets the SelectedStartDate attribute that will be recognized as the start date when building the
query entry list for the date properties 'Modified' (cm_modified) and 'Created'.
( |
void |
setSelectedTitle(java.lang.String value)
Sets the parameter that will be used to search only within the display name. |
void |
setTermConnection(java.lang.String value)
Sets mode for search terms query connection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SearchQueryListBuilder()
SearchQueryListBuilderpublic SearchQueryListBuilder(java.util.Hashtable searchParameters)
setSearchParameters for detailed information.searchParameters - new SearchParameters tablesetSearchParameters(java.util.Hashtable),
buildSearchQueryList()| Method Detail |
public void setSearchTerm(java.lang.String searchTerm)
SearchTerm attribute for the query entry list to be built.
This SearchTerm will be used for searching in the following properties:
setDisplaynameIncluded)
setDescriptionIncluded)
setSearchAddProps)searchTerm - new SearchTerm for the "standard" search requestgetSearchTerm(),
setDisplaynameIncluded(boolean),
setDescriptionIncluded(boolean),
setSearchAddProps(java.lang.String),
isDisplaynameIncluded(),
isDescriptionIncluded(),
getSearchAddProps()public java.lang.String getSearchTerm()
SearchTerm that will be recognized when building the query entry list.SearchTerm
setSearchTerm(java.lang.String)public void setSelectedItems(java.lang.String value)
SearchParamConst.ITEM_ALL
SearchParamConst.ITEM_ONLY_FOLDERS
SearchParamConst.ITEM_ONLY_DOCS
SearchParamConst.ITEM_NO_FOLDERS
value - new SelectedItems attributegetSelectedItems()public java.lang.String getSelectedItems()
SelectedItems attribute that will be recognized when building the query entry list.
SelectedItems attributesetSelectedItems(java.lang.String)public void setSelectedStartDate(java.util.Date value)
SelectedStartDate attribute that will be recognized as the start date when building the
query entry list for the date properties 'Modified' (cm_modified) and 'Created'.
(cm_created) connected by OR.
SelectedStartDate and SelectedEndDate both need to be set.
buildQueryEntryTimeWindow directly.value - new SelectedStartDate attributegetSelectedStartDate(),
setSelectedEndDate(java.util.Date),
getSelectedEndDate(),
buildQueryEntryTimeWindow(com.sapportals.wcm.repository.IPropertyName, java.util.Date, java.util.Date)public java.util.Date getSelectedStartDate()
SelectedStartDate attribute that will be recognized when building the query entry list.
SelectedStartDate attributesetSelectedStartDate(java.util.Date),
setSelectedEndDate(java.util.Date),
getSelectedEndDate(),
buildQueryEntryTimeWindow(com.sapportals.wcm.repository.IPropertyName, java.util.Date, java.util.Date)public void setSelectedEndDate(java.util.Date value)
SelectedEndDate attribute that will be recognized as the end date when building the
query entry list for the date properties 'Modified' (cm_modified) and 'Created'.
(cm_created) connected by OR.
The attributes SelectedStartDate and SelectedEndDate both need to be set.
buildQueryEntryTimeWindow directly.value - new SelectedStartDate attributegetSelectedEndDate(),
setSelectedStartDate(java.util.Date),
getSelectedStartDate(),
buildQueryEntryTimeWindow(com.sapportals.wcm.repository.IPropertyName, java.util.Date, java.util.Date)public java.util.Date getSelectedEndDate()
SelectedEndDate attribute that will be recognized
when building the query entry list.
SelectedEndDate attributesetSelectedEndDate(java.util.Date),
setSelectedStartDate(java.util.Date),
getSelectedStartDate(),
buildQueryEntryTimeWindow(com.sapportals.wcm.repository.IPropertyName, java.util.Date, java.util.Date)public void setSelectedSearchAction(java.lang.String value)
SearchParamConst.ACTION_FUZZY
SearchParamConst.ACTION_EXACT
SearchParamConst.ACTION_LINGUISTIC
SearchParamConst.ACTION_AUTOMATIC
AUTOMATIC).value - new SelectedSearchAction attributegetBestSearchAction(java.lang.String),
getSelectedSearchAction(),
setSearchTerm(java.lang.String)public java.lang.String getSelectedSearchAction()
SelectedSearchAction attributegetBestSearchAction(java.lang.String),
setSelectedSearchAction(java.lang.String),
setSearchTerm(java.lang.String)public void setSearchAddProps(java.lang.String value)
setSearchTerm) will be searched for additionally.
With standard, only content, description, and the display name are searched for.
Specify multiple properties as a comma-separated list of unique property IDs.
createdby,modifiedby,embedded-keywords
searchAddProps - - new SearchAddProps attributegetSearchAddProps(),
setSearchTerm(java.lang.String)public java.lang.String getSearchAddProps()
setSearchAddProps(java.lang.String),
setSearchTerm(java.lang.String)public void setSelectedCustomProps(java.lang.String value)
AND.
OR.
selectedCustomProps - new SelectedCustomProps attributegetSelectedCustomProps()public java.lang.String getSelectedCustomProps()
SelectedCustomProps attributesetSelectedCustomProps(java.lang.String)public void setSelectedNotOlderRange(java.lang.String value)
SearchParamConst.NOT_OLDER_NONE - no query entry is built
SearchParamConst.NOT_OLDER_TODAY
SearchParamConst.NOT_OLDER_WEEK
SearchParamConst.NOT_OLDER_MONTH
SearchParamConst.NOT_OLDER_3_MONTHSselectedNotOlderRange - new SelectedNotOlderRange attributegetSelectedNotOlderRange()public java.lang.String getSelectedNotOlderRange()
SelectedNotOlderRange attributesetSelectedNotOlderRange(java.lang.String)public void setSelectedTitle(java.lang.String value)
Text), display name (String), access-Uri (String).
The properties that are taken into account during the search are decided by the occurrence of the generic
symbol "*" and an extension symbol ".".
String) and access-uri
String) and display name (Text)
OR.
Search method for search on display name (Text) is taken from the
preset value. If no method is specified, 'best practice' is used.
Text) is taken from the
preset value. If no method is specified, 'best practice' is used.
selectedTitle - new SelectedTitle attributegetSelectedTitle(),
setSelectedSearchAction(java.lang.String)public java.lang.String getSelectedTitle()
SelectedTitle attributesetSelectedTitle(java.lang.String)public void setSelectedDescription(java.lang.String value)
Text) is taken from the
preset value. If no method is specified, 'best practice' is used.selectedDescription - - new SelectedDescription attributegetSelectedDescription(),
setSelectedSearchAction(java.lang.String)public java.lang.String getSelectedDescription()
SelectedDescriptionsetSelectedDescription(java.lang.String)public void setSelectedSimilarTerms(java.lang.String value)
value - new SelectedSimilarTerms attributegetSelectedSimilarTerms()public java.lang.String getSelectedSimilarTerms()
SelectedDescription attributesetSelectedSimilarTerms(java.lang.String)public void setDisplaynameIncluded(boolean value)
value - new DisplaynameIncluded flagisDisplaynameIncluded(),
setSearchTerm(java.lang.String)public boolean isDisplaynameIncluded()
DisplaynameIncluded flagsetDisplaynameIncluded(boolean),
setSearchTerm(java.lang.String)public void setDescriptionIncluded(boolean value)
value - new DescriptionIncluded flagisDescriptionIncluded(),
setSearchTerm(java.lang.String)public boolean isDescriptionIncluded()
DescriptionIncluded flagsetDescriptionIncluded(boolean),
setSearchTerm(java.lang.String)public void setTermConnection(java.lang.String value)
TermConnections the search term queries are connected in different ways.
value - new TermConnection modegetTermConnection()public java.lang.String getTermConnection()
TermConnectionsetTermConnection(java.lang.String)public void setSearchParameters(java.util.Hashtable searchParameters)
SearchParamConst.PARAM_SEARCH_TERM (String)
SearchParamConst.PARAM_SEARCH_ADD_PROPS (String)
SearchParamConst.PARAM_CUSTOM_PROPS (String)
SearchParamConst.PARAM_DESCRIPTION (String)
SearchParamConst.PARAM_NOT_OLDER_RANGE (String)
SearchParamConst.PARAM_TITLE (String)
SearchParamConst.PARAM_SEARCH_ACTION (String)
SearchParamConst.PARAM_SIMILAR_TERMS (String)
SearchParamConst.PARAM_ITEMS_SELECTION (String)searchParameters - new SearchParameters tablegetSearchTerm(),
getSearchAddProps(),
getSelectedCustomProps(),
getSelectedNotOlderRange(),
getSelectedTitle(),
getSelectedDescription(),
getSelectedSearchAction(),
getSelectedSimilarTerms(),
getSelectedItems()
public IQueryEntryList buildSearchQueryList()
throws WcmException
SearchQueryListBuilder searchQueryListBuilder = new searchQueryListBuilder();
searchQueryListBuilder.setSearchTerm(mySearchTerm);
IQueryEntryList queryEntryList = searchQueryListBuilder.buildSearchQueryEntryList();
WcmException - SearchQueryListBuilder()
public IQueryEntryList buildDidYouMeanQueryEntries(IQueryEntryList oldQuery,
java.lang.String oldTerm,
java.lang.String didYouMeanTerm)
throws WcmException
getDidYouMeanTerm.oldQuery - old query entry listoldTerm - old search termdidYouMeanTerm - new "Did you mean term"WcmException - getDidYouMeanTerm(com.sapportals.wcm.service.indexmanagement.retrieval.search.IQueryEntryList, java.lang.String)
public IQueryEntry buildQueryEntryTimeWindow(IPropertyName propertyName,
java.util.Date startDate,
java.util.Date endDate)
throws WcmException
startDate and endDate need to be set.
AND or OR.propertyName - KM property name object that specifies attribute to be searched forstartDate - starting date of time windowendDate - ending date of time windowWcmException - public static byte getBestSearchAction(java.lang.String text)
EXACT for wildcards, quotation marks at start and end
or only capital and non-lingustic chars (for example ABC$§&/())
LINGUSITIC for at least one lingustic meaningful char (for example, abc)
setSelectedSearchAction with
the parameter value SearchParamConst.ACTION_AUTOMATIC.text - search termsetSelectedSearchAction(java.lang.String),
getSelectedSearchAction()
public static java.lang.String getDidYouMeanTerm(IQueryEntryList queryEntryList,
java.lang.String oldSearchTerm)
throws WcmException
buildDidYouMeanQueryEntries.queryEntryList - old query entry listoldSearchTerm - old search termWcmException - buildDidYouMeanQueryEntries(com.sapportals.wcm.service.indexmanagement.retrieval.search.IQueryEntryList, java.lang.String, java.lang.String)
public IQueryEntry buildQueryEntryConnector(java.lang.String connector)
throws WcmException
IQueryEntry.OPERATOR_AND - AND connection
IQueryEntry.OPERATOR_OR - OR connection
IQueryEntry.OPERATOR_NOT - NOT connection
...
SearchQueryListBuilder searchQueryListBuilder = new searchQueryListBuilder();
IQueryEntry queryEntryConnector = searchQueryListBuilder.buildQueryEntryConnector(IQueryEntry.OPERATOR_AND);
queryEntryList1.add(queryEntryConnector);
queryEntryList1.addAll(queryEntryList2);
...
connector - Sting constant that specifies the connection operator (for exmample OR)WcmException - buildSearchQueryList()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||