summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Grabowski <piotrg@man.poznan.pl>2015-02-27 20:30:39 (GMT)
committer Piotr Grabowski <piotrg@man.poznan.pl>2015-02-27 20:30:39 (GMT)
commit464fe07cf5c82acab2efc5ee130a45826117a6be (patch)
tree9bd90e1be0df2f8ba7da0ee36c58873c2de65e3f
parentbd66dbb89c9c37ecc044f0e268b6f04e11e4a21a (diff)
downloadQCG-Data-develop.zip
QCG-Data-develop.tar.gz
QCG-Data-develop.tar.bz2
removing error with wrong metasearch querydevelop
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataSearchController.groovy8
1 files changed, 6 insertions, 2 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataSearchController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataSearchController.groovy
index 7b2f089..7ee37f3 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataSearchController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataSearchController.groovy
@@ -60,7 +60,7 @@ class MetadataSearchController {
List<MetaDataAndDomainData> finalResults = new ArrayList<MetaDataAndDomainData>()
int counter = -1
-
+ try {
for(AVUNode avuNode in metadataSearchCommand.AVUNodes) { //for every condition node do:
if(avuNode.andOr == "Every") { //if every condition has to be fulfilled
queryResults = connectedByAnd(avuNode, dataObjAO, collectionAO)
@@ -85,9 +85,13 @@ class MetadataSearchController {
for (MetaDataAndDomainData data : finalResults){
results.add(collectionAndDataObjectListAndSearchAO.getCollectionAndDataObjectListingEntryAtGivenAbsolutePath(data.domainObjectUniqueName))
}
-
+
render(view:"/search/searchResult", model:[results:results])
+ } catch (Exception e) {
+ render(view:"/search/searchResult", model:[results:results])
+
+ }
}
//method used to finding files as well as folders matching every metadata query, final result is the sum of these results
private def connectedByAnd(AVUNode avuNode, DataObjectAO dataObjAO, CollectionAO collectionAO) {