StandaloneISQueryTest
Date: 2014-01-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.vremanagement.resourcebroker.local.testsuite
Class StandaloneISQueryTest

    java.lang.Object
      GCUBEPortType
          org.gcube.vremanagement.resourcebroker.local.testsuite.StandaloneISQueryTest

    public class StandaloneISQueryTest

extends GCUBEPortType

General purpose test class introduced to directly test the custom queries to IS. A list of queries can be given in a file e.g. /tmp/myfile.query and all the groups of lines are supposed to be single queries to execute to the IS.

     File sample:

            # First Query
            # That's a comment
            for $Profile in
            collection("/db/Profiles")//Document/Data/child::*[local-name()='Profile']/Resource
            return $Profile/ID

            # Leave a BLANK line among multiple queries
            # Use this for comments, blank lines will be ignored.
            for $result in collection("/db/Profiles/GHN")
            return $result

The only required input is the file containing the queries to execute.

     How to execute:
            java StandaloneISQueryTest file.query

Note: It is possible to express multi-line queries as shown in the previous example. The blank line (or the comment token #) will delimit the end of a multi-line query expression.

Author:
  Daniele Strollo (ISTI-CNR)

Constructor Summary
`StandaloneISQueryTest()`

Method Summary
`void` | `doJob(java.lang.String query)` Internally used.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StandaloneISQueryTest

    public StandaloneISQueryTest()

Method Detail

### doJob

    public final void doJob(java.lang.String query)

  Internally used. Executes the single query passed in input and prints the result on the output stream specified in `StandaloneISQueryTestConf.output`.

  Parameters:
    `query` - the single query to submit to the IS

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD