Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
public ResultSet query(StoreRef[] stores, String language, String query)
public ResultSet query(StoreRef[] stores, String language, String query, String[] queryParameters)
These functions search:
public ResultSet query(StoreRef[] stores, String language, String query, String[]queryOptions)
public ResultSet query(StoreRef[] stores, String language, String query, String[]queryOptions, String[] queryParameters)
As above but provides an array of query options (defined by String[] queryOptions). While the XPath and Lucene style queries only select nodes. By default, it will return all nodes stored in the index. Query options (defined by String[] queryOptions) can be used to select attributes by relative path. For example: '//document' as a query option would select all documents. The query option value {'@name'} would select only the name for every document. This is an example of limiting the set of attributes brought back.
All author information for documents
The result set will contain only values for the specified relative paths. The node's @id attribute will always be included.
A simple request to execute a named query. Canned queries will be stored in their own workspace or in a given work space.
They are most likely to be reused across all workspaces.
public ResultSet query(StoreRef[] stores, QName queryId, String[] queryParameters)
/**
* Will also have index based and column name based look up
*/
ResultSet
{
/**
* Get the relative paths to all the elements contained in this result set
*/
String[] getPropertyPaths();
/**
* Iterator over Rows
* (Avoiding generics for 1.4)
*/
RowIterator getRows(); // Typed iterator with nextRow() returning Row
/**
* Get the size of the result set
*/
int length();
/**
* Get the id of the node at the given index
*/
Id getId(int n);
/**
* Get the score for the node at the given position
*/
Score getScore(int n);
/**
* Generate the XML form of this result set
*/
Dom getXML(int page, int pageSize, boolean includeMetaData);
/**
* Generate as XML for Reading
*/
Stream getStream(int page, int pageSize, boolean includeMetaData);
/**
* toString() as above but for the whole set
*/
String toString();
ResultSetMetaData getMetaData();
}
Row
{
Values[] getValues();
Value getValue();
Id getId();
Score getScore(); // Score is score rank potentially other stuff
ResultSet getResultSet();
}
ResultSetMetaData
{
String[] getPropertyPaths();
PropertyDefinition[] getPropertyDefinitions();
}
RequeriableResultSetMetaData
{
WorkspaceId getWorkspaceId();
QueryLanguage getQueryLanguage();
String getQuery();
QName getQueryId();
QueryParameters getQueryParameters();
}
PagedResultSetMetaData extends RequeriableResultSetMetaData
{
int getPageSize();
int getPage();
int getStartIndex();
int getEndIndex();
}
Allows for the idea of well known parameters (e.g. product).
Parameter definitions could be in their own right.
Queries and Parameters etc will be defined by type.
Repository wide definitions will exists in the query workspace.
The contents of which may be cached.
Other queries may be defined at the top level of any workspace.
It is not intended to allow queries from one workspace to run in another.
If this is required they should be common and moved to the query workspace.