org.mycore.services.fieldquery
Class MCRQueryCommands

java.lang.Object
  extended by org.mycore.services.fieldquery.MCRQueryCommands
All Implemented Interfaces:
MCRExternalCommandInterface

public class MCRQueryCommands
extends Object
implements MCRExternalCommandInterface

Provides commands to test the query classes using the command line interface

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Frank Lützenkirchen, Arne Seifert, Jens Kupferschmidt

Constructor Summary
MCRQueryCommands()
           
 
Method Summary
 ArrayList<MCRCommand> getPossibleCommands()
          The method returns all available commands.
static void runAllQueryFromString(String querystring)
          Runs a query that is specified as String against all hosts.
static void runLocalQueryFromString(String querystring)
          Runs a query that is specified as String against the local host.
static void runQueryFromFile(String filename)
          Runs a query that is specified as XML in the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCRQueryCommands

public MCRQueryCommands()
Method Detail

getPossibleCommands

public ArrayList<MCRCommand> getPossibleCommands()
The method returns all available commands.

Specified by:
getPossibleCommands in interface MCRExternalCommandInterface
Returns:
an ArrayList of MCRCommands

runQueryFromFile

public static void runQueryFromFile(String filename)
                             throws JDOMException,
                                    IOException
Runs a query that is specified as XML in the given file. The results are written to stdout. To transform the result data it use the stylesheet results-commandlinequery.xsl.

Parameters:
filename - the name of the XML file with the query condition
Throws:
JDOMException
IOException

runLocalQueryFromString

public static void runLocalQueryFromString(String querystring)
Runs a query that is specified as String against the local host. The results are written to stdout.

Parameters:
querystring - the string with the query condition

runAllQueryFromString

public static void runAllQueryFromString(String querystring)
Runs a query that is specified as String against all hosts. The results are written to stdout.

Parameters:
querystring - the string with the query condition