Difference between revisions of "OKMSearch"
From OpenKM Documentation
(→QueryResultArray findByStatement(String token, String statement, String type)) |
(→QueryResultArray findByKeywords(String token, String words)) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | __TOC__ | |
Methods related to repository search. | Methods related to repository search. | ||
Line 29: | Line 29: | ||
* ''RepositoryException'' - If there is any general repository problem. | * ''RepositoryException'' - If there is any general repository problem. | ||
− | == QueryResultArray findByKeywords(String token, | + | == QueryResultArray findByKeywords(String token, StringArray keywords) == |
Search for documents using it associated keywords. | Search for documents using it associated keywords. | ||
'''Parameters''' | '''Parameters''' | ||
* ''token'' - The session authorization token. | * ''token'' - The session authorization token. | ||
− | * '' | + | * ''keywords'' - Keywords to be used to filter the search. |
'''Returns''' | '''Returns''' | ||
Line 55: | Line 55: | ||
'''Throws''' | '''Throws''' | ||
* ''RepositoryException'' - If there is any general repository problem or the query fails. | * ''RepositoryException'' - If there is any general repository problem or the query fails. | ||
+ | |||
+ | == QueryResultArray find(String token, QueryParams params) == | ||
+ | Performs a complex search by content, name and keywords (between others). | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''params'' - The complex search elements. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A collection of documents. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''RepositoryException'' - If there is any general repository problem. | ||
+ | * ''IOException'' - If something fail when parsing metadata. | ||
== IntegerPairArray getKeywordMap(String token, StringArray filter) == | == IntegerPairArray getKeywordMap(String token, StringArray filter) == | ||
Line 68: | Line 82: | ||
'''Throws''' | '''Throws''' | ||
* ''RepositoryException'' - If there is any general repository problem or the query fails. | * ''RepositoryException'' - If there is any general repository problem or the query fails. | ||
+ | |||
+ | '''Since''' | ||
+ | * OpenKM 4.0 | ||
+ | |||
+ | == DocumentArray getCategorizedDocuments(String token, String categoryId) == | ||
+ | Get the documents within a category | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token | ||
+ | * ''categoryId'' - The category id (UUID) | ||
+ | |||
+ | '''Returns''' | ||
+ | * A Collection of documents in the category | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''RepositoryException'' - If there is any general repository problem or the query fails. | ||
+ | |||
+ | '''Since''' | ||
+ | * OpenKM 4.1 | ||
[[Category: Webservices Guide]] | [[Category: Webservices Guide]] |
Latest revision as of 09:51, 12 January 2011
Contents
- 1 QueryResultArray findByContent(String token, String words)
- 2 QueryResultArray findByName(String token, String words)
- 3 QueryResultArray findByKeywords(String token, StringArray keywords)
- 4 QueryResultArray findByStatement(String token, String statement, String type)
- 5 QueryResultArray find(String token, QueryParams params)
- 6 IntegerPairArray getKeywordMap(String token, StringArray filter)
- 7 DocumentArray getCategorizedDocuments(String token, String categoryId)
Methods related to repository search.
QueryResultArray findByContent(String token, String words)
Search for documents using it indexed content.
Parameters
- token - The session authorization token.
- expression - Expression to be searched.
Returns
- A collection of document which content matched the searched expression.
Throws
- RepositoryException - If there is any general repository problem.
QueryResultArray findByName(String token, String words)
Search for documents by document name.
Parameters
- token - The session authorization token.
- expression – Expression to be searched.
Returns
- A collection of document which name matched the searched expression.
Throws
- RepositoryException - If there is any general repository problem.
QueryResultArray findByKeywords(String token, StringArray keywords)
Search for documents using it associated keywords.
Parameters
- token - The session authorization token.
- keywords - Keywords to be used to filter the search.
Returns
- A collection of document which keywords matched the searched expression.
Throws
- RepositoryException - If there is any general repository problem.
QueryResultArray findByStatement(String token, String statement, String type)
Search for documents and folder nodes specifying a complex query statement.
Parameters
- token - The session authorization token.
- statement - Query statement to be executed.
- type - The query language can be "sql" or "xpath".
Returns
- A collection of document from the resulting query statement.
Throws
- RepositoryException - If there is any general repository problem or the query fails.
QueryResultArray find(String token, QueryParams params)
Performs a complex search by content, name and keywords (between others).
Parameters
- token - The session authorization token.
- params - The complex search elements.
Returns
- A collection of documents.
Throws
- RepositoryException - If there is any general repository problem.
- IOException - If something fail when parsing metadata.
IntegerPairArray getKeywordMap(String token, StringArray filter)
Return a Keyword map. This is a hash with the keywords and the occurrence.
Parameters
- token - The session authorization token.
- filter - A collection of keywords used to obtain the related document keywords.
Returns
- The keyword map.
Throws
- RepositoryException - If there is any general repository problem or the query fails.
Since
- OpenKM 4.0
DocumentArray getCategorizedDocuments(String token, String categoryId)
Get the documents within a category
Parameters
- token - The session authorization token
- categoryId - The category id (UUID)
Returns
- A Collection of documents in the category
Throws
- RepositoryException - If there is any general repository problem or the query fails.
Since
- OpenKM 4.1