if (col == null) {
System.out.println("ERROR : Collection not found!");
return false;
}
TextQueryService service = (TextQueryService) col.getService("TextQueryService", "1.0");
ResourceSet resultSet = service.query(querystring);
ResourceIterator results = resultSet.getIterator();
while (results.hasMoreResources()) {
XMLResource resource = (XMLResource) results.nextResource();
String documentstr = (String) resource.getContent();