org.inria.ns.reflex
Class ReflexCLI

java.lang.Object
  extended by org.inria.ns.reflex.processor.catalog.LocalCatalog
      extended by org.inria.ns.reflex.processor.ProcessorInstance
          extended by org.inria.ns.reflex.ReflexCLI
All Implemented Interfaces:
GlobalCatalog, Configurable, Initializable, Localizable, Loggable, XOperable

public class ReflexCLI
extends ProcessorInstance

ReflexCLI is a Command Line Interface for the RefleX engine.

Usage : java org.inria.ns.reflex.ReflexCLI [command] [options] [file]
[command] may be :

Example : java org.inria.ns.reflex.ReflexCLI run doc/tutorial/basic/hello/hello-world.xcl (assuming that the CLASSPATH variable is set correctly)

Commands and options details

*** The validate command is not yet implemented. ***

Where:

ParameterUsage
[info-options]
-h or -? Display the command usage and exit without running.
-version Display the version of RefleX and exit without running.
Common [options]
-c catalog-file Use a particular catalog file (OASIS TR 9407, OASIS XML Catalog, Active Catalog). Several catalog files may be specified. NOTE : if XUnit/WUnit is found in the classpath, the relevant catalog is automatically appended.
-p prop=value Set a property with its value. A prefix may be used in the property name. Several properties may be specified.
-ns prefix=uri Map a prefix to a namespace URI. Several mappings may be specified.
-driver class Register the given driver class. Simply call Class.forName( class). Several drivers may be specified.
-t Display the elapsed time.
list command
active-sheet List the logic procedures available for this active sheet and exit without running.
run command
-proc procName Run the given logic procedure. #main and #default are allowed. If missing, #main will be run.
-xsl:indent no Don't indent the XML result (default is yes). Non XML results are ignored. Instead of "xsl:indent", any output property of XSLT can be specified. Several output properties may be specified.
active-sheet The active sheet to process, as an XML file
validate command
-schema schema Validate an XML file with the given schema file (DTD, W3C XML Schema, RelaX NG, Active Schema). Several schema files may be specified. If missing, the validation will be done with the schemata known by the engine, including those declared in the catalogs.
xml-file The XML file to validate.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.structures.Configurable
Configurable.Impl
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.ProcessorInstance
t
 
Method Summary
static void displayLogicProcedures(ProcessorInstance pi)
          Displays the logic procedure names.
static void main(String[] args)
          Parses an active sheet and process it according to the arguments given.
static void usage()
          Print the usage of this command.
 
Methods inherited from class org.inria.ns.reflex.processor.ProcessorInstance
acquire, addCatalogReference, addCatalogReference, addNamedLogicProcedure, addWeakDataSet, call, callDefault, callMain, containsAttribute, containsProcedure, countDataSets, disablesPrefix, enablesPrefix, getAttribute, getAttributes, getBaseLocation, getCatalogReferences, getDataSets, getDefaultAction, getDocument, getLocalCatalogEntry, getLocation, getLogger, getMainAction, getModule, getModule, getParent, getProcedure, getProcedures, getVersion, getXOperator, getXPathFunctionResolver, hasDefault, hasParent, init, isDisabled, isEnabled, isExplicitelyEnabled, isLocalizable, isModuleRegistered, isValidating, mergeAttributes, removeWeakDataSet, setAttribute, setAttributes, setCorrupted, setLocation, setLogger, setLogger, setLogLevel, setLogLevel, setMainAction, setValidating, setVersion, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal
 
Methods inherited from class org.inria.ns.reflex.processor.catalog.LocalCatalog
append
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws Exception
Parses an active sheet and process it according to the arguments given.

Parameters:
args - Some options.
Throws:
Exception - When the active sheet can't be unmarshalled or processed.

usage

public static void usage()
Print the usage of this command.


displayLogicProcedures

public static void displayLogicProcedures(ProcessorInstance pi)
Displays the logic procedure names. When the name of a logic procedure is bound to a namespace URI, the name displayed is the namespace URI followed by "^" followed by the local name.

Parameters:
pi - The processor instance for which the procedure names will be displayed.