Class QueryDescription
- java.lang.Object
-
- org.silverpeas.core.index.search.model.QueryDescription
-
- All Implemented Interfaces:
Serializable
public final class QueryDescription extends Object implements Serializable
A QueryDescription packs a query with the different spaces and components to be searched.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QueryDescription()
The no parameters constructor builds an empty query.QueryDescription(String query)
The constructor set only the query string.
-
Method Summary
-
-
-
Constructor Detail
-
QueryDescription
public QueryDescription()
The no parameters constructor builds an empty query. The setQuery and addComponent() methods should be called to initialize the query. Other criterion (language, creation date ...) can be set before the request is sent to the searchEngine.
-
QueryDescription
public QueryDescription(String query)
The constructor set only the query string. The addComponent() method should be called to set the components instances whose documents will be searched. Other criterium (language, creation date ...) can be set before the request is sent to the searchEngine.
-
-
Method Detail
-
setQuery
public void setQuery(String query)
Set the query string.
-
getQuery
public String getQuery()
Return the query string.- Returns:
- the query string
-
setSearchingUser
public void setSearchingUser(String searchingUser)
Set the user- Parameters:
searchingUser
- : the user.
-
getSearchingUser
public String getSearchingUser()
return the user.- Returns:
- the user.
-
addComponent
public void addComponent(String component)
-
getWhereToSearch
public Set<String> getWhereToSearch()
- Returns:
- the set of all the component's instances where the documents must be searched. The return Set is a set of SpaceComponentPair.
-
setRequestedLanguage
public void setRequestedLanguage(String requestedLang)
Set the requested language.- Parameters:
requestedLang
- a language.
-
getRequestedLanguage
public Optional<String> getRequestedLanguage()
Returns the requested language.if no language or wildcard '*' has been set, all languages are checked.
- Returns:
- optional requested language. Empty optional means all languages.
-
setRequestedAuthor
public void setRequestedAuthor(String author)
Set the requested author.- Parameters:
author
- an author.
-
getRequestedAuthor
public String getRequestedAuthor()
- Returns:
- the requested author.
-
setRequestedCreatedBefore
public void setRequestedCreatedBefore(LocalDate beforedate)
Set the before date- Parameters:
beforedate
- a date.
-
getRequestedCreatedBefore
public LocalDate getRequestedCreatedBefore()
get the before date
-
setRequestedCreatedAfter
public void setRequestedCreatedAfter(LocalDate afterdate)
Set the after date
-
getRequestedCreatedAfter
public LocalDate getRequestedCreatedAfter()
get the after date
-
getMultiFieldQuery
public List<FieldDescription> getMultiFieldQuery()
-
clearMultiFieldQuery
public void clearMultiFieldQuery()
-
addFieldQuery
public void addFieldQuery(FieldDescription fieldQuery)
-
addFieldQueries
public void addFieldQueries(List<FieldDescription> fieldQueries)
-
setFieldQueries
public void setFieldQueries(List<FieldDescription> fieldQueries)
-
isEmpty
public boolean isEmpty()
-
isPeriodDefined
public boolean isPeriodDefined()
-
getRequestedUpdatedBefore
public LocalDate getRequestedUpdatedBefore()
-
setRequestedUpdatedBefore
public void setRequestedUpdatedBefore(LocalDate requestedUpdatedBefore)
-
getRequestedUpdatedAfter
public LocalDate getRequestedUpdatedAfter()
-
setRequestedUpdatedAfter
public void setRequestedUpdatedAfter(LocalDate requestedUpdatedAfter)
-
getExtComponents
public Set<ExternalComponent> getExtComponents()
- Returns:
- the external components
-
addExternalComponents
public void addExternalComponents(String server, String component, String path, String url)
add new external component to the list- Parameters:
server
- the external server namecomponent
- the external componentpath
- the external pathurl
- the external url
-
setRequestedFolder
public void setRequestedFolder(String requestedFolder)
-
getRequestedFolder
public String getRequestedFolder()
-
getTaxonomyPosition
public String getTaxonomyPosition()
-
setTaxonomyPosition
public void setTaxonomyPosition(String taxonomyPosition)
-
isTaxonomyUsed
public boolean isTaxonomyUsed()
-
isAdminScope
public boolean isAdminScope()
-
setAdminScope
public void setAdminScope(boolean adminScope)
-
-