public class JcrSearchModule extends Object implements SearchModule
| Constructor and Description |
|---|
JcrSearchModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSearch(String token,
long qpId)
Delete a saved search.
|
List<QueryResult> |
find(String token,
QueryParams params)
Performs a complex search by content, name and keywords (between others).
|
List<QueryResult> |
findByContent(String token,
String words)
Search for documents using it indexed content.
|
List<QueryResult> |
findByKeywords(String token,
Set<String> words)
Search for documents using it associated keywords.
|
List<QueryResult> |
findByName(String token,
String words)
Search for documents by document name.
|
List<QueryResult> |
findByStatement(String token,
String statement,
String type) |
ResultSet |
findByStatementPaginated(String token,
String statement,
String type,
int offset,
int limit) |
ResultSet |
findMoreLikeThis(String token,
String uuid,
int maxResults)
Find documents like a given one.
|
ResultSet |
findPaginated(String token,
QueryParams params,
int offset,
int limit)
Performs a complex search by content, name and keywords.
|
List<QueryResult> |
findSimpleQuery(String token,
String statement)
Performs a simple search using on GQL language.
|
ResultSet |
findSimpleQueryPaginated(String token,
String statement,
int offset,
int limit)
Performs a simple search using GQL languahe.
|
List<QueryParams> |
getAllSearchs(String token)
Get all saved search.
|
List<Document> |
getCategorizedDocuments(String token,
String categoryId)
Get the documents within a category
|
List<Folder> |
getCategorizedFolders(String token,
String categoryId)
Get the folders within a category
|
List<Mail> |
getCategorizedMails(String token,
String categoryId)
Get the mails within a category
|
List<Document> |
getDocumentsByKeyword(String token,
String keyword)
Get the documents with a keyword
|
List<Document> |
getDocumentsByPropertyValue(String token,
String group,
String property,
String value)
Get the documents with a property value
|
List<Folder> |
getFoldersByKeyword(String token,
String keyword)
Get the folders with a keyword
|
List<Folder> |
getFoldersByPropertyValue(String token,
String group,
String property,
String value)
Get the folders with a property value
|
Map<String,Integer> |
getKeywordMap(String token,
List<String> filter)
Return a Keyword map.
|
List<Mail> |
getMailsByKeyword(String token,
String keyword)
Get the mails with a keyword
|
List<Mail> |
getMailsByPropertyValue(String token,
String group,
String property,
String value)
Get the mails with a property value
|
QueryParams |
getSearch(String token,
int qpId)
Get a saved search.
|
String |
prepareStatement(QueryParams params)
Prepare statement
|
long |
saveSearch(String token,
QueryParams params)
Save a search for future use.
|
void |
updateSearch(String token,
QueryParams params)
Updated a saved search.
|
public List<QueryResult> findByContent(String token, String words) throws IOException, ParseException, RepositoryException, DatabaseException
SearchModulefindByContent in interface SearchModulewords - Expression to be searched.RepositoryException - If there is any general repository problem.IOExceptionParseExceptionDatabaseExceptionpublic List<QueryResult> findByName(String token, String words) throws IOException, ParseException, RepositoryException, DatabaseException
SearchModulefindByName in interface SearchModulewords - Expression to be searched.RepositoryException - If there is any general repository problem.IOExceptionParseExceptionDatabaseExceptionpublic List<QueryResult> findByKeywords(String token, Set<String> words) throws IOException, ParseException, RepositoryException, DatabaseException
SearchModulefindByKeywords in interface SearchModulewords - Expression to be searched.RepositoryException - If there is any general repository problem.IOExceptionParseExceptionDatabaseExceptionpublic List<QueryResult> find(String token, QueryParams params) throws IOException, ParseException, RepositoryException, DatabaseException
SearchModulefind in interface SearchModuleparams - The complex search elements.IOException - If something fails when parsing metadata.RepositoryException - If there is any general repository problem.ParseExceptionDatabaseExceptionpublic ResultSet findPaginated(String token, QueryParams params, int offset, int limit) throws IOException, ParseException, RepositoryException, DatabaseException
SearchModulefindPaginated in interface SearchModuleparams - The complex search elements.offset - Query result list offset.limit - Query result list limit.RepositoryException - If there is any general repository problem.IOExceptionParseExceptionDatabaseExceptionpublic String prepareStatement(QueryParams params) throws IOException, ParseException
IOExceptionParseExceptionpublic List<QueryResult> findByStatement(String token, String statement, String type) throws RepositoryException, DatabaseException
RepositoryExceptionDatabaseExceptionpublic ResultSet findByStatementPaginated(String token, String statement, String type, int offset, int limit) throws RepositoryException, DatabaseException
RepositoryExceptionDatabaseExceptionpublic long saveSearch(String token, QueryParams params) throws AccessDeniedException, RepositoryException, DatabaseException
SearchModulesaveSearch in interface SearchModuleparams - The query params.RepositoryException - If there is any general repository problem or the query fails.AccessDeniedExceptionDatabaseExceptionpublic void updateSearch(String token, QueryParams params) throws AccessDeniedException, RepositoryException, DatabaseException
SearchModuleupdateSearch in interface SearchModuleparams - The query params.RepositoryException - If there is any general repository problem or the query fails.AccessDeniedExceptionDatabaseExceptionpublic QueryParams getSearch(String token, int qpId) throws PathNotFoundException, RepositoryException, DatabaseException
SearchModulegetSearch in interface SearchModuleRepositoryException - If there is any general repository problem or the query fails.PathNotFoundExceptionDatabaseExceptionpublic List<QueryParams> getAllSearchs(String token) throws RepositoryException, DatabaseException
SearchModulegetAllSearchs in interface SearchModuleRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic void deleteSearch(String token, long qpId) throws AccessDeniedException, RepositoryException, DatabaseException
SearchModuledeleteSearch in interface SearchModuleRepositoryException - If there is any general repository problem or the query failsAccessDeniedExceptionDatabaseExceptionpublic Map<String,Integer> getKeywordMap(String token, List<String> filter) throws RepositoryException, DatabaseException
SearchModulegetKeywordMap in interface SearchModulefilter - A collection of keywords used to obtain the related document keywords.RepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Document> getCategorizedDocuments(String token, String categoryId) throws RepositoryException, DatabaseException
SearchModulegetCategorizedDocuments in interface SearchModulecategoryId - The category id (UUID)RepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Folder> getCategorizedFolders(String token, String categoryId) throws RepositoryException, DatabaseException
SearchModulegetCategorizedFolders in interface SearchModulecategoryId - The category id (UUID)RepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Mail> getCategorizedMails(String token, String categoryId) throws RepositoryException, DatabaseException
SearchModulegetCategorizedMails in interface SearchModulecategoryId - The category id (UUID)RepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Document> getDocumentsByKeyword(String token, String keyword) throws RepositoryException, DatabaseException
SearchModulegetDocumentsByKeyword in interface SearchModulekeyword - The keywordRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Folder> getFoldersByKeyword(String token, String keyword) throws RepositoryException, DatabaseException
SearchModulegetFoldersByKeyword in interface SearchModulekeyword - The keywordRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Mail> getMailsByKeyword(String token, String keyword) throws RepositoryException, DatabaseException
SearchModulegetMailsByKeyword in interface SearchModulekeyword - The keywordRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Document> getDocumentsByPropertyValue(String token, String group, String property, String value) throws RepositoryException, DatabaseException
SearchModulegetDocumentsByPropertyValue in interface SearchModuleRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Folder> getFoldersByPropertyValue(String token, String group, String property, String value) throws RepositoryException, DatabaseException
SearchModulegetFoldersByPropertyValue in interface SearchModuleproperty - The property valueRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<Mail> getMailsByPropertyValue(String token, String group, String property, String value) throws RepositoryException, DatabaseException
SearchModulegetMailsByPropertyValue in interface SearchModuleproperty - The property valueRepositoryException - If there is any general repository problem or the query fails.DatabaseExceptionpublic List<QueryResult> findSimpleQuery(String token, String statement) throws RepositoryException, DatabaseException
SearchModulefindSimpleQuery in interface SearchModulestatement - The simple search in GQL language.RepositoryException - If there is any general repository problem.DatabaseExceptionhttp://jackrabbit.apache.org/api/1.6/org/apache/jackrabbit/commons/query/GQL.htmlpublic ResultSet findSimpleQueryPaginated(String token, String statement, int offset, int limit) throws RepositoryException, DatabaseException
SearchModulefindSimpleQueryPaginated in interface SearchModulestatement - The simple search in GQL language.offset - Query result list offset.limit - Query result list limit.RepositoryException - If there is any general repository problem.DatabaseExceptionhttp://jackrabbit.apache.org/api/1.6/org/apache/jackrabbit/commons/query/GQL.htmlpublic ResultSet findMoreLikeThis(String token, String uuid, int maxResults) throws RepositoryException, DatabaseException
SearchModulefindMoreLikeThis in interface SearchModuleuuid - Uuid of the document to find other similar.maxResults - Maximum number of returned documents.RepositoryException - If there is any general repository problem.DatabaseExceptionCopyright © 2016. All rights reserved.