Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PTP/designs/resource manager xsd"

< PTP‎ | designs
(Tokenizer Examples)
 
(96 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''The following is a draft of the proposed Resource Manager XML Schema (XSD).  It has been annotated internally where I felt some explanation necessary.'''
+
= JAXB Configurable Resource Manager XML =
  
'''Note that I have not attempted to figure out yet what the monitoring part will look like or what the control and monitoring sections may need to interact; it may also be the case that some things inside the control node should come up a level.'''
+
== XSD ==
 
+
'''Secondly, the NCSA workflow engine uses an environment of "properties" defined by potentially recursive nestings of ${...} (see https://wiki.ncsa.illinois.edu/display/MRDPUB/3.+The+Ogrescript+Expression+Language).  It would not be difficult to adapt this parser to the much simpler syntax needed to reference the proposed "environment" generated in conjunction with this configuration file.'''
+
  
 
<source lang="xml">
 
<source lang="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+
<!-- ******************************************************************************* -->
 +
<!-- * Copyright (c) 2011 University of Illinois All rights reserved. This program -->
 +
<!-- * and the accompanying materials are made available under the terms of the -->
 +
<!-- * Eclipse Public License v1.0 which accompanies this distribution, and is -->
 +
<!-- * available at http://www.eclipse.org/legal/epl-v10.html -->
 +
<!-- * -->
 +
<!-- * Contributors: -->
 +
<!-- * Albert L. Rossi - design and implementation -->
 +
<!-- ****************************************************************************** -->
 +
<xs:schema targetNamespace="http://org.eclipse.ptp/rm" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rm="http://org.eclipse.ptp/rm"
 
elementFormDefault="qualified">
 
elementFormDefault="qualified">
<xs:element name="resource-manager">
+
<xs:element name="resource-manager-builder" type="rm:resource-manager-data"/>
<xs:annotation>
+
<xs:complexType name="resource-manager-data">
<xs:documentation>
+
<xs:sequence>
It is assumed that the xml instance of the schema
+
<xs:element name="site-data" minOccurs="0" type="rm:site-type"/>
will bear a name which sufficiently distinguishes it from others of
+
<xs:element name="control-data" minOccurs="0" type="rm:control-type"/>
a similar type; e.g., pbs-torque-v_2.3.7_abe is specific to an
+
<xs:element name="monitor-data" minOccurs="0" type="rm:monitor-type"/>
installation on the host abe, ll-v_4.0 suits all installations of
+
</xs:sequence>
LoadLeveler version 4, etc.
+
<xs:attribute name="name" type="xs:string"/>
</xs:documentation>
+
</xs:complexType>
</xs:annotation>
+
<xs:complexType name="site-type">
<xs:complexType>
+
<xs:sequence>
 +
<xs:element minOccurs="0" name="control-connection" type="xs:string"/>
 +
<xs:element minOccurs="0" name="monitor-connection" type="xs:string"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="control-type">
 +
<xs:sequence>
 +
<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="rm:property-type"/>
 +
<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="rm:attribute-type"/>
 +
<xs:element name="managed-files" minOccurs="0" maxOccurs="unbounded" type="rm:managed-files-type"/>
 +
<xs:element name="script" minOccurs="0" type="rm:script-type"/>
 +
<xs:element name="start-up-command" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
 +
<xs:choice minOccurs="0">
 +
<xs:sequence>
 +
<xs:element name="submit-interactive" type="rm:command-type"/>
 +
<xs:element name="submit-interactive-debug" type="rm:command-type" minOccurs="0"/>
 +
</xs:sequence>
 +
<xs:sequence>
 +
<xs:element name="submit-batch" type="rm:command-type"/>
 +
<xs:element name="submit-batch-debug" type="rm:command-type" minOccurs="0"/>
 +
</xs:sequence>
 +
</xs:choice>
 +
<xs:element name="get-job-status" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="terminate-job" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="suspend-job" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="resume-job" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="hold-job" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="release-job" type="rm:command-type" minOccurs="0"/>
 +
<xs:element name="shut-down-command" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
 +
<xs:element name="button-action" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
 +
<xs:element name="launch-tab" minOccurs="0" type="rm:launch-tab-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="property-type">
 +
<xs:sequence>
 +
<xs:element name="default" minOccurs="0" type="xs:string"/>
 +
<xs:element name="value" minOccurs="0"/>
 +
<xs:element name="link-value-to" minOccurs="0" type="xs:string"/>
 +
</xs:sequence>
 +
<xs:attribute name="name" type="xs:string"/>
 +
<xs:attribute name="type" type="xs:string" default="java.lang.String"/>
 +
<xs:attribute name="visible" type="xs:boolean" default="true"/>
 +
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
 +
<xs:attribute name="translateBooleanAs" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="attribute-type">
 +
<xs:sequence>
 +
<xs:element name="description" minOccurs="0" type="xs:string"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="choice" minOccurs="0" type="xs:string"/>
 +
<xs:element name="items-from" minOccurs="0" type="xs:string"/>
 +
<xs:element name="default" minOccurs="0" type="xs:string"/>
 +
<xs:element name="value" minOccurs="0"/>
 +
<xs:element name="link-value-to" minOccurs="0" type="xs:string"/>
 +
<xs:element name="validator" minOccurs="0" type="rm:validator-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="name" use="required" type="xs:string"/>
 +
<xs:attribute name="type" type="xs:string" default="java.lang.String"/>
 +
<xs:attribute name="visible" type="xs:boolean" default="true"/>
 +
<xs:attribute name="status" type="xs:string"/>
 +
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
 +
<xs:attribute name="translateBooleanAs" type="xs:string"/>
 +
<xs:attribute name="min" type="xs:int"/>
 +
<xs:attribute name="max" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="managed-files-type">
 +
<xs:sequence>
 +
<xs:element name="file-staging-location" minOccurs="0" type="xs:string"/>
 +
<xs:element name="file" maxOccurs="unbounded" type="rm:managed-file-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="script-type">
 +
<xs:sequence>
 +
<xs:element name="file-staging-location" minOccurs="0" type="xs:string"/>
 +
<xs:element name="line" maxOccurs="unbounded" type="rm:line-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="insertEnvironmentAfter" type="xs:int" default="-1"/>
 +
<xs:attribute name="deleteAfterSubmit" type="xs:boolean" default="true"/>
 +
</xs:complexType>
 +
<xs:complexType name="line-type">
 +
<xs:sequence>
 +
<xs:element name="arg" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="command-type">
 +
<xs:sequence>
 +
<xs:element name="arg" maxOccurs="unbounded" type="rm:arg-type"/>
 +
<xs:element name="input" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
 +
<xs:element name="environment" minOccurs="0" maxOccurs="unbounded" type="rm:name-value-pair-type"/>
 +
<xs:element name="stdout-parser" minOccurs="0" type="rm:tokenizer-type"/>
 +
<xs:element name="stderr-parser" minOccurs="0" type="rm:tokenizer-type"/>
 +
<xs:element name="redirect-parser" minOccurs="0" type="rm:tokenizer-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="name" use="required" type="xs:string"/>
 +
<xs:attribute name="directory" type="xs:string"/>
 +
<xs:attribute name="redirectStderr" type="xs:boolean" default="false"/>
 +
<xs:attribute name="streamBufferLimit" type="xs:int" default="-1"/>
 +
<xs:attribute name="replaceEnvironment" type="xs:boolean" default="false"/>
 +
<xs:attribute name="waitForId" type="xs:boolean" default="false"/>
 +
<xs:attribute name="ignoreExitStatus" type="xs:boolean" default="false"/>
 +
<xs:attribute name="keepOpen" type="xs:boolean" default="false"/>
 +
<xs:attribute name="flags" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="launch-tab-type">
 +
<xs:sequence>
 +
<xs:element name="dynamic" minOccurs="0" maxOccurs="unbounded" type="rm:tab-controller-type"/>
 +
<xs:element name="import" minOccurs="0">
 +
<xs:complexType>
 +
<xs:sequence>
 +
<xs:element name="export-for-override" minOccurs="0" type="rm:attribute-viewer-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="title" type="xs:string" use="required"/>
 +
</xs:complexType>
 +
</xs:element>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="validator-type">
 +
<xs:sequence>
 +
<xs:choice minOccurs="0">
 +
<xs:element name="regex"  type="rm:regex-type"/>
 +
<xs:element name="file-info" type="rm:file-match-type"/>
 +
<xs:sequence>
 +
  <xs:element name="range" maxOccurs="unbounded" type="rm:range-type"/>
 +
</xs:sequence>
 +
</xs:choice>
 +
<xs:element name="error-message" minOccurs="0" type="xs:string"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="managed-file-type">
 +
<xs:choice>
 
<xs:sequence>
 
<xs:sequence>
<xs:element ref="control" />
+
<xs:element name="line" maxOccurs="unbounded" type="rm:line-type"/>
<xs:element ref="monitor" />
+
 
</xs:sequence>
 
</xs:sequence>
</xs:complexType>
+
<xs:element name="contents" type="xs:string"/>
</xs:element>
+
<xs:element name="path" type="xs:string"/>
<xs:element name="control">
+
</xs:choice>
<xs:annotation>
+
<xs:attribute name="name" use="required"/>
<xs:documentation>
+
<xs:attribute name="uniqueIdPrefix" type="xs:boolean" default="false"/>
The implementation will construct a map serving as
+
<xs:attribute name="resolveContents" type="xs:boolean" default="true"/>
the resource manager "environment"; these are dereferenced in the
+
<xs:attribute name="deleteSourceAfterUse" type="xs:boolean" default="false"/>
configuration file via ${name} or ${name.part}; in addition to the
+
<xs:attribute name="deleteTargetAfterUse" type="xs:boolean" default="false"/>
properties specified at the top level of the control tree, all
+
</xs:complexType>
attributes and parsers will be mapped for reference. The top level
+
<xs:complexType name="file-match-type">
of the tree represents the available commands/methods on all
+
<xs:attribute name="efsAttributes" type="xs:string"/>
resource managers, places for defining stdout or stderr parsers, for
+
<xs:attribute name="lastModifiedBefore" type="xs:string"/>
defining the structure of a batch script to be used, for defining
+
<xs:attribute name="lastModifiedAfter" type="xs:string"/>
(job) attributes, and finally for describing how to construct the UI
+
<xs:attribute name="length" type="xs:long"/>
(Launch Configuration Tab).
+
<xs:attribute name="isDirectory" type="xs:boolean" default="false"/>
</xs:documentation>
+
</xs:complexType>
</xs:annotation>
+
  <xs:complexType name="range-type">
<xs:complexType>
+
    <xs:attribute name="lessThan" type="xs:string"/>
<xs:sequence>
+
    <xs:attribute name="lessThanOrEqualTo" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property" />
+
    <xs:attribute name="greaterThan" type="xs:string"/>
<xs:element minOccurs="0" ref="on-start-up" />
+
    <xs:attribute name="greaterThanOrEqualTo" type="xs:string"/>
<xs:element minOccurs="0" ref="retrieve-dynamic-attributes" />
+
  </xs:complexType>
<xs:element minOccurs="0" ref="run-interactive" />
+
<xs:complexType name="name-value-pair-type">
<xs:element minOccurs="0" ref="run-batch" />
+
<xs:sequence>
<xs:element minOccurs="0" ref="run-debug" />
+
<xs:element name="arg" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
<xs:element ref="cancel-job" />
+
</xs:sequence>
<xs:element minOccurs="0" ref="suspend-job" />
+
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:element minOccurs="0" ref="resume-job" />
+
<xs:attribute name="value" type="xs:string"/>
<xs:element minOccurs="0" ref="on-shut-down" />
+
</xs:complexType>
<xs:element ref="commands" />
+
<xs:complexType name="tab-controller-type">
<xs:element ref="parsers" />
+
<xs:sequence>
<xs:element minOccurs="0" ref="script" />
+
<xs:element name="title" type="xs:string"/>
<xs:element ref="attribute-definitions" />
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
<xs:element ref="launch-tab" />
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
</xs:sequence>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:complexType>
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
</xs:element>
+
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
<xs:element name="property">
+
<xs:element name="composite" type="rm:composite-type"/>
<xs:annotation>
+
<xs:element name="widget" type="rm:widget-type"/>
<xs:documentation>
+
<xs:element name="browse" type="rm:browse-type"/>
The value is any object type; these are set at
+
<xs:element name="action" type="rm:push-button-type"/>
runtime.
+
<xs:element name="button-group" type="rm:button-group-type"/>
</xs:documentation>
+
<xs:element name="viewer" type="rm:attribute-viewer-type"/>
</xs:annotation>
+
</xs:choice>
<xs:complexType>
+
</xs:sequence>
<xs:attribute name="name" type="xs:NCName" />
+
<xs:attribute name="style" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="background" type="xs:string"/>
</xs:element>
+
<xs:attribute name="includeWidgetValuesFrom" type="xs:string"/>
<xs:element name="on-start-up">
+
<xs:attribute name="showViewConfig" type="xs:boolean" default="true"/>
<xs:annotation>
+
<xs:attribute name="showViewExcluded" type="xs:boolean" default="false"/>
<xs:documentation>
+
</xs:complexType>
Arbitrary commands which need to be run on startup.
+
<xs:complexType name="regex-type" mixed="true">
</xs:documentation>
+
<xs:attribute name="flags" type="xs:string"/>
</xs:annotation>
+
<xs:attribute name="split" type="xs:boolean" default="false"/>
<xs:complexType>
+
<xs:attribute name="expression" type="xs:string"/>
<xs:sequence>
+
</xs:complexType>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
<xs:complexType mixed="true" name="arg-type">
</xs:sequence>
+
<xs:attribute name="isUndefinedIfMatches" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="resolve" type="xs:boolean" default="true"/>
</xs:element>
+
</xs:complexType>
<xs:element name="retrieve-dynamic-attributes">
+
<xs:complexType name="tokenizer-type">
<xs:annotation>
+
<xs:sequence>
<xs:documentation>
+
<xs:choice>
A command for retrieving (if possible) attributes
+
<xs:element name="type" type="xs:string"/>
defined by the service dynamically.
+
<xs:element name="target" maxOccurs="unbounded" type="rm:target-type"/>
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="run-interactive">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for running interactive jobs.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="run-batch">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for running jobs through the
+
scheduler.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="run-debug">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for running debug jobs.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="cancel-job">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for cancelling or killing jobs.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="suspend-job">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for suspending jobs.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="resume-job">
+
<xs:annotation>
+
<xs:documentation>
+
The command(s) for restarting suspended jobs.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="on-shut-down">
+
<xs:annotation>
+
<xs:documentation>
+
Arbitrary commands which need to be run on startup.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="commands">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="parsers">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element maxOccurs="unbounded" ref="stream-parser" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="script">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element ref="directive-definitions" />
+
<xs:element ref="environment-definitions" />
+
<xs:element ref="pre-execute-commands" />
+
<xs:element ref="execute-command" />
+
<xs:element ref="post-execute-commands" />
+
</xs:sequence>
+
<xs:attribute name="shell" use="required" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="directive-definitions">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded"
+
ref="directive-definition" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="directive-definition">
+
<xs:annotation>
+
<xs:documentation>
+
'ValueFrom' refers to properties in the resource
+
manager environment.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType mixed="true">
+
<xs:attribute name="valueFrom" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="environment-definitions">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded"
+
ref="environment-definition" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="environment-definition">
+
<xs:annotation>
+
<xs:documentation>
+
'ValueFrom' refers to properties in the resource
+
manager environment.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType mixed="true">
+
<xs:attribute name="valueFrom" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="pre-execute-commands">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="execute-command">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="post-execute-commands">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="attribute-definitions">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element maxOccurs="unbounded" ref="job-attribute" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="job-attribute">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element name="description" type="xs:string" />
+
<xs:element name="tooltip" type="xs:string" />
+
<xs:element name="choice" minOccurs="0" type="xs:string">
+
<xs:annotation>
+
<xs:documentation>
+
A a comma-delimited set of values.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
<xs:element name="defaultValue" minOccurs="0" type="xs:string" />
+
</xs:sequence>
+
<xs:attribute name="id" use="required" type="xs:NCName" />
+
<xs:attribute name="name" use="required" type="xs:NCName" />
+
<xs:attribute name="type" use="required" type="xs:NCName" />
+
<xs:attribute name="basic" type="xs:boolean">
+
<xs:annotation>
+
<xs:documentation>
+
Indicates if this attribute is part of a basic
+
(required) set, or if it is an (advance) option.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:attribute>
+
<xs:attribute name="minValue" type="xs:int" />
+
<xs:attribute name="maxValue" type="xs:int" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="command">
+
<xs:complexType mixed="true">
+
<xs:sequence>
+
<xs:element maxOccurs="unbounded" ref="arg" />
+
<xs:element maxOccurs="2" ref="stream-parser" />
+
</xs:sequence>
+
<xs:attribute name="name" type="xs:NCName" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="arg" type="xs:string">
+
<xs:annotation>
+
<xs:documentation>
+
The text of the argument will be parsed for
+
references to the resource manager environment; e.g., ${a}, v=${v},
+
etc.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
<xs:element name="stream-parser">
+
<xs:annotation>
+
<xs:documentation>
+
These are attached to the stdout or stderr streams
+
in order to capture the output of the command and add values into
+
the resource manager environment. It is understood that a parser
+
tokenization is a list of matching tokens.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element ref="parse-lines" />
+
<xs:element maxOccurs="unbounded" ref="token" />
+
<xs:element maxOccurs="unbounded" ref="put" />
+
</xs:sequence>
+
<xs:attribute name="name" use="required" type="xs:NCName" />
+
<xs:attribute name="stderr" type="xs:boolean" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="parse-lines" type="xs:NMTOKEN">
+
<xs:annotation>
+
<xs:documentation>
+
Which lines of output should be examined. Indicated
+
by single numerical value, comma-delimited list, or colon-delimited
+
range; by convention, N = total number of lines returned.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
<xs:element name="put">
+
<xs:annotation>
+
<xs:documentation>
+
Value assigned to the name is the token with the
+
given index in the returned list; a put without index assigns the
+
entire list to the name.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:attribute name="name" use="required" type="xs:NCName" />
+
<xs:attribute name="index" type="xs:integer" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="token">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" ref="token" />
+
</xs:sequence>
+
<xs:attribute name="delim" use="required" />
+
<xs:attribute name="return" use="required" type="xs:string">
+
<xs:annotation>
+
<xs:documentation>
+
Indicates which segments generated by the
+
tokenization should be returned; can be a single numerical value,
+
comma-delimited list, or colon-delimited range; by convention, N =
+
total number of segments created.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:attribute>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="launch-tab">
+
<xs:annotation>
+
<xs:documentation>
+
This is a recursive description of the main UI
+
element associated with the control part, the Lauch Tab. NOTE: I do
+
not as yet know how much of the underlying widget options need to be
+
exposed here for effective building in the createControl method.
+
What follows is minimal.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element maxOccurs="unbounded" ref="tab-controller" />
+
</xs:sequence>
+
<xs:attribute name="advanced-mode-enabled" type="xs:boolean">
+
<xs:annotation>
+
<xs:documentation>
+
If this is set to true, a tab-controller which
+
allows the user to browse the local file system and/or workspace
+
to open and edit a custom batch script will be created; this will
+
include copy and renaming buttons.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:attribute>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="tab-controller">
+
<xs:annotation>
+
<xs:documentation>
+
as in:
+
org.eclipse.ptp.rm.ui.launch.ExtendableRMLaunchConfigurationDynamicTab;
+
a top-level "switch" between views.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="group" />
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" />
+
</xs:sequence>
+
<xs:attribute name="id" use="required" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="tab-folder">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element maxOccurs="unbounded" ref="tab-item" />
+
</xs:sequence>
+
<xs:attribute name="title" use="required" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="tab-item">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="group" />
+
<xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" />
+
</xs:sequence>
+
<xs:attribute name="name" use="required" type="xs:string" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="group">
+
<xs:annotation>
+
<xs:documentation>
+
We may want a few tweaks here, such as borders,
+
etc.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType>
+
<xs:choice maxOccurs="unbounded">
+
<xs:element ref="group" />
+
<xs:element ref="widget" />
+
 
</xs:choice>
 
</xs:choice>
<xs:attribute name="columns" type="xs:integer" />
+
<xs:element name="exit-on" minOccurs="0" type="rm:regex-type"/>
<xs:attribute name="title" type="xs:string" />
+
<xs:element name="exit-after" minOccurs="0" type="rm:regex-type"/>
</xs:complexType>
+
</xs:sequence>
</xs:element>
+
<xs:attribute name="delim" type="xs:string"/>
<xs:element name="widget">
+
<xs:attribute name="includeDelim" type="xs:boolean" default="false"/>
<xs:complexType>
+
<xs:attribute name="maxMatchLen" type="xs:int" default="0"/>
 +
<xs:attribute name="all" type="xs:boolean" default="false"/>
 +
<xs:attribute name="save" type="xs:int" default="0"/>
 +
<xs:attribute name="applyToAll" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="tab-folder-type">
 +
<xs:sequence>
 +
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="item" maxOccurs="unbounded" type="rm:tab-item-type"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="composite-type">
 +
<xs:sequence>
 +
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="title" minOccurs="0" type="xs:string"/>
 +
<xs:choice minOccurs="0" maxOccurs="unbounded">
 +
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
 +
<xs:element name="composite" type="rm:composite-type"/>
 +
<xs:element name="widget" type="rm:widget-type"/>
 +
<xs:element name="browse" type="rm:browse-type"/>
 +
<xs:element name="action" type="rm:push-button-type"/>
 +
<xs:element name="button-group" type="rm:button-group-type"/>
 +
<xs:element name="viewer" type="rm:attribute-viewer-type"/>
 +
</xs:choice>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="group" type="xs:boolean" default="false"/>
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="tab-item-type">
 +
<xs:sequence>
 +
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="title" type="xs:string"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:choice minOccurs="0" maxOccurs="unbounded">
 +
<xs:element name="composite" type="rm:composite-type"/>
 +
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
 +
<xs:element name="widget" type="rm:widget-type"/>
 +
<xs:element name="browse" type="rm:browse-type"/>
 +
<xs:element name="action" type="rm:push-button-type"/>
 +
<xs:element name="button-group" type="rm:button-group-type"/>
 +
<xs:element name="viewer" type="rm:attribute-viewer-type"/>
 +
</xs:choice>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="layout-type">
 +
<xs:choice>
 +
<xs:element name="fill-layout" type="rm:fill-layout-type"/>
 +
<xs:element name="row-layout" type="rm:row-layout-type"/>
 +
<xs:element name="grid-layout" type="rm:grid-layout-type"/>
 +
<xs:element name="form-layout" type="rm:form-layout-type"/>
 +
</xs:choice>
 +
</xs:complexType>
 +
<xs:complexType name="layout-data-type">
 +
<xs:choice>
 +
<xs:element name="row-data" type="rm:row-data-type"/>
 +
<xs:element name="grid-data" type="rm:grid-data-type"/>
 +
<xs:element name="form-data" type="rm:form-data-type"/>
 +
</xs:choice>
 +
</xs:complexType>
 +
<xs:complexType name="fill-layout-type">
 +
<xs:attribute name="type" type="xs:string"/>
 +
<xs:attribute name="marginHeight" type="xs:int"/>
 +
<xs:attribute name="marginWidth" type="xs:int"/>
 +
<xs:attribute name="spacing" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="row-layout-type">
 +
<xs:attribute name="type" type="xs:string"/>
 +
<xs:attribute name="center" type="xs:boolean" default="false"/>
 +
<xs:attribute name="justify" type="xs:boolean" default="false"/>
 +
<xs:attribute name="fill" type="xs:boolean" default="false"/>
 +
<xs:attribute name="pack" type="xs:boolean" default="false"/>
 +
<xs:attribute name="wrap" type="xs:boolean" default="false"/>
 +
<xs:attribute name="marginHeight" type="xs:int"/>
 +
<xs:attribute name="marginWidth" type="xs:int"/>
 +
<xs:attribute name="marginTop" type="xs:int"/>
 +
<xs:attribute name="marginBottom" type="xs:int"/>
 +
<xs:attribute name="marginLeft" type="xs:int"/>
 +
<xs:attribute name="marginRight" type="xs:int"/>
 +
<xs:attribute name="spacing" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="grid-layout-type">
 +
<xs:attribute name="numColumns" type="xs:int"/>
 +
<xs:attribute name="makeColumnsEqualWidth" type="xs:boolean" default="false"/>
 +
<xs:attribute name="marginHeight" type="xs:int"/>
 +
<xs:attribute name="marginWidth" type="xs:int"/>
 +
<xs:attribute name="marginTop" type="xs:int"/>
 +
<xs:attribute name="marginBottom" type="xs:int"/>
 +
<xs:attribute name="marginLeft" type="xs:int"/>
 +
<xs:attribute name="marginRight" type="xs:int"/>
 +
<xs:attribute name="horizontalSpacing" type="xs:int"/>
 +
<xs:attribute name="verticalSpacing" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="form-layout-type">
 +
<xs:attribute name="marginHeight" type="xs:int"/>
 +
<xs:attribute name="marginWidth" type="xs:int"/>
 +
<xs:attribute name="marginTop" type="xs:int"/>
 +
<xs:attribute name="marginBottom" type="xs:int"/>
 +
<xs:attribute name="marginLeft" type="xs:int"/>
 +
<xs:attribute name="marginRight" type="xs:int"/>
 +
<xs:attribute name="spacing" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="row-data-type">
 +
<xs:attribute name="height" type="xs:int"/>
 +
<xs:attribute name="width" type="xs:int"/>
 +
<xs:attribute name="exclude" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="grid-data-type">
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="horizontalAlign" type="xs:string"/>
 +
<xs:attribute name="verticalAlign" type="xs:string"/>
 +
<xs:attribute name="grabExcessHorizontal" type="xs:boolean" default="false"/>
 +
<xs:attribute name="grabExcessVertical" type="xs:boolean" default="false"/>
 +
<xs:attribute name="horizontalSpan" type="xs:int"/>
 +
<xs:attribute name="verticalSpan" type="xs:int"/>
 +
<xs:attribute name="horizontalIndent" type="xs:int"/>
 +
<xs:attribute name="verticalIndent" type="xs:int"/>
 +
<xs:attribute name="minHeight" type="xs:int"/>
 +
<xs:attribute name="minWidth" type="xs:int"/>
 +
<xs:attribute name="heightHint" type="xs:int"/>
 +
<xs:attribute name="widthHint" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="form-data-type">
 +
<xs:sequence>
 +
<xs:element name="top" minOccurs="0" type="rm:form-attachment-type"/>
 +
<xs:element name="bottom" minOccurs="0" type="rm:form-attachment-type"/>
 +
<xs:element name="left" minOccurs="0" type="rm:form-attachment-type"/>
 +
<xs:element name="right" minOccurs="0" type="rm:form-attachment-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="height" type="xs:int"/>
 +
<xs:attribute name="width" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="form-attachment-type">
 +
<xs:attribute name="alignment" type="xs:string"/>
 +
<xs:attribute name="numerator" type="xs:int"/>
 +
<xs:attribute name="denominator" type="xs:int"/>
 +
<xs:attribute name="offset" type="xs:int"/>
 +
</xs:complexType>
 +
<xs:complexType name="widget-type">
 +
<xs:sequence>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="items-from" minOccurs="0" type="xs:string"/>
 +
<xs:element name="fixed-text" minOccurs="0" type="xs:string"/>
 +
<xs:element name="dynamic-text" minOccurs="0">
 +
<xs:complexType>
 +
<xs:sequence>
 +
<xs:element name="arg" maxOccurs="unbounded" type="rm:arg-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
</xs:element>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="type" default="text">
 +
<xs:simpleType>
 +
<xs:restriction base="xs:string">
 +
<xs:enumeration value="label"/>
 +
<xs:enumeration value="text"/>
 +
<xs:enumeration value="checkbox"/>
 +
<xs:enumeration value="radiobutton"/>
 +
<xs:enumeration value="spinner"/>
 +
<xs:enumeration value="combo"/>
 +
</xs:restriction>
 +
</xs:simpleType>
 +
</xs:attribute>
 +
<xs:attribute name="buttonId" type="xs:string"/>
 +
<xs:attribute name="title" type="xs:string"/>
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
 +
<xs:attribute name="saveValueTo" type="xs:string"/>
 +
<xs:attribute name="foreground" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="button-group-type">
 +
<xs:sequence>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
 +
<xs:element name="title" minOccurs="0" type="xs:string"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="button" maxOccurs="unbounded" type="rm:widget-type"/>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="group" type="xs:boolean" default="false"/>
 +
<xs:attribute name="saveValueTo" type="xs:string"/>
 +
<xs:attribute name="style" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="browse-type">
 +
<xs:sequence>
 +
<xs:element name="text-layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="button-layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="text-control-state" minOccurs="0" type="rm:control-state-type"/>
 +
<xs:element name="button-control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="title" type="xs:string"/>
 +
<xs:attribute name="textStyle" type="xs:string"/>
 +
<xs:attribute name="directory" type="xs:boolean" default="false"/>
 +
<xs:attribute name="uri" type="xs:boolean" default="false"/>
 +
<xs:attribute name="localOnly" type="xs:boolean" default="false"/>
 +
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
 +
<xs:attribute name="saveValueTo" type="xs:string"/>
 +
<xs:attribute name="foreground" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="push-button-type">
 +
<xs:sequence>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
<xs:element name="button-action" minOccurs="0" type="rm:button-action-type"/>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="title" type="xs:string"/>
 +
<xs:attribute name="foreground" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="button-action-type">
 +
<xs:sequence>
 +
<xs:element name="action" type="xs:string"/>
 +
</xs:sequence>
 +
<xs:attribute name="clearValue" type="xs:string"/>
 +
<xs:attribute name="refresh" type="xs:boolean" default="true"/>
 +
</xs:complexType>
 +
<xs:complexType name="attribute-viewer-type">
 +
<xs:sequence>
 +
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
 +
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
 +
<xs:element name="label" minOccurs="0" type="xs:string"/>
 +
<xs:element name="column-data" minOccurs="0" maxOccurs="7" type="rm:column-data-type"/>
 +
<xs:element name="items" type="rm:viewer-items-type"/>
 +
<xs:element name="value" minOccurs="0" type="rm:template-type"/>
 +
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="type" default="table">
 +
<xs:simpleType>
 +
<xs:restriction base="xs:string">
 +
<xs:enumeration value="table"/>
 +
<xs:enumeration value="tree"/>
 +
</xs:restriction>
 +
</xs:simpleType>
 +
</xs:attribute>
 +
<xs:attribute name="name" type="xs:string"/>
 +
<xs:attribute name="initialAllChecked" type="xs:boolean" default="true"/>
 +
<xs:attribute name="sort" type="xs:boolean" default="true"/>
 +
<xs:attribute name="headerVisible" type="xs:boolean" default="true"/>
 +
<xs:attribute name="linesVisible" type="xs:boolean" default="true"/>
 +
<xs:attribute name="tooltipEnabled" type="xs:boolean" default="true"/>
 +
<xs:attribute name="style" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="viewer-items-type">
 +
<xs:sequence>
 +
<xs:element name="include" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
 +
<xs:element name="exclude" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
 +
</xs:sequence>
 +
<xs:attribute name="allPredefined" type="xs:boolean" default="false"/>
 +
<xs:attribute name="allDiscovered" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="font-type">
 +
<xs:attribute name="name" type="xs:string"/>
 +
<xs:attribute name="size" type="xs:int" default="9"/>
 +
<xs:attribute name="style" default="normal">
 +
<xs:simpleType>
 +
<xs:restriction base="xs:string">
 +
<xs:enumeration value="normal"/>
 +
<xs:enumeration value="bold"/>
 +
<xs:enumeration value="italic"/>
 +
</xs:restriction>
 +
</xs:simpleType>
 +
</xs:attribute>
 +
</xs:complexType>
 +
<xs:complexType name="template-type">
 +
<xs:attribute name="pattern" type="xs:string"/>
 +
<xs:attribute name="separator" type="xs:string" default=" "/>
 +
</xs:complexType>
 +
<xs:complexType name="target-type">
 +
<xs:sequence>
 +
<xs:element name="match" maxOccurs="unbounded" type="rm:match-type"/>
 +
<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
 +
<xs:element name="else" minOccurs="0">
 +
<xs:complexType>
 +
<xs:choice>
 +
<xs:element name="add" type="rm:add-type"/>
 +
<xs:element name="append" type="rm:append-type"/>
 +
<xs:element name="put" type="rm:put-type"/>
 +
<xs:element name="set" type="rm:set-type"/>
 +
<xs:element name="throw" type="rm:throw-type"/>
 +
</xs:choice>
 +
</xs:complexType>
 +
</xs:element>
 +
</xs:sequence>
 +
<xs:attribute name="ref" type="xs:string"/>
 +
<xs:attribute name="type" default="property">
 +
<xs:simpleType>
 +
<xs:restriction base="xs:string">
 +
<xs:enumeration value="property"/>
 +
<xs:enumeration value="attribute"/>
 +
</xs:restriction>
 +
</xs:simpleType>
 +
</xs:attribute>
 +
<xs:attribute name="matchAll" type="xs:boolean" default="false"/>
 +
<xs:attribute name="allowOverwrites" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="match-type">
 +
<xs:sequence>
 +
<xs:element name="expression" minOccurs="0" type="rm:regex-type"/>
 +
<xs:choice minOccurs="0" maxOccurs="unbounded">
 +
<xs:element name="add" type="rm:add-type"/>
 +
<xs:element name="append" type="rm:append-type"/>
 +
<xs:element name="put" type="rm:put-type"/>
 +
<xs:element name="set" type="rm:set-type"/>
 +
<xs:element name="throw" type="rm:throw-type"/>
 +
</xs:choice>
 +
</xs:sequence>
 +
<xs:attribute name="moveToTop" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="column-data-type">
 +
<xs:sequence>
 +
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
 +
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
 +
</xs:sequence>
 +
<xs:attribute name="name" type="xs:string"/>
 +
<xs:attribute name="width" type="xs:int" default="-1"/>
 +
<xs:attribute name="alignment" type="xs:string"/>
 +
<xs:attribute name="resizable" type="xs:boolean" default="false"/>
 +
<xs:attribute name="moveable" type="xs:boolean" default="false"/>
 +
<xs:attribute name="foreground" type="xs:string"/>
 +
<xs:attribute name="background" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="set-type">
 +
<xs:sequence>
 +
<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="field" type="xs:string"/>
 +
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="throw-type">
 +
<xs:sequence>
 +
<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="field" type="xs:string"/>
 +
<xs:attribute name="message" type="xs:string"/>
 +
</xs:complexType>
 +
<xs:complexType name="add-type">
 +
<xs:sequence>
 +
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="field" type="xs:string"/>
 +
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="append-type">
 +
<xs:sequence>
 +
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="field" type="xs:string"/>
 +
<xs:attribute name="separator" type="xs:string"/>
 +
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="put-type">
 +
<xs:sequence>
 +
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="field" type="xs:string"/>
 +
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
 +
</xs:complexType>
 +
<xs:complexType name="entry-type">
 +
<xs:attribute name="key" type="xs:string"/>
 +
<xs:attribute name="keyGroup" type="xs:int" default="0"/>
 +
<xs:attribute name="keyIndex" type="xs:int" default="0"/>
 +
<xs:attribute name="value" type="xs:string"/>
 +
<xs:attribute name="valueGroup" type="xs:int" default="0"/>
 +
<xs:attribute name="valueIndex" type="xs:int" default="0"/>
 +
</xs:complexType>
 +
<xs:complexType name="test-type">
 +
<xs:sequence>
 +
<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
 +
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="2"/>
 +
<xs:choice minOccurs="0" maxOccurs="unbounded">
 +
<xs:element name="add" type="rm:add-type"/>
 +
<xs:element name="append" type="rm:append-type"/>
 +
<xs:element name="put" type="rm:put-type"/>
 +
<xs:element name="set" type="rm:set-type"/>
 +
<xs:element name="throw" type="rm:throw-type"/>
 +
</xs:choice>
 +
<xs:element name="else" minOccurs="0">
 +
<xs:complexType>
 +
<xs:choice maxOccurs="unbounded">
 +
<xs:element name="add" type="rm:add-type"/>
 +
<xs:element name="append" type="rm:append-type"/>
 +
<xs:element name="put" type="rm:put-type"/>
 +
<xs:element name="set" type="rm:set-type"/>
 +
<xs:element name="throw" type="rm:throw-type"/>
 +
</xs:choice>
 +
</xs:complexType>
 +
</xs:element>
 +
</xs:sequence>
 +
<xs:attribute name="op">
 +
<xs:simpleType>
 +
<xs:restriction base="xs:string">
 +
<xs:enumeration value="EQ"/>
 +
<xs:enumeration value="LT"/>
 +
<xs:enumeration value="GT"/>
 +
<xs:enumeration value="LE"/>
 +
<xs:enumeration value="GE"/>
 +
<xs:enumeration value="AND"/>
 +
<xs:enumeration value="OR"/>
 +
<xs:enumeration value="NOT"/>
 +
</xs:restriction>
 +
</xs:simpleType>
 +
</xs:attribute>
 +
</xs:complexType>
 +
<xs:complexType name="control-state-type">
 +
<xs:sequence>
 +
<xs:choice minOccurs="0">
 +
<xs:element name="show-if" minOccurs="0" type="rm:control-state-rule-type"/>
 +
<xs:element name="hide-if" minOccurs="0" type="rm:control-state-rule-type"/>
 +
</xs:choice>
 +
<xs:choice minOccurs="0">
 +
<xs:element name="enable-if" minOccurs="0" type="rm:control-state-rule-type"/>
 +
<xs:element name="disable-if" minOccurs="0" type="rm:control-state-rule-type"/>
 +
</xs:choice>
 +
</xs:sequence>
 +
</xs:complexType>
 +
<xs:complexType name="control-state-rule-type">
 +
<xs:choice>
 +
<xs:element name="not" minOccurs="0">
 +
<xs:complexType>
 +
<xs:sequence>
 +
<xs:element name="rule" type="rm:control-state-rule-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
</xs:element>
 +
<xs:element name="and" minOccurs="0">
 +
<xs:complexType>
 +
<xs:sequence>
 +
<xs:element name="rule" maxOccurs="unbounded" type="rm:control-state-rule-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
</xs:element>
 +
<xs:element name="or" minOccurs="0">
 +
<xs:complexType>
 +
<xs:sequence>
 +
<xs:element name="rule" maxOccurs="unbounded" type="rm:control-state-rule-type"/>
 +
</xs:sequence>
 +
</xs:complexType>
 +
</xs:element>
 +
</xs:choice>
 +
<xs:attribute name="button" type="xs:string"/>
 +
<xs:attribute name="selected" type="xs:boolean" default="true"/>
 +
</xs:complexType>
 +
<xs:complexType name="monitor-type">
 +
<xs:sequence>
 +
<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="rm:property-type"/>
 +
<xs:element name="driver" minOccurs="0" type="rm:monitor-driver-type"/>
 +
</xs:sequence>
 +
<xs:attribute name="schedulerType" type="xs:string"/>
 +
<xs:attribute name="refreshFrequencyInSeconds" type="xs:int" default="60"/>
 +
</xs:complexType>
 +
<xs:complexType name="monitor-driver-type">
 +
<xs:choice>
 +
<xs:element name="url" type="xs:string"/>
 
<xs:sequence>
 
<xs:sequence>
<xs:element name="content">
+
<xs:element name="name" type="xs:string"/>
<xs:annotation>
+
<xs:element name="path" minOccurs="0" type="xs:string"/>
<xs:documentation>
+
<xs:element name="args" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
The text of this element will be parsed for
+
references to the resource manager environment; e.g., ${a},
+
version-${b}, etc.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
 
</xs:sequence>
 
</xs:sequence>
<xs:attribute name="label" type="xs:string" />
+
</xs:choice>
<xs:attribute name="type" default="text">
+
</xs:complexType>
<xs:annotation>
+
<xs:documentation>
+
Need to complete this list?
+
</xs:documentation>
+
</xs:annotation>
+
<xs:simpleType>
+
<xs:restriction base="xs:string">
+
<xs:enumeration value="text" />
+
<xs:enumeration value="push-button" />
+
<xs:enumeration value="radio-button" />
+
<xs:enumeration value="spinner" />
+
<xs:enumeration value="checkbox" />
+
<xs:enumeration value="combo" />
+
                                              <xs:enumeration value="browse-button" />
+
</xs:restriction>
+
</xs:simpleType>
+
</xs:attribute>
+
<xs:attribute name="read-only" type="xs:boolean" />
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="monitor">
+
<xs:annotation>
+
<xs:documentation>
+
I have for the moment left this undefined.
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
 
</xs:schema>
 
</xs:schema>
 
</source>
 
</source>
  
 +
== Tokenizer Examples ==
  
'''The classes generated by the JAXB compiler from this schema:'''
+
<source lang="xml">
 
+
<?xml version="1.0" encoding="UTF-8"?>
<source lang="java">
+
<resource-manager-builder xmlns="http://org.eclipse.ptp/rm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
AttributeDefinitions.java
+
xsi:schemaLocation="resource_manager_type.xsd" name="test-parsers">
CancelJob.java
+
<control-data>
Command.java
+
<!-- EXAMPLE 1: output is a list of line-separated queue names to be assigned
Commands.java
+
to the known property "available-queues" -->
Control.java
+
<start-up-command name="test01ParseQstat">
DirectiveDefinition.java
+
<arg/>
DirectiveDefinitions.java
+
<stdout-parser delim="\n">
EnvironmentDefinition.java
+
<target ref="queues">
EnvironmentDefinitions.java
+
<match>
ExecuteCommand.java
+
<expression>([\w\d]+)</expression>
Group.java
+
<add field="value">
JobAttribute.java
+
<entry valueGroup="1"/>
LaunchTab.java
+
</add>
ObjectFactory.java
+
</match>
OnShutDown.java
+
</target>
OnStartUp.java
+
</stdout-parser>
Parsers.java
+
</start-up-command>
PostExecuteCommands.java
+
<!-- EXAMPLE 2: output is to be searched for its final line which should
PreExecuteCommands.java
+
contain a job id of the form "[digits].[chars]" -->
Property.java
+
<start-up-command name="test02JobId" waitForId="true">
Put.java
+
<arg/>
ResourceManager.java
+
<stdout-parser delim="\n" all="true" save="1">
ResumeJob.java
+
<target ref="@jobId">
RetrieveDynamicAttributes.java
+
<match>
RunBatch.java
+
<expression>([\d]+)([.])(.+)[\s]+.*</expression>
RunDebug.java
+
<append field="name">
RunInteractive.java
+
<entry valueGroup="1"/>
Script.java
+
<entry valueGroup="2"/>
StreamParser.java
+
<entry valueGroup="3"/>
SuspendJob.java
+
</append>
TabController.java
+
<set field="default">
TabFolder.java
+
<entry valueGroup="1"/>
TabItem.java
+
</set>
Token.java
+
<set field="value">
Widget.java
+
<entry value="SUBMITTED"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>([\d]+)[.].+</expression>
 +
<set field="name">
 +
<entry valueGroup="0"/>
 +
</set>
 +
<set field="default">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry value="SUBMITTED"/>
 +
</set>
 +
</match>
 +
</target>
 +
<target ref="@jobId">
 +
<match>
 +
<expression flags="DOTALL">.*Job not submitted.*</expression>
 +
<set field="value">
 +
<entry value="FAILED"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
<stderr-parser delim="\n">
 +
<target ref="@jobId">
 +
<match>
 +
<expression>.*Job not submitted.*</expression>
 +
<throw message="Job Submit Failed"/>
 +
</match>
 +
</target>
 +
</stderr-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 3: indeterminate number and order of lines containing parts
 +
of attribute definitions, but each line bearing a distinct
 +
id (e.g., openMPI attribute discovery) -->
 +
<start-up-command name="test03OpenMPI">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="attribute">
 +
<match>
 +
<expression>mca:.*:param:([^:]*):value:(.*)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="visible">
 +
<entry value="true"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>mca:.*:param:([^:]*):status:(.*)</expression>
 +
<set field="status">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>mca:.*:param:([^:]*):help:(.*)</expression>
 +
<set field="tooltip">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
<test op="EQ">
 +
<value>#status</value>
 +
<value>read-only</value>
 +
<set field="readOnly">
 +
<entry value="true"/>
 +
</set>
 +
<else>
 +
<set field="readOnly">
 +
<entry value="false"/>
 +
</set>
 +
</else>
 +
</test>
 +
</target>
 +
<target type="attribute">
 +
<match>
 +
<expression>ompi:version:full:([\d]+)[.]([\d]+).*</expression>
 +
<set field="name">
 +
<entry value="ompi_major_version"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="visible">
 +
<entry value="true"/>
 +
</set>
 +
<set field="readOnly">
 +
<entry value="true"/>
 +
</set>
 +
<set field="name" forceNewObject="true">
 +
<entry value="ompi_minor_version"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
<set field="visible">
 +
<entry value="true"/>
 +
</set>
 +
<set field="readOnly">
 +
<entry value="true"/>
 +
</set>
 +
</match>
 +
<test op="AND">
 +
<test op="EQ">
 +
<value>#name</value>
 +
<value>ompi_minor_version</value>
 +
</test>
 +
<test op="LT">
 +
<value>#value</value>
 +
<value>7</value>
 +
</test>
 +
<throw message="Only supports Open MPI 1.7 and later"/>
 +
</test>
 +
</target>
 +
<target type="attribute">
 +
<match>
 +
<expression>(.*):([^:]*)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
<set field="visible">
 +
<entry value="false"/>
 +
</set>
 +
<set field="readOnly">
 +
<entry value="true"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 4: indeterminate number of definitions, but grouped
 +
by caption; use of moveToTop to promote the target to the top of the list
 +
when the caption appears -->
 +
<start-up-command name="test04ImplicitWithTags">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="property">
 +
<match moveToTop="true">
 +
<expression>PROPERTY</expression>
 +
</match>
 +
<match>
 +
<expression>name:(.*)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>value:(.*)</expression>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
</target>
 +
<target type="attribute">
 +
<match moveToTop="true">
 +
<expression>ATTRIBUTE</expression>
 +
</match>
 +
<match>
 +
<expression>name:(.*)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>value:(.*)</expression>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 5: similar to 4, but without delimiter (implicit ordering) -->
 +
<start-up-command name="test05ImplicitOrdering">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="attribute" matchAll="true">
 +
<match>
 +
<expression>.+</expression>
 +
<set field="name">
 +
<entry valueGroup="0"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>.*</expression>
 +
<set field="type">
 +
<entry valueGroup="0"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>.*</expression>
 +
<set field="description">
 +
<entry valueGroup="0"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>.*</expression>
 +
<set field="tooltip">
 +
<entry valueGroup="0"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>.*</expression>
 +
<set field="value">
 +
<entry valueGroup="0"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 6: similar to 4, but with indeterminate type order and using buffer + DOTALL | UNIX_LINES -->
 +
<start-up-command name="test06ImplicitWithTagsDotall">
 +
<arg/>
 +
<stdout-parser maxMatchLen="32" applyToAll="true">
 +
<target type="property">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
</target>
 +
<target type="property">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
 +
<set field="name">
 +
<entry valueGroup="2"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
</target>
 +
<target type="attribute">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
</target>
 +
<target type="attribute">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
 +
<set field="name">
 +
<entry valueGroup="2"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 7: indeterminate number of property definitions, but on single line -->
 +
<start-up-command name="test07PropertyDefsSingleLine">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="property">
 +
<match>
 +
<expression expression="&lt;name&gt;(.*)&lt;/name&gt;&lt;value&gt;(.*)&lt;/value&gt;"/>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 8: looking for values interspersed in the stream but which will
 +
not exceed 32 chars -->
 +
<start-up-command name="test08JobStates">
 +
<arg/>
 +
<stdout-parser maxMatchLen="32">
 +
<target ref="jobStates">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
 +
<put field="value">
 +
<entry keyGroup="1" valueGroup="2"/>
 +
</put>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 9: successive names/values, in order, but staggered -->
 +
<start-up-command name="test09Staggered">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="property">
 +
<match>
 +
<expression>name:(.*)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>value:(.*)</expression>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 10: forced merge -->
 +
<start-up-command name="test10Merged">
 +
<arg/>
 +
<stdout-parser delim="\n">
 +
<target type="property">
 +
<match>
 +
<expression>name:(.+);value:(.+)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="value">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
<match>
 +
<expression>name:(.+);default:(.+)</expression>
 +
<set field="name">
 +
<entry valueGroup="1"/>
 +
</set>
 +
<set field="default">
 +
<entry valueGroup="2"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 11: exit-on -->
 +
<start-up-command name="test11ExitOn">
 +
<arg/>
 +
<stdout-parser maxMatchLen="32">
 +
<target ref="jobStates">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
 +
<put field="value">
 +
<entry keyGroup="1" valueGroup="2"/>
 +
</put>
 +
</match>
 +
</target>
 +
<exit-on flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-on>
 +
</stdout-parser>
 +
</start-up-command>
 +
<!-- EXAMPLE 12: exit-after -->
 +
<start-up-command name="test12ExitAfter">
 +
<arg/>
 +
<stdout-parser maxMatchLen="32">
 +
<target ref="jobStates">
 +
<match>
 +
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
 +
<put field="value">
 +
<entry keyGroup="1" valueGroup="2"/>
 +
</put>
 +
</match>
 +
</target>
 +
<exit-after flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-after>
 +
</stdout-parser>
 +
</start-up-command>
 +
<submit-interactive name="empty">
 +
<arg/>
 +
</submit-interactive>
 +
<!-- EXAMPLE 13: get-status (use of tests) -->
 +
<get-job-status name="get-job-status" ignoreExitStatus="true">
 +
<arg>qstat</arg>
 +
<arg>${ptp_rm:@jobId#name}</arg>
 +
<stdout-parser delim="\n">
 +
<target ref="@jobId">
 +
<match>
 +
<expression>[\d]+[.].+[\s]+.+[\s]+.+[\s]+.+[\s]+([A-Z])[\s]+.+</expression>
 +
<set field="value">
 +
<entry valueGroup="1"/>
 +
</set>
 +
</match>
 +
<test op="EQ">
 +
<value>#value</value>
 +
<value>Q</value>
 +
<set field="value">
 +
<entry value="QUEUED_ACTIVE"/>
 +
</set>
 +
</test>
 +
<test op="EQ">
 +
<value>#value</value>
 +
<value>R</value>
 +
<set field="value">
 +
<entry value="RUNNING"/>
 +
</set>
 +
</test>
 +
<test op="EQ">
 +
<value>#value</value>
 +
<value>S</value>
 +
<set field="value">
 +
<entry value="SUSPENDED"/>
 +
</set>
 +
</test>
 +
<test op="EQ">
 +
<value>#value</value>
 +
<value>H</value>
 +
<set field="value">
 +
<entry value="SYSTEM_ON_HOLD"/>
 +
</set>
 +
</test>
 +
<else>
 +
<set field="value">
 +
<entry value="COMPLETED"/>
 +
</set>
 +
</else>
 +
</target>
 +
</stdout-parser>
 +
<stderr-parser delim="\n">
 +
<target ref="@jobId">
 +
<match>
 +
<expression>.+</expression>
 +
<set field="value">
 +
<entry value="COMPLETED"/>
 +
</set>
 +
</match>
 +
</target>
 +
</stderr-parser>
 +
</get-job-status>
 +
</control-data>
 +
<monitor-data schedulerType="test">
 +
<driver>
 +
<name></name>
 +
</driver>
 +
</monitor-data>
 +
</resource-manager-builder>
 
</source>
 
</source>
 
'''I have not yet decided whether it will be simpler to use JAXB runtime to build the actual instance objects from valid instances of the XML, or whether we just might want to parse it in using a DOM parser and then pull from it as necessary.'''
 

Latest revision as of 20:54, 1 August 2011

JAXB Configurable Resource Manager XML

XSD

<?xml version="1.0" encoding="UTF-8"?>
<!-- ******************************************************************************* -->
<!-- * Copyright (c) 2011 University of Illinois All rights reserved. This program -->
<!-- * and the accompanying materials are made available under the terms of the -->
<!-- * Eclipse Public License v1.0 which accompanies this distribution, and is -->
<!-- * available at http://www.eclipse.org/legal/epl-v10.html -->
<!-- * -->
<!-- * Contributors: -->
<!-- * Albert L. Rossi - design and implementation -->
<!-- ****************************************************************************** -->
<xs:schema targetNamespace="http://org.eclipse.ptp/rm" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rm="http://org.eclipse.ptp/rm"
	elementFormDefault="qualified">
	<xs:element name="resource-manager-builder" type="rm:resource-manager-data"/>
	<xs:complexType name="resource-manager-data">
		<xs:sequence>
			<xs:element name="site-data" minOccurs="0" type="rm:site-type"/>
			<xs:element name="control-data" minOccurs="0" type="rm:control-type"/>
			<xs:element name="monitor-data" minOccurs="0" type="rm:monitor-type"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="site-type">
		<xs:sequence>
			<xs:element minOccurs="0" name="control-connection" type="xs:string"/>
			<xs:element minOccurs="0" name="monitor-connection" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="control-type">
		<xs:sequence>
			<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="rm:property-type"/>
			<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="rm:attribute-type"/>
			<xs:element name="managed-files" minOccurs="0" maxOccurs="unbounded" type="rm:managed-files-type"/>
			<xs:element name="script" minOccurs="0" type="rm:script-type"/>
			<xs:element name="start-up-command" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
			<xs:choice minOccurs="0">
				<xs:sequence>
					<xs:element name="submit-interactive" type="rm:command-type"/>
					<xs:element name="submit-interactive-debug" type="rm:command-type" minOccurs="0"/>
				</xs:sequence>
				<xs:sequence>
					<xs:element name="submit-batch" type="rm:command-type"/>
					<xs:element name="submit-batch-debug" type="rm:command-type" minOccurs="0"/>
				</xs:sequence>
			</xs:choice>
			<xs:element name="get-job-status" type="rm:command-type" minOccurs="0"/>
			<xs:element name="terminate-job" type="rm:command-type" minOccurs="0"/>
			<xs:element name="suspend-job" type="rm:command-type" minOccurs="0"/>
			<xs:element name="resume-job" type="rm:command-type" minOccurs="0"/>
			<xs:element name="hold-job" type="rm:command-type" minOccurs="0"/>
			<xs:element name="release-job" type="rm:command-type" minOccurs="0"/>
			<xs:element name="shut-down-command" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
			<xs:element name="button-action" minOccurs="0" maxOccurs="unbounded" type="rm:command-type"/>
			<xs:element name="launch-tab" minOccurs="0" type="rm:launch-tab-type"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="property-type">
		<xs:sequence>
			<xs:element name="default" minOccurs="0" type="xs:string"/>
			<xs:element name="value" minOccurs="0"/>
			<xs:element name="link-value-to" minOccurs="0" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="type" type="xs:string" default="java.lang.String"/>
		<xs:attribute name="visible" type="xs:boolean" default="true"/>
		<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
		<xs:attribute name="translateBooleanAs" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="attribute-type">
		<xs:sequence>
			<xs:element name="description" minOccurs="0" type="xs:string"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="choice" minOccurs="0" type="xs:string"/>
			<xs:element name="items-from" minOccurs="0" type="xs:string"/>
			<xs:element name="default" minOccurs="0" type="xs:string"/>
			<xs:element name="value" minOccurs="0"/>
			<xs:element name="link-value-to" minOccurs="0" type="xs:string"/>
			<xs:element name="validator" minOccurs="0" type="rm:validator-type"/>
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string"/>
		<xs:attribute name="type" type="xs:string" default="java.lang.String"/>
		<xs:attribute name="visible" type="xs:boolean" default="true"/>
		<xs:attribute name="status" type="xs:string"/>
		<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
		<xs:attribute name="translateBooleanAs" type="xs:string"/>
		<xs:attribute name="min" type="xs:int"/>
		<xs:attribute name="max" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="managed-files-type">
		<xs:sequence>
			<xs:element name="file-staging-location" minOccurs="0" type="xs:string"/>
			<xs:element name="file" maxOccurs="unbounded" type="rm:managed-file-type"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="script-type">
		<xs:sequence>
			<xs:element name="file-staging-location" minOccurs="0" type="xs:string"/>
			<xs:element name="line" maxOccurs="unbounded" type="rm:line-type"/>
		</xs:sequence>
		<xs:attribute name="insertEnvironmentAfter" type="xs:int" default="-1"/>
		<xs:attribute name="deleteAfterSubmit" type="xs:boolean" default="true"/>
	</xs:complexType>
	<xs:complexType name="line-type">
		<xs:sequence>
			<xs:element name="arg" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="command-type">
		<xs:sequence>
			<xs:element name="arg" maxOccurs="unbounded" type="rm:arg-type"/>
			<xs:element name="input" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
			<xs:element name="environment" minOccurs="0" maxOccurs="unbounded" type="rm:name-value-pair-type"/>
			<xs:element name="stdout-parser" minOccurs="0" type="rm:tokenizer-type"/>
			<xs:element name="stderr-parser" minOccurs="0" type="rm:tokenizer-type"/>
			<xs:element name="redirect-parser" minOccurs="0" type="rm:tokenizer-type"/>
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string"/>
		<xs:attribute name="directory" type="xs:string"/>
		<xs:attribute name="redirectStderr" type="xs:boolean" default="false"/>
		<xs:attribute name="streamBufferLimit" type="xs:int" default="-1"/>
		<xs:attribute name="replaceEnvironment" type="xs:boolean" default="false"/>
		<xs:attribute name="waitForId" type="xs:boolean" default="false"/>
		<xs:attribute name="ignoreExitStatus" type="xs:boolean" default="false"/>
		<xs:attribute name="keepOpen" type="xs:boolean" default="false"/>
		<xs:attribute name="flags" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="launch-tab-type">
		<xs:sequence>
			<xs:element name="dynamic" minOccurs="0" maxOccurs="unbounded" type="rm:tab-controller-type"/>
			<xs:element name="import" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="export-for-override" minOccurs="0" type="rm:attribute-viewer-type"/>
					</xs:sequence>
					<xs:attribute name="title" type="xs:string" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="validator-type">
		<xs:sequence>
			<xs:choice minOccurs="0">
				<xs:element name="regex"  type="rm:regex-type"/>
				<xs:element name="file-info" type="rm:file-match-type"/>
				<xs:sequence>
				  <xs:element name="range" maxOccurs="unbounded" type="rm:range-type"/>
				</xs:sequence>
			</xs:choice>
			<xs:element name="error-message" minOccurs="0" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="managed-file-type">
		<xs:choice>
			<xs:sequence>
				<xs:element name="line" maxOccurs="unbounded" type="rm:line-type"/>
			</xs:sequence>
			<xs:element name="contents" type="xs:string"/>
			<xs:element name="path" type="xs:string"/>
		</xs:choice>
		<xs:attribute name="name" use="required"/>
		<xs:attribute name="uniqueIdPrefix" type="xs:boolean" default="false"/>
		<xs:attribute name="resolveContents" type="xs:boolean" default="true"/>
		<xs:attribute name="deleteSourceAfterUse" type="xs:boolean" default="false"/>
		<xs:attribute name="deleteTargetAfterUse" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="file-match-type">
		<xs:attribute name="efsAttributes" type="xs:string"/>
		<xs:attribute name="lastModifiedBefore" type="xs:string"/>
		<xs:attribute name="lastModifiedAfter" type="xs:string"/>
		<xs:attribute name="length" type="xs:long"/>
		<xs:attribute name="isDirectory" type="xs:boolean" default="false"/>
	</xs:complexType>
	  <xs:complexType name="range-type">
     <xs:attribute name="lessThan" type="xs:string"/>
     <xs:attribute name="lessThanOrEqualTo" type="xs:string"/>
     <xs:attribute name="greaterThan" type="xs:string"/>
     <xs:attribute name="greaterThanOrEqualTo" type="xs:string"/>
   </xs:complexType>
	<xs:complexType name="name-value-pair-type">
		<xs:sequence>
			<xs:element name="arg" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string"/>
		<xs:attribute name="value" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="tab-controller-type">
		<xs:sequence>
			<xs:element name="title" type="xs:string"/>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="tab-folder" type="rm:tab-folder-type"/>
				<xs:element name="composite" type="rm:composite-type"/>
				<xs:element name="widget" type="rm:widget-type"/>
				<xs:element name="browse" type="rm:browse-type"/>
				<xs:element name="action" type="rm:push-button-type"/>
				<xs:element name="button-group" type="rm:button-group-type"/>
				<xs:element name="viewer" type="rm:attribute-viewer-type"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
		<xs:attribute name="includeWidgetValuesFrom" type="xs:string"/>
		<xs:attribute name="showViewConfig" type="xs:boolean" default="true"/>
		<xs:attribute name="showViewExcluded" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="regex-type" mixed="true">
		<xs:attribute name="flags" type="xs:string"/>
		<xs:attribute name="split" type="xs:boolean" default="false"/>
		<xs:attribute name="expression" type="xs:string"/>
	</xs:complexType>
	<xs:complexType mixed="true" name="arg-type">
		<xs:attribute name="isUndefinedIfMatches" type="xs:string"/>
		<xs:attribute name="resolve" type="xs:boolean" default="true"/>
	</xs:complexType>
	<xs:complexType name="tokenizer-type">
		<xs:sequence>
			<xs:choice>
				<xs:element name="type" type="xs:string"/>
				<xs:element name="target" maxOccurs="unbounded" type="rm:target-type"/>
			</xs:choice>
			<xs:element name="exit-on" minOccurs="0" type="rm:regex-type"/>
			<xs:element name="exit-after" minOccurs="0" type="rm:regex-type"/>
		</xs:sequence>
		<xs:attribute name="delim" type="xs:string"/>
		<xs:attribute name="includeDelim" type="xs:boolean" default="false"/>
		<xs:attribute name="maxMatchLen" type="xs:int" default="0"/>
		<xs:attribute name="all" type="xs:boolean" default="false"/>
		<xs:attribute name="save" type="xs:int" default="0"/>
		<xs:attribute name="applyToAll" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="tab-folder-type">
		<xs:sequence>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="item" maxOccurs="unbounded" type="rm:tab-item-type"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="composite-type">
		<xs:sequence>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="title" minOccurs="0" type="xs:string"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="tab-folder" type="rm:tab-folder-type"/>
				<xs:element name="composite" type="rm:composite-type"/>
				<xs:element name="widget" type="rm:widget-type"/>
				<xs:element name="browse" type="rm:browse-type"/>
				<xs:element name="action" type="rm:push-button-type"/>
				<xs:element name="button-group" type="rm:button-group-type"/>
				<xs:element name="viewer" type="rm:attribute-viewer-type"/>
			</xs:choice>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="group" type="xs:boolean" default="false"/>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="tab-item-type">
		<xs:sequence>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="title" type="xs:string"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="composite" type="rm:composite-type"/>
				<xs:element name="tab-folder" type="rm:tab-folder-type"/>
				<xs:element name="widget" type="rm:widget-type"/>
				<xs:element name="browse" type="rm:browse-type"/>
				<xs:element name="action" type="rm:push-button-type"/>
				<xs:element name="button-group" type="rm:button-group-type"/>
				<xs:element name="viewer" type="rm:attribute-viewer-type"/>
			</xs:choice>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="layout-type">
		<xs:choice>
			<xs:element name="fill-layout" type="rm:fill-layout-type"/>
			<xs:element name="row-layout" type="rm:row-layout-type"/>
			<xs:element name="grid-layout" type="rm:grid-layout-type"/>
			<xs:element name="form-layout" type="rm:form-layout-type"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="layout-data-type">
		<xs:choice>
			<xs:element name="row-data" type="rm:row-data-type"/>
			<xs:element name="grid-data" type="rm:grid-data-type"/>
			<xs:element name="form-data" type="rm:form-data-type"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="fill-layout-type">
		<xs:attribute name="type" type="xs:string"/>
		<xs:attribute name="marginHeight" type="xs:int"/>
		<xs:attribute name="marginWidth" type="xs:int"/>
		<xs:attribute name="spacing" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="row-layout-type">
		<xs:attribute name="type" type="xs:string"/>
		<xs:attribute name="center" type="xs:boolean" default="false"/>
		<xs:attribute name="justify" type="xs:boolean" default="false"/>
		<xs:attribute name="fill" type="xs:boolean" default="false"/>
		<xs:attribute name="pack" type="xs:boolean" default="false"/>
		<xs:attribute name="wrap" type="xs:boolean" default="false"/>
		<xs:attribute name="marginHeight" type="xs:int"/>
		<xs:attribute name="marginWidth" type="xs:int"/>
		<xs:attribute name="marginTop" type="xs:int"/>
		<xs:attribute name="marginBottom" type="xs:int"/>
		<xs:attribute name="marginLeft" type="xs:int"/>
		<xs:attribute name="marginRight" type="xs:int"/>
		<xs:attribute name="spacing" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="grid-layout-type">
		<xs:attribute name="numColumns" type="xs:int"/>
		<xs:attribute name="makeColumnsEqualWidth" type="xs:boolean" default="false"/>
		<xs:attribute name="marginHeight" type="xs:int"/>
		<xs:attribute name="marginWidth" type="xs:int"/>
		<xs:attribute name="marginTop" type="xs:int"/>
		<xs:attribute name="marginBottom" type="xs:int"/>
		<xs:attribute name="marginLeft" type="xs:int"/>
		<xs:attribute name="marginRight" type="xs:int"/>
		<xs:attribute name="horizontalSpacing" type="xs:int"/>
		<xs:attribute name="verticalSpacing" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="form-layout-type">
		<xs:attribute name="marginHeight" type="xs:int"/>
		<xs:attribute name="marginWidth" type="xs:int"/>
		<xs:attribute name="marginTop" type="xs:int"/>
		<xs:attribute name="marginBottom" type="xs:int"/>
		<xs:attribute name="marginLeft" type="xs:int"/>
		<xs:attribute name="marginRight" type="xs:int"/>
		<xs:attribute name="spacing" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="row-data-type">
		<xs:attribute name="height" type="xs:int"/>
		<xs:attribute name="width" type="xs:int"/>
		<xs:attribute name="exclude" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="grid-data-type">
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="horizontalAlign" type="xs:string"/>
		<xs:attribute name="verticalAlign" type="xs:string"/>
		<xs:attribute name="grabExcessHorizontal" type="xs:boolean" default="false"/>
		<xs:attribute name="grabExcessVertical" type="xs:boolean" default="false"/>
		<xs:attribute name="horizontalSpan" type="xs:int"/>
		<xs:attribute name="verticalSpan" type="xs:int"/>
		<xs:attribute name="horizontalIndent" type="xs:int"/>
		<xs:attribute name="verticalIndent" type="xs:int"/>
		<xs:attribute name="minHeight" type="xs:int"/>
		<xs:attribute name="minWidth" type="xs:int"/>
		<xs:attribute name="heightHint" type="xs:int"/>
		<xs:attribute name="widthHint" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="form-data-type">
		<xs:sequence>
			<xs:element name="top" minOccurs="0" type="rm:form-attachment-type"/>
			<xs:element name="bottom" minOccurs="0" type="rm:form-attachment-type"/>
			<xs:element name="left" minOccurs="0" type="rm:form-attachment-type"/>
			<xs:element name="right" minOccurs="0" type="rm:form-attachment-type"/>
		</xs:sequence>
		<xs:attribute name="height" type="xs:int"/>
		<xs:attribute name="width" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="form-attachment-type">
		<xs:attribute name="alignment" type="xs:string"/>
		<xs:attribute name="numerator" type="xs:int"/>
		<xs:attribute name="denominator" type="xs:int"/>
		<xs:attribute name="offset" type="xs:int"/>
	</xs:complexType>
	<xs:complexType name="widget-type">
		<xs:sequence>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="items-from" minOccurs="0" type="xs:string"/>
			<xs:element name="fixed-text" minOccurs="0" type="xs:string"/>
			<xs:element name="dynamic-text" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="arg" maxOccurs="unbounded" type="rm:arg-type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="type" default="text">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="label"/>
					<xs:enumeration value="text"/>
					<xs:enumeration value="checkbox"/>
					<xs:enumeration value="radiobutton"/>
					<xs:enumeration value="spinner"/>
					<xs:enumeration value="combo"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="buttonId" type="xs:string"/>
		<xs:attribute name="title" type="xs:string"/>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
		<xs:attribute name="saveValueTo" type="xs:string"/>
		<xs:attribute name="foreground" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="button-group-type">
		<xs:sequence>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="title" minOccurs="0" type="xs:string"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="button" maxOccurs="unbounded" type="rm:widget-type"/>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="group" type="xs:boolean" default="false"/>
		<xs:attribute name="saveValueTo" type="xs:string"/>
		<xs:attribute name="style" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="browse-type">
		<xs:sequence>
			<xs:element name="text-layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="button-layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="text-control-state" minOccurs="0" type="rm:control-state-type"/>
			<xs:element name="button-control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="title" type="xs:string"/>
		<xs:attribute name="textStyle" type="xs:string"/>
		<xs:attribute name="directory" type="xs:boolean" default="false"/>
		<xs:attribute name="uri" type="xs:boolean" default="false"/>
		<xs:attribute name="localOnly" type="xs:boolean" default="false"/>
		<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
		<xs:attribute name="saveValueTo" type="xs:string"/>
		<xs:attribute name="foreground" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="push-button-type">
		<xs:sequence>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
			<xs:element name="button-action" minOccurs="0" type="rm:button-action-type"/>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="title" type="xs:string"/>
		<xs:attribute name="foreground" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="button-action-type">
		<xs:sequence>
			<xs:element name="action" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="clearValue" type="xs:string"/>
		<xs:attribute name="refresh" type="xs:boolean" default="true"/>
	</xs:complexType>
	<xs:complexType name="attribute-viewer-type">
		<xs:sequence>
			<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
			<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
			<xs:element name="label" minOccurs="0" type="xs:string"/>
			<xs:element name="column-data" minOccurs="0" maxOccurs="7" type="rm:column-data-type"/>
			<xs:element name="items" type="rm:viewer-items-type"/>
			<xs:element name="value" minOccurs="0" type="rm:template-type"/>
			<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
		</xs:sequence>
		<xs:attribute name="type" default="table">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="table"/>
					<xs:enumeration value="tree"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="initialAllChecked" type="xs:boolean" default="true"/>
		<xs:attribute name="sort" type="xs:boolean" default="true"/>
		<xs:attribute name="headerVisible" type="xs:boolean" default="true"/>
		<xs:attribute name="linesVisible" type="xs:boolean" default="true"/>
		<xs:attribute name="tooltipEnabled" type="xs:boolean" default="true"/>
		<xs:attribute name="style" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="viewer-items-type">
		<xs:sequence>
			<xs:element name="include" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
			<xs:element name="exclude" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="allPredefined" type="xs:boolean" default="false"/>
		<xs:attribute name="allDiscovered" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="font-type">
		<xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="size" type="xs:int" default="9"/>
		<xs:attribute name="style" default="normal">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="normal"/>
					<xs:enumeration value="bold"/>
					<xs:enumeration value="italic"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="template-type">
		<xs:attribute name="pattern" type="xs:string"/>
		<xs:attribute name="separator" type="xs:string" default=" "/>
	</xs:complexType>
	<xs:complexType name="target-type">
		<xs:sequence>
			<xs:element name="match" maxOccurs="unbounded" type="rm:match-type"/>
			<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
			<xs:element name="else" minOccurs="0">
				<xs:complexType>
					<xs:choice>
						<xs:element name="add" type="rm:add-type"/>
						<xs:element name="append" type="rm:append-type"/>
						<xs:element name="put" type="rm:put-type"/>
						<xs:element name="set" type="rm:set-type"/>
						<xs:element name="throw" type="rm:throw-type"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="ref" type="xs:string"/>
		<xs:attribute name="type" default="property">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="property"/>
					<xs:enumeration value="attribute"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="matchAll" type="xs:boolean" default="false"/>
		<xs:attribute name="allowOverwrites" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="match-type">
		<xs:sequence>
			<xs:element name="expression" minOccurs="0" type="rm:regex-type"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="add" type="rm:add-type"/>
				<xs:element name="append" type="rm:append-type"/>
				<xs:element name="put" type="rm:put-type"/>
				<xs:element name="set" type="rm:set-type"/>
				<xs:element name="throw" type="rm:throw-type"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="moveToTop" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="column-data-type">
		<xs:sequence>
			<xs:element name="font" minOccurs="0" type="rm:font-type"/>
			<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string"/>
		<xs:attribute name="width" type="xs:int" default="-1"/>
		<xs:attribute name="alignment" type="xs:string"/>
		<xs:attribute name="resizable" type="xs:boolean" default="false"/>
		<xs:attribute name="moveable" type="xs:boolean" default="false"/>
		<xs:attribute name="foreground" type="xs:string"/>
		<xs:attribute name="background" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="set-type">
		<xs:sequence>
			<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
		</xs:sequence>
		<xs:attribute name="field" type="xs:string"/>
		<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="throw-type">
		<xs:sequence>
			<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
		</xs:sequence>
		<xs:attribute name="field" type="xs:string"/>
		<xs:attribute name="message" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="add-type">
		<xs:sequence>
			<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
		</xs:sequence>
		<xs:attribute name="field" type="xs:string"/>
		<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="append-type">
		<xs:sequence>
			<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
		</xs:sequence>
		<xs:attribute name="field" type="xs:string"/>
		<xs:attribute name="separator" type="xs:string"/>
		<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="put-type">
		<xs:sequence>
			<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
		</xs:sequence>
		<xs:attribute name="field" type="xs:string"/>
		<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:complexType name="entry-type">
		<xs:attribute name="key" type="xs:string"/>
		<xs:attribute name="keyGroup" type="xs:int" default="0"/>
		<xs:attribute name="keyIndex" type="xs:int" default="0"/>
		<xs:attribute name="value" type="xs:string"/>
		<xs:attribute name="valueGroup" type="xs:int" default="0"/>
		<xs:attribute name="valueIndex" type="xs:int" default="0"/>
	</xs:complexType>
	<xs:complexType name="test-type">
		<xs:sequence>
			<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
			<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="2"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="add" type="rm:add-type"/>
				<xs:element name="append" type="rm:append-type"/>
				<xs:element name="put" type="rm:put-type"/>
				<xs:element name="set" type="rm:set-type"/>
				<xs:element name="throw" type="rm:throw-type"/>
			</xs:choice>
			<xs:element name="else" minOccurs="0">
				<xs:complexType>
					<xs:choice maxOccurs="unbounded">
						<xs:element name="add" type="rm:add-type"/>
						<xs:element name="append" type="rm:append-type"/>
						<xs:element name="put" type="rm:put-type"/>
						<xs:element name="set" type="rm:set-type"/>
						<xs:element name="throw" type="rm:throw-type"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="op">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="EQ"/>
					<xs:enumeration value="LT"/>
					<xs:enumeration value="GT"/>
					<xs:enumeration value="LE"/>
					<xs:enumeration value="GE"/>
					<xs:enumeration value="AND"/>
					<xs:enumeration value="OR"/>
					<xs:enumeration value="NOT"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="control-state-type">
		<xs:sequence>
			<xs:choice minOccurs="0">
				<xs:element name="show-if" minOccurs="0" type="rm:control-state-rule-type"/>
				<xs:element name="hide-if" minOccurs="0" type="rm:control-state-rule-type"/>
			</xs:choice>
			<xs:choice minOccurs="0">
				<xs:element name="enable-if" minOccurs="0" type="rm:control-state-rule-type"/>
				<xs:element name="disable-if" minOccurs="0" type="rm:control-state-rule-type"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="control-state-rule-type">
		<xs:choice>
			<xs:element name="not" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="rule" type="rm:control-state-rule-type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="and" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="rule" maxOccurs="unbounded" type="rm:control-state-rule-type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="or" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="rule" maxOccurs="unbounded" type="rm:control-state-rule-type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:choice>
		<xs:attribute name="button" type="xs:string"/>
		<xs:attribute name="selected" type="xs:boolean" default="true"/>
	</xs:complexType>
	<xs:complexType name="monitor-type">
		<xs:sequence>
			<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="rm:property-type"/>
			<xs:element name="driver" minOccurs="0" type="rm:monitor-driver-type"/>
		</xs:sequence>
		<xs:attribute name="schedulerType" type="xs:string"/>
		<xs:attribute name="refreshFrequencyInSeconds" type="xs:int" default="60"/>
	</xs:complexType>
	<xs:complexType name="monitor-driver-type">
		<xs:choice>
			<xs:element name="url" type="xs:string"/>
			<xs:sequence>
				<xs:element name="name" type="xs:string"/>
				<xs:element name="path" minOccurs="0" type="xs:string"/>
				<xs:element name="args" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
			</xs:sequence>
		</xs:choice>
	</xs:complexType>
</xs:schema>

Tokenizer Examples

<?xml version="1.0" encoding="UTF-8"?>
<resource-manager-builder xmlns="http://org.eclipse.ptp/rm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="resource_manager_type.xsd" name="test-parsers">
	<control-data>
		<!-- EXAMPLE 1: output is a list of line-separated queue names to be assigned
			to the known property "available-queues" -->
		<start-up-command name="test01ParseQstat">
			<arg/>
			<stdout-parser delim="\n">
				<target ref="queues">
					<match>
						<expression>([\w\d]+)</expression>
						<add field="value">
							<entry valueGroup="1"/>
						</add>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 2: output is to be searched for its final line which should
			contain a job id of the form "[digits].[chars]" -->
		<start-up-command name="test02JobId" waitForId="true">
			<arg/>
			<stdout-parser delim="\n" all="true" save="1">
				<target ref="@jobId">
					<match>
						<expression>([\d]+)([.])(.+)[\s]+.*</expression>
						<append field="name">
							<entry valueGroup="1"/>
							<entry valueGroup="2"/>
							<entry valueGroup="3"/>
						</append>
						<set field="default">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry value="SUBMITTED"/>
						</set>
					</match>
					<match>
						<expression>([\d]+)[.].+</expression>
						<set field="name">
							<entry valueGroup="0"/>
						</set>
						<set field="default">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry value="SUBMITTED"/>
						</set>
					</match>
				</target>
				<target ref="@jobId">
					<match>
						<expression flags="DOTALL">.*Job not submitted.*</expression>
						<set field="value">
							<entry value="FAILED"/>
						</set>
					</match>
				</target>
			</stdout-parser>
			<stderr-parser delim="\n">
				<target ref="@jobId">
					<match>
						<expression>.*Job not submitted.*</expression>
						<throw message="Job Submit Failed"/>
					</match>
				</target>
			</stderr-parser>
		</start-up-command>
		<!-- EXAMPLE 3: indeterminate number and order of lines containing parts
			of attribute definitions, but each line bearing a distinct
			id (e.g., openMPI attribute discovery) -->
		<start-up-command name="test03OpenMPI">
			<arg/>
			<stdout-parser delim="\n">
				<target type="attribute">
					<match>
						<expression>mca:.*:param:([^:]*):value:(.*)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="visible">
							<entry value="true"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
					</match>
					<match>
						<expression>mca:.*:param:([^:]*):status:(.*)</expression>
						<set field="status">
							<entry valueGroup="2"/>
						</set>
					</match>
					<match>
						<expression>mca:.*:param:([^:]*):help:(.*)</expression>
						<set field="tooltip">
							<entry valueGroup="2"/>
						</set>
					</match>
					<test op="EQ">
						<value>#status</value>
						<value>read-only</value>
						<set field="readOnly">
							<entry value="true"/>
						</set>
						<else>
							<set field="readOnly">
								<entry value="false"/>
							</set>
						</else>
					</test>
				</target>
				<target type="attribute">
					<match>
						<expression>ompi:version:full:([\d]+)[.]([\d]+).*</expression>
						<set field="name">
							<entry value="ompi_major_version"/>
						</set>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
						<set field="visible">
							<entry value="true"/>
						</set>
						<set field="readOnly">
							<entry value="true"/>
						</set>
						<set field="name" forceNewObject="true">
							<entry value="ompi_minor_version"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
						<set field="visible">
							<entry value="true"/>
						</set>
						<set field="readOnly">
							<entry value="true"/>
						</set>
					</match>
					<test op="AND">
						<test op="EQ">
							<value>#name</value>
							<value>ompi_minor_version</value>
						</test>
						<test op="LT">
							<value>#value</value>
							<value>7</value>
						</test>
						<throw message="Only supports Open MPI 1.7 and later"/>
					</test>
				</target>
				<target type="attribute">
					<match>
						<expression>(.*):([^:]*)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
						<set field="visible">
							<entry value="false"/>
						</set>
						<set field="readOnly">
							<entry value="true"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 4: indeterminate number of definitions, but grouped
			by caption; use of moveToTop to promote the target to the top of the list
			when the caption appears -->
		<start-up-command name="test04ImplicitWithTags">
			<arg/>
			<stdout-parser delim="\n">
				<target type="property">
					<match moveToTop="true">
						<expression>PROPERTY</expression>
					</match>
					<match>
						<expression>name:(.*)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
					</match>
					<match>
						<expression>value:(.*)</expression>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
				</target>
				<target type="attribute">
					<match moveToTop="true">
						<expression>ATTRIBUTE</expression>
					</match>
					<match>
						<expression>name:(.*)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
					</match>
					<match>
						<expression>value:(.*)</expression>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 5: similar to 4, but without delimiter (implicit ordering) -->
		<start-up-command name="test05ImplicitOrdering">
			<arg/>
			<stdout-parser delim="\n">
				<target type="attribute" matchAll="true">
					<match>
						<expression>.+</expression>
						<set field="name">
							<entry valueGroup="0"/>
						</set>
					</match>
					<match>
						<expression>.*</expression>
						<set field="type">
							<entry valueGroup="0"/>
						</set>
					</match>
					<match>
						<expression>.*</expression>
						<set field="description">
							<entry valueGroup="0"/>
						</set>
					</match>
					<match>
						<expression>.*</expression>
						<set field="tooltip">
							<entry valueGroup="0"/>
						</set>
					</match>
					<match>
						<expression>.*</expression>
						<set field="value">
							<entry valueGroup="0"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 6: similar to 4, but with indeterminate type order and using buffer + DOTALL | UNIX_LINES -->
		<start-up-command name="test06ImplicitWithTagsDotall">
			<arg/>
			<stdout-parser maxMatchLen="32" applyToAll="true">
				<target type="property">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
					</match>
				</target>
				<target type="property">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
						<set field="name">
							<entry valueGroup="2"/>
						</set>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
				</target>
				<target type="attribute">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
					</match>
				</target>
				<target type="attribute">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
						<set field="name">
							<entry valueGroup="2"/>
						</set>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 7: indeterminate number of property definitions, but on single line -->
		<start-up-command name="test07PropertyDefsSingleLine">
			<arg/>
			<stdout-parser delim="\n">
				<target type="property">
					<match>
						<expression expression="&lt;name&gt;(.*)&lt;/name&gt;&lt;value&gt;(.*)&lt;/value&gt;"/>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 8: looking for values interspersed in the stream but which will
			not exceed 32 chars -->
		<start-up-command name="test08JobStates">
			<arg/>
			<stdout-parser maxMatchLen="32">
				<target ref="jobStates">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
						<put field="value">
							<entry keyGroup="1" valueGroup="2"/>
						</put>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 9: successive names/values, in order, but staggered -->
		<start-up-command name="test09Staggered">
			<arg/>
			<stdout-parser delim="\n">
				<target type="property">
					<match>
						<expression>name:(.*)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
					</match>
					<match>
						<expression>value:(.*)</expression>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 10: forced merge -->
		<start-up-command name="test10Merged">
			<arg/>
			<stdout-parser delim="\n">
				<target type="property">
					<match>
						<expression>name:(.+);value:(.+)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="value">
							<entry valueGroup="2"/>
						</set>
					</match>
					<match>
						<expression>name:(.+);default:(.+)</expression>
						<set field="name">
							<entry valueGroup="1"/>
						</set>
						<set field="default">
							<entry valueGroup="2"/>
						</set>
					</match>
				</target>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 11: exit-on -->
		<start-up-command name="test11ExitOn">
			<arg/>
			<stdout-parser maxMatchLen="32">
				<target ref="jobStates">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
						<put field="value">
							<entry keyGroup="1" valueGroup="2"/>
						</put>
					</match>
				</target>
				<exit-on flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-on>
			</stdout-parser>
		</start-up-command>
		<!-- EXAMPLE 12: exit-after -->
		<start-up-command name="test12ExitAfter">
			<arg/>
			<stdout-parser maxMatchLen="32">
				<target ref="jobStates">
					<match>
						<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
						<put field="value">
							<entry keyGroup="1" valueGroup="2"/>
						</put>
					</match>
				</target>
				<exit-after flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-after>
			</stdout-parser>
		</start-up-command>
		<submit-interactive name="empty">
			<arg/>
		</submit-interactive>
		<!-- EXAMPLE 13: get-status (use of tests) -->
		<get-job-status name="get-job-status" ignoreExitStatus="true">
			<arg>qstat</arg>
			<arg>${ptp_rm:@jobId#name}</arg>
			<stdout-parser delim="\n">
				<target ref="@jobId">
					<match>
						<expression>[\d]+[.].+[\s]+.+[\s]+.+[\s]+.+[\s]+([A-Z])[\s]+.+</expression>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
					</match>
					<test op="EQ">
						<value>#value</value>
						<value>Q</value>
						<set field="value">
							<entry value="QUEUED_ACTIVE"/>
						</set>
					</test>
					<test op="EQ">
						<value>#value</value>
						<value>R</value>
						<set field="value">
							<entry value="RUNNING"/>
						</set>
					</test>
					<test op="EQ">
						<value>#value</value>
						<value>S</value>
						<set field="value">
							<entry value="SUSPENDED"/>
						</set>
					</test>
					<test op="EQ">
						<value>#value</value>
						<value>H</value>
						<set field="value">
							<entry value="SYSTEM_ON_HOLD"/>
						</set>
					</test>
					<else>
						<set field="value">
							<entry value="COMPLETED"/>
						</set>
					</else>
				</target>
			</stdout-parser>
			<stderr-parser delim="\n">
				<target ref="@jobId">
					<match>
						<expression>.+</expression>
						<set field="value">
							<entry value="COMPLETED"/>
						</set>
					</match>
				</target>
			</stderr-parser>
		</get-job-status>
	</control-data>
	<monitor-data schedulerType="test">
		<driver>
			<name></name>
		</driver>
	</monitor-data>
</resource-manager-builder>

Back to the top