11-03-2009 02:58 PM
11-04-2009 03:44 AM
11-04-2009 07:10 AM
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
String searchText = "my_node_and_query_to_use_for_example";
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:" +searchText +"//*\"");
// Execute the query
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet results = queryResult.getResultSet();
ResultSetRow[] rows = results.getRows();
for(ResultSetRow row : rows){
ResultSetRowNode nodo = rows[i].getNode();
String nodeId = row.getNode().getId();
ContentResult contentResult = new ContentResult(nodeId);
….
….
}
11-04-2009 07:24 AM
In "rows" I have all the Content, but now I don´t know how to access to information.
if (rows != null)
{
for (int x = 0; x < rows.length; x++)
{
ResultSetRow row = rows[x];
NamedValue[] columns = row.getColumns();
for (int y = 0; y < columns.length; y++)
{
System.out.println("row " + x + ": "
+ row.getColumns(y).getName() + " = "
+ row.getColumns(y).getValue());
}
}
}11-04-2009 09:49 AM
ResultSetRowNode nodo = rows[i].getNode();
System.out.println("Type: " + nodo.getType());
System.out.println("\tRecorrido de aspects:");
String[] a = nodo.getAspects();
for(int j=0; j<a.length; j++)
System.out.println("\t\t" + j + ": " +a[j]);
System.out.println("\tIdentificador: " + nodo.getId());
System.out.println("\tCampos typeDesc:");
FieldDesc[] b = nodo.getTypeDesc().getFields();
for(int z=0; z<b.length; z++)
System.out.println("\t\t" + z + b[z].getFieldName());
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.