1.29.9.2.3. Fetching result

Let's get nodes:

NodeIterator it = result.getNodes();


if(it.hasNext())
{
   Node findedNode = it.nextNode();
}

NodeIterator will return "folder1", "folder2","document1","document2","document3", and each other nodes in workspace if they are here.

We can also get a table:

String[] columnNames = result.getColumnNames();

RowIterator rit = result.getRows();
while (rit.hasNext())
{
   Row row = rit.nextRow();
   // get values of the row
   Value[] values = row.getValues();
}

Table content is

jcr:pathjcr:score
/folder11000
/folder1/document11000
/folder1/folder21000
/folder1/folder2/document21000
/folder1/folder2/document31000
......

Copyright ©2012. All rights reserved. eXo Platform SAS