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)
 
(78 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 ==
 
+
'''''Revised version 1 (17/01/2011):'''''
+
 
+
'''''Revised version 2 (19/01/2011):'''''  I have adjusted the schema to accommodate the points raised by our discussions on ptp-dev.  More tomorrow, I'm sure. -alr
+
 
+
'''''Revised version 3 (23/01/2011):'''''  A few more changes I discovered needed to be made as I work through the XML instance for PBS. -alr
+
 
+
'''''Revised version 4 (24/01/2011):'''''  More tweaks. -alr
+
  
 
<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:attribute name="name" type="xs:string" />
+
<xs:element name="contents" type="xs:string"/>
</xs:complexType>
+
<xs:element name="path" type="xs:string"/>
</xs:element>
+
</xs:choice>
<xs:element name="control">
+
<xs:attribute name="name" use="required"/>
<xs:annotation>
+
<xs:attribute name="uniqueIdPrefix" type="xs:boolean" default="false"/>
<xs:documentation>
+
<xs:attribute name="resolveContents" type="xs:boolean" default="true"/>
The implementation will construct a map serving as
+
<xs:attribute name="deleteSourceAfterUse" type="xs:boolean" default="false"/>
the resource manager "environment"; these are dereferenced in the
+
<xs:attribute name="deleteTargetAfterUse" type="xs:boolean" default="false"/>
configuration file via ${name} or ${name.part}; in addition to the
+
</xs:complexType>
properties specified at the top level of the control tree, all
+
<xs:complexType name="file-match-type">
attributes and parsers will be mapped for reference. A number of
+
<xs:attribute name="efsAttributes" type="xs:string"/>
runtime variables such as remote host name, user name, etc., will
+
<xs:attribute name="lastModifiedBefore" type="xs:string"/>
also be included. The top level of the tree represents the available
+
<xs:attribute name="lastModifiedAfter" type="xs:string"/>
commands/methods on all resource managers, places for defining
+
<xs:attribute name="length" type="xs:long"/>
stdout
+
<xs:attribute name="isDirectory" type="xs:boolean" default="false"/>
or stderr parsers, for defining the structure of a batch
+
</xs:complexType>
script to be
+
  <xs:complexType name="range-type">
used, for defining (job) attributes, and finally for
+
    <xs:attribute name="lessThan" type="xs:string"/>
describing how
+
    <xs:attribute name="lessThanOrEqualTo" type="xs:string"/>
to construct the UI (Launch Configuration Tab).
+
    <xs:attribute name="greaterThan" type="xs:string"/>
</xs:documentation>
+
    <xs:attribute name="greaterThanOrEqualTo" type="xs:string"/>
</xs:annotation>
+
  </xs:complexType>
<xs:complexType>
+
<xs:complexType name="name-value-pair-type">
<xs:sequence>
+
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property" />
+
<xs:element name="arg" minOccurs="0" maxOccurs="unbounded" type="rm:arg-type"/>
<xs:element minOccurs="0" ref="on-start-up" />
+
</xs:sequence>
<xs:element minOccurs="0" ref="discover-attributes" />
+
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:element name="run-commands">
+
<xs:attribute name="value" type="xs:string"/>
<xs:complexType>
+
</xs:complexType>
<xs:choice minOccurs="1" maxOccurs="3">
+
<xs:complexType name="tab-controller-type">
<xs:element ref="run-interactive" />
+
<xs:sequence>
<xs:element ref="run-batch" />
+
<xs:element name="title" type="xs:string"/>
<xs:element ref="run-debug" />
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
</xs:choice>
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
</xs:complexType>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:element>
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="cancel-job" />
+
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
<xs:element minOccurs="0" ref="suspend-job" />
+
<xs:element name="composite" type="rm:composite-type"/>
<xs:element minOccurs="0" ref="resume-job" />
+
<xs:element name="widget" type="rm:widget-type"/>
<xs:element minOccurs="0" ref="on-shut-down" />
+
<xs:element name="browse" type="rm:browse-type"/>
<xs:element minOccurs="0" ref="commands" />
+
<xs:element name="action" type="rm:push-button-type"/>
<xs:element minOccurs="0" ref="parsers" />
+
<xs:element name="button-group" type="rm:button-group-type"/>
<xs:element minOccurs="0" ref="script" />
+
<xs:element name="viewer" type="rm:attribute-viewer-type"/>
<xs:element ref="attribute-definitions" />
+
</xs:choice>
<xs:element ref="launch-tab" />
+
</xs:sequence>
</xs:sequence>
+
<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="property">
+
<xs:attribute name="showViewConfig" type="xs:boolean" default="true"/>
<xs:annotation>
+
<xs:attribute name="showViewExcluded" type="xs:boolean" default="false"/>
<xs:documentation>
+
</xs:complexType>
The value is any object type; these are set at
+
<xs:complexType name="regex-type" mixed="true">
runtime.
+
<xs:attribute name="flags" type="xs:string"/>
</xs:documentation>
+
<xs:attribute name="split" type="xs:boolean" default="false"/>
</xs:annotation>
+
<xs:attribute name="expression" type="xs:string"/>
<xs:complexType>
+
</xs:complexType>
<xs:attribute name="name" type="xs:string" />
+
<xs:complexType mixed="true" name="arg-type">
</xs:complexType>
+
<xs:attribute name="isUndefinedIfMatches" type="xs:string"/>
</xs:element>
+
<xs:attribute name="resolve" type="xs:boolean" default="true"/>
<xs:element name="on-start-up">
+
</xs:complexType>
<xs:annotation>
+
<xs:complexType name="tokenizer-type">
<xs:documentation>
+
<xs:sequence>
Arbitrary commands which need to be run on startup.
+
<xs:choice>
</xs:documentation>
+
<xs:element name="type" type="xs:string"/>
</xs:annotation>
+
<xs:element name="target" maxOccurs="unbounded" type="rm:target-type"/>
<xs:complexType>
+
</xs:choice>
<xs:sequence>
+
<xs:element name="exit-on" minOccurs="0" type="rm:regex-type"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:element name="exit-after" minOccurs="0" type="rm:regex-type"/>
</xs:sequence>
+
</xs:sequence>
</xs:complexType>
+
<xs:attribute name="delim" type="xs:string"/>
</xs:element>
+
<xs:attribute name="includeDelim" type="xs:boolean" default="false"/>
<xs:element name="discover-attributes">
+
<xs:attribute name="maxMatchLen" type="xs:int" default="0"/>
<xs:annotation>
+
<xs:attribute name="all" type="xs:boolean" default="false"/>
<xs:documentation>
+
<xs:attribute name="save" type="xs:int" default="0"/>
A command for retrieving (if possible) attributes
+
<xs:attribute name="applyToAll" type="xs:boolean" default="false"/>
defined by the service dynamically.
+
</xs:complexType>
</xs:documentation>
+
<xs:complexType name="tab-folder-type">
</xs:annotation>
+
<xs:sequence>
<xs:complexType>
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
<xs:sequence>
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:element name="item" maxOccurs="unbounded" type="rm:tab-item-type"/>
</xs:sequence>
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
</xs:complexType>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:element>
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:element name="run-interactive">
+
</xs:sequence>
<xs:annotation>
+
<xs:attribute name="style" type="xs:string"/>
<xs:documentation>
+
<xs:attribute name="background" type="xs:string"/>
The command(s) for running interactive jobs.
+
</xs:complexType>
</xs:documentation>
+
<xs:complexType name="composite-type">
</xs:annotation>
+
<xs:sequence>
<xs:complexType>
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
<xs:sequence>
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:sequence>
+
<xs:element name="title" minOccurs="0" type="xs:string"/>
</xs:complexType>
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
</xs:element>
+
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
<xs:element name="run-batch">
+
<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 command(s) for running jobs through the
+
<xs:element name="action" type="rm:push-button-type"/>
scheduler.
+
<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:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:sequence>
+
</xs:sequence>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:attribute name="group" type="xs:boolean" default="false"/>
</xs:sequence>
+
<xs:attribute name="style" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="background" type="xs:string"/>
</xs:element>
+
</xs:complexType>
<xs:element name="run-debug">
+
<xs:complexType name="tab-item-type">
<xs:annotation>
+
<xs:sequence>
<xs:documentation>
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
The command(s) for running debug jobs.
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
</xs:documentation>
+
<xs:element name="title" type="xs:string"/>
</xs:annotation>
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
<xs:complexType>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
<xs:sequence>
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:element name="composite" type="rm:composite-type"/>
</xs:sequence>
+
<xs:element name="tab-folder" type="rm:tab-folder-type"/>
</xs:complexType>
+
<xs:element name="widget" type="rm:widget-type"/>
</xs:element>
+
<xs:element name="browse" type="rm:browse-type"/>
<xs:element name="cancel-job">
+
<xs:element name="action" type="rm:push-button-type"/>
<xs:annotation>
+
<xs:element name="button-group" type="rm:button-group-type"/>
<xs:documentation>
+
<xs:element name="viewer" type="rm:attribute-viewer-type"/>
The command(s) for cancelling or killing jobs.
+
</xs:choice>
</xs:documentation>
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
</xs:annotation>
+
</xs:sequence>
<xs:complexType>
+
<xs:attribute name="style" type="xs:string"/>
<xs:sequence>
+
<xs:attribute name="background" type="xs:string"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
</xs:complexType>
</xs:sequence>
+
<xs:complexType name="layout-type">
</xs:complexType>
+
<xs:choice>
</xs:element>
+
<xs:element name="fill-layout" type="rm:fill-layout-type"/>
<xs:element name="suspend-job">
+
<xs:element name="row-layout" type="rm:row-layout-type"/>
<xs:annotation>
+
<xs:element name="grid-layout" type="rm:grid-layout-type"/>
<xs:documentation>
+
<xs:element name="form-layout" type="rm:form-layout-type"/>
The command(s) for suspending jobs.
+
</xs:choice>
</xs:documentation>
+
</xs:complexType>
</xs:annotation>
+
<xs:complexType name="layout-data-type">
<xs:complexType>
+
<xs:choice>
<xs:sequence>
+
<xs:element name="row-data" type="rm:row-data-type"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:element name="grid-data" type="rm:grid-data-type"/>
</xs:sequence>
+
<xs:element name="form-data" type="rm:form-data-type"/>
</xs:complexType>
+
</xs:choice>
</xs:element>
+
</xs:complexType>
<xs:element name="resume-job">
+
<xs:complexType name="fill-layout-type">
<xs:annotation>
+
<xs:attribute name="type" type="xs:string"/>
<xs:documentation>
+
<xs:attribute name="marginHeight" type="xs:int"/>
The command(s) for restarting suspended jobs.
+
<xs:attribute name="marginWidth" type="xs:int"/>
</xs:documentation>
+
<xs:attribute name="spacing" type="xs:int"/>
</xs:annotation>
+
</xs:complexType>
<xs:complexType>
+
<xs:complexType name="row-layout-type">
<xs:sequence>
+
<xs:attribute name="type" type="xs:string"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
<xs:attribute name="center" type="xs:boolean" default="false"/>
</xs:sequence>
+
<xs:attribute name="justify" type="xs:boolean" default="false"/>
</xs:complexType>
+
<xs:attribute name="fill" type="xs:boolean" default="false"/>
</xs:element>
+
<xs:attribute name="pack" type="xs:boolean" default="false"/>
<xs:element name="on-shut-down">
+
<xs:attribute name="wrap" type="xs:boolean" default="false"/>
<xs:annotation>
+
<xs:attribute name="marginHeight" type="xs:int"/>
<xs:documentation>
+
<xs:attribute name="marginWidth" type="xs:int"/>
Arbitrary commands which need to be run on startup.
+
<xs:attribute name="marginTop" type="xs:int"/>
</xs:documentation>
+
<xs:attribute name="marginBottom" type="xs:int"/>
</xs:annotation>
+
<xs:attribute name="marginLeft" type="xs:int"/>
<xs:complexType>
+
<xs:attribute name="marginRight" type="xs:int"/>
<xs:sequence>
+
<xs:attribute name="spacing" type="xs:int"/>
<xs:element maxOccurs="unbounded" ref="command-ref" />
+
</xs:complexType>
</xs:sequence>
+
<xs:complexType name="grid-layout-type">
</xs:complexType>
+
<xs:attribute name="numColumns" type="xs:int"/>
</xs:element>
+
<xs:attribute name="makeColumnsEqualWidth" type="xs:boolean" default="false"/>
<xs:element name="commands">
+
<xs:attribute name="marginHeight" type="xs:int"/>
<xs:complexType>
+
<xs:attribute name="marginWidth" type="xs:int"/>
<xs:sequence>
+
<xs:attribute name="marginTop" type="xs:int"/>
<xs:element maxOccurs="unbounded" ref="command" />
+
<xs:attribute name="marginBottom" type="xs:int"/>
</xs:sequence>
+
<xs:attribute name="marginLeft" type="xs:int"/>
</xs:complexType>
+
<xs:attribute name="marginRight" type="xs:int"/>
</xs:element>
+
<xs:attribute name="horizontalSpacing" type="xs:int"/>
<xs:element name="parsers">
+
<xs:attribute name="verticalSpacing" type="xs:int"/>
<xs:complexType>
+
</xs:complexType>
<xs:sequence>
+
<xs:complexType name="form-layout-type">
<xs:element maxOccurs="unbounded" ref="stream-parser" />
+
<xs:attribute name="marginHeight" type="xs:int"/>
</xs:sequence>
+
<xs:attribute name="marginWidth" type="xs:int"/>
</xs:complexType>
+
<xs:attribute name="marginTop" type="xs:int"/>
</xs:element>
+
<xs:attribute name="marginBottom" type="xs:int"/>
<xs:element name="script">
+
<xs:attribute name="marginLeft" type="xs:int"/>
<xs:complexType>
+
<xs:attribute name="marginRight" type="xs:int"/>
<xs:sequence>
+
<xs:attribute name="spacing" type="xs:int"/>
<xs:element minOccurs="0" ref="directive-definitions" />
+
</xs:complexType>
<xs:element minOccurs="0" ref="environment-definitions" />
+
<xs:complexType name="row-data-type">
<xs:element minOccurs="0" ref="pre-execute-commands" />
+
<xs:attribute name="height" type="xs:int"/>
<xs:element ref="execute-command" />
+
<xs:attribute name="width" type="xs:int"/>
<xs:element minOccurs="0" ref="post-execute-commands" />
+
<xs:attribute name="exclude" type="xs:boolean" default="false"/>
</xs:sequence>
+
</xs:complexType>
<xs:attribute name="prefix" use="required" />
+
<xs:complexType name="grid-data-type">
<xs:attribute name="shell" use="required" />
+
<xs:attribute name="style" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="horizontalAlign" type="xs:string"/>
</xs:element>
+
<xs:attribute name="verticalAlign" type="xs:string"/>
<xs:element name="directive-definitions">
+
<xs:attribute name="grabExcessHorizontal" type="xs:boolean" default="false"/>
<xs:complexType>
+
<xs:attribute name="grabExcessVertical" type="xs:boolean" default="false"/>
<xs:sequence>
+
<xs:attribute name="horizontalSpan" type="xs:int"/>
<xs:element maxOccurs="unbounded" ref="directive-definition" />
+
<xs:attribute name="verticalSpan" type="xs:int"/>
</xs:sequence>
+
<xs:attribute name="horizontalIndent" type="xs:int"/>
</xs:complexType>
+
<xs:attribute name="verticalIndent" type="xs:int"/>
</xs:element>
+
<xs:attribute name="minHeight" type="xs:int"/>
<xs:element name="directive-definition">
+
<xs:attribute name="minWidth" type="xs:int"/>
<xs:annotation>
+
<xs:attribute name="heightHint" type="xs:int"/>
<xs:documentation>
+
<xs:attribute name="widthHint" type="xs:int"/>
'ValueFrom' refers to properties in the resource
+
</xs:complexType>
manager environment.
+
<xs:complexType name="form-data-type">
</xs:documentation>
+
<xs:sequence>
</xs:annotation>
+
<xs:element name="top" minOccurs="0" type="rm:form-attachment-type"/>
<xs:complexType mixed="true">
+
<xs:element name="bottom" minOccurs="0" type="rm:form-attachment-type"/>
<xs:attribute name="valueFrom" />
+
<xs:element name="left" minOccurs="0" type="rm:form-attachment-type"/>
</xs:complexType>
+
<xs:element name="right" minOccurs="0" type="rm:form-attachment-type"/>
</xs:element>
+
</xs:sequence>
<xs:element name="environment-definitions">
+
<xs:attribute name="height" type="xs:int"/>
<xs:complexType>
+
<xs:attribute name="width" type="xs:int"/>
<xs:sequence>
+
</xs:complexType>
<xs:element maxOccurs="unbounded" ref="environment-definition" />
+
<xs:complexType name="form-attachment-type">
</xs:sequence>
+
<xs:attribute name="alignment" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="numerator" type="xs:int"/>
</xs:element>
+
<xs:attribute name="denominator" type="xs:int"/>
<xs:element name="environment-definition">
+
<xs:attribute name="offset" type="xs:int"/>
<xs:annotation>
+
</xs:complexType>
<xs:documentation>
+
<xs:complexType name="widget-type">
'ValueFrom' refers to properties in the resource
+
<xs:sequence>
manager environment.
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
</xs:documentation>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:annotation>
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
<xs:complexType mixed="true">
+
<xs:element name="items-from" minOccurs="0" type="xs:string"/>
<xs:attribute name="valueFrom" />
+
<xs:element name="fixed-text" minOccurs="0" type="xs:string"/>
</xs:complexType>
+
<xs:element name="dynamic-text" minOccurs="0">
</xs:element>
+
<xs:complexType>
<xs:element name="pre-execute-commands">
+
<xs:sequence>
<xs:complexType>
+
<xs:element name="arg" maxOccurs="unbounded" type="rm:arg-type"/>
<xs:sequence>
+
</xs:sequence>
<xs:element name="command" maxOccurs="unbounded" type="xs:string" />
+
</xs:complexType>
</xs:sequence>
+
</xs:element>
</xs:complexType>
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
</xs:element>
+
</xs:sequence>
<xs:element name="execute-command">
+
<xs:attribute name="type" default="text">
<xs:complexType>
+
<xs:simpleType>
<xs:sequence>
+
<xs:restriction base="xs:string">
<xs:element ref="command" />
+
<xs:enumeration value="label"/>
</xs:sequence>
+
<xs:enumeration value="text"/>
</xs:complexType>
+
<xs:enumeration value="checkbox"/>
</xs:element>
+
<xs:enumeration value="radiobutton"/>
<xs:element name="post-execute-commands">
+
<xs:enumeration value="spinner"/>
<xs:complexType>
+
<xs:enumeration value="combo"/>
<xs:sequence>
+
</xs:restriction>
<xs:element name="command" type="xs:string" />
+
</xs:simpleType>
</xs:sequence>
+
</xs:attribute>
</xs:complexType>
+
<xs:attribute name="buttonId" type="xs:string"/>
</xs:element>
+
<xs:attribute name="title" type="xs:string"/>
<xs:element name="attribute-definitions">
+
<xs:attribute name="style" type="xs:string"/>
<xs:complexType>
+
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
<xs:sequence>
+
<xs:attribute name="saveValueTo" type="xs:string"/>
<xs:element name="command" maxOccurs="unbounded" type="xs:string" />
+
<xs:attribute name="foreground" type="xs:string"/>
</xs:sequence>
+
<xs:attribute name="background" type="xs:string"/>
</xs:complexType>
+
</xs:complexType>
</xs:element>
+
<xs:complexType name="button-group-type">
<xs:element name="job-attribute">
+
<xs:sequence>
<xs:complexType>
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:sequence>
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
<xs:element name="description" type="xs:string" />
+
<xs:element name="title" minOccurs="0" type="xs:string"/>
<xs:element name="tooltip" 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="button" maxOccurs="unbounded" type="rm:widget-type"/>
<xs:annotation>
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:documentation>
+
</xs:sequence>
A a comma-delimited set of values.
+
<xs:attribute name="group" type="xs:boolean" default="false"/>
</xs:documentation>
+
<xs:attribute name="saveValueTo" type="xs:string"/>
</xs:annotation>
+
<xs:attribute name="style" type="xs:string"/>
</xs:element>
+
<xs:attribute name="background" type="xs:string"/>
<xs:element name="defaultValue" minOccurs="0" type="xs:string" />
+
</xs:complexType>
<xs:element minOccurs="0" ref="validator" />
+
<xs:complexType name="browse-type">
</xs:sequence>
+
<xs:sequence>
<xs:attribute name="id" use="required" type="xs:string" />
+
<xs:element name="text-layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:attribute name="name" use="required" type="xs:string" />
+
<xs:element name="button-layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:attribute name="type" use="required" type="xs:string" />
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
<xs:attribute name="basic" type="xs:boolean">
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
<xs:annotation>
+
<xs:element name="text-control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:documentation>
+
<xs:element name="button-control-state" minOccurs="0" type="rm:control-state-type"/>
Indicates if this attribute is part of a basic
+
</xs:sequence>
(required) set, or if it is an (advanced) option.
+
<xs:attribute name="title" type="xs:string"/>
</xs:documentation>
+
<xs:attribute name="textStyle" type="xs:string"/>
</xs:annotation>
+
<xs:attribute name="directory" type="xs:boolean" default="false"/>
</xs:attribute>
+
<xs:attribute name="uri" type="xs:boolean" default="false"/>
<xs:attribute name="minValue" type="xs:int" />
+
<xs:attribute name="localOnly" type="xs:boolean" default="false"/>
<xs:attribute name="maxValue" type="xs:int" />
+
<xs:attribute name="readOnly" type="xs:boolean" default="false"/>
</xs:complexType>
+
<xs:attribute name="saveValueTo" type="xs:string"/>
</xs:element>
+
<xs:attribute name="foreground" type="xs:string"/>
<xs:element name="command-ref" type="xs:string" />
+
<xs:attribute name="background" type="xs:string"/>
<xs:element name="parser-ref" type="xs:string" />
+
</xs:complexType>
<xs:element name="command">
+
<xs:complexType name="push-button-type">
<xs:complexType mixed="true">
+
<xs:sequence>
<xs:sequence>
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
<xs:element maxOccurs="unbounded" ref="arglist" />
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
<xs:element minOccurs="0" maxOccurs="2" ref="parser-ref" />
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
</xs:sequence>
+
<xs:element name="button-action" minOccurs="0" type="rm:button-action-type"/>
<xs:attribute name="name" type="xs:string" />
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:attribute name="displayStdout" type="xs:boolean" />
+
</xs:sequence>
<xs:attribute name="displayStderr" type="xs:boolean" />
+
<xs:attribute name="title" type="xs:string"/>
</xs:complexType>
+
<xs:attribute name="foreground" type="xs:string"/>
</xs:element>
+
<xs:attribute name="background" type="xs:string"/>
<xs:element name="arglist">
+
</xs:complexType>
<xs:complexType mixed="true">
+
<xs:complexType name="button-action-type">
<xs:sequence>
+
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="arg" />
+
<xs:element name="action" type="xs:string"/>
</xs:sequence>
+
</xs:sequence>
<xs:attribute name="dynamicAppend" type="xs:boolean">
+
<xs:attribute name="clearValue" type="xs:string"/>
<xs:annotation>
+
<xs:attribute name="refresh" type="xs:boolean" default="true"/>
<xs:documentation>
+
</xs:complexType>
Iterate over all dynamic attributes, appending
+
<xs:complexType name="attribute-viewer-type">
the sequence of args for
+
<xs:sequence>
each attribute.
+
<xs:element name="layout-data" minOccurs="0" type="rm:layout-data-type"/>
</xs:documentation>
+
<xs:element name="layout" minOccurs="0" type="rm:layout-type"/>
</xs:annotation>
+
<xs:element name="label" minOccurs="0" type="xs:string"/>
</xs:attribute>
+
<xs:element name="column-data" minOccurs="0" maxOccurs="7" type="rm:column-data-type"/>
</xs:complexType>
+
<xs:element name="items" type="rm:viewer-items-type"/>
</xs:element>
+
<xs:element name="value" minOccurs="0" type="rm:template-type"/>
<xs:element name="arg" type="xs:string">
+
<xs:element name="control-state" minOccurs="0" type="rm:control-state-type"/>
<xs:annotation>
+
</xs:sequence>
<xs:documentation>
+
<xs:attribute name="type" default="table">
The text of the argument will be parsed for
+
<xs:simpleType>
references to the resource manager environment; e.g., ${a}, v=${v},
+
<xs:restriction base="xs:string">
etc. By convention, ${@name} and ${@value} will refer to a given
+
<xs:enumeration value="table"/>
dynamic attribute name and value (of undefined position i in the
+
<xs:enumeration value="tree"/>
list).
+
</xs:restriction>
</xs:documentation>
+
</xs:simpleType>
</xs:annotation>
+
</xs:attribute>
</xs:element>
+
<xs:attribute name="name" type="xs:string"/>
<xs:element name="stream-parser">
+
<xs:attribute name="initialAllChecked" type="xs:boolean" default="true"/>
<xs:annotation>
+
<xs:attribute name="sort" type="xs:boolean" default="true"/>
<xs:documentation>
+
<xs:attribute name="headerVisible" type="xs:boolean" default="true"/>
These are attached to the stdout or stderr streams
+
<xs:attribute name="linesVisible" type="xs:boolean" default="true"/>
in order to capture the output of the command and add values into
+
<xs:attribute name="tooltipEnabled" type="xs:boolean" default="true"/>
the resource manager environment. It is understood that a parser
+
<xs:attribute name="style" type="xs:string"/>
tokenization is a list of matching tokens.
+
</xs:complexType>
</xs:documentation>
+
<xs:complexType name="viewer-items-type">
</xs:annotation>
+
<xs:sequence>
<xs:complexType>
+
<xs:element name="include" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
<xs:sequence>
+
<xs:element name="exclude" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
<xs:element name="parse-lines" type="xs:string">
+
</xs:sequence>
<xs:annotation>
+
<xs:attribute name="allPredefined" type="xs:boolean" default="false"/>
<xs:documentation>
+
<xs:attribute name="allDiscovered" type="xs:boolean" default="false"/>
Which lines of output should be examined.
+
</xs:complexType>
Indicated by single numerical value, comma-delimited list, or
+
<xs:complexType name="font-type">
colon-delimited range; by convention, N = total number of lines
+
<xs:attribute name="name" type="xs:string"/>
returned. The parser will detach itself from the stream once the
+
<xs:attribute name="size" type="xs:int" default="9"/>
last line indicated here is seen.
+
<xs:attribute name="style" default="normal">
</xs:documentation>
+
<xs:simpleType>
</xs:annotation>
+
<xs:restriction base="xs:string">
</xs:element>
+
<xs:enumeration value="normal"/>
<xs:element maxOccurs="unbounded" ref="token" />
+
<xs:enumeration value="bold"/>
<xs:element maxOccurs="unbounded" ref="put" />
+
<xs:enumeration value="italic"/>
</xs:sequence>
+
</xs:restriction>
<xs:attribute name="name" use="required" type="xs:string" />
+
</xs:simpleType>
<xs:attribute name="stderr" type="xs:boolean" />
+
</xs:attribute>
</xs:complexType>
+
</xs:complexType>
</xs:element>
+
<xs:complexType name="template-type">
<xs:element name="put">
+
<xs:attribute name="pattern" type="xs:string"/>
<xs:annotation>
+
<xs:attribute name="separator" type="xs:string" default=" "/>
<xs:documentation>
+
</xs:complexType>
Value assigned to the name is the token with the
+
<xs:complexType name="target-type">
given index in the returned list; a put without index assigns the
+
<xs:sequence>
entire list to the name.
+
<xs:element name="match" maxOccurs="unbounded" type="rm:match-type"/>
</xs:documentation>
+
<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
</xs:annotation>
+
<xs:element name="else" minOccurs="0">
<xs:complexType>
+
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string" />
+
<xs:choice>
<xs:attribute name="index" type="xs:integer" />
+
<xs:element name="add" type="rm:add-type"/>
</xs:complexType>
+
<xs:element name="append" type="rm:append-type"/>
</xs:element>
+
<xs:element name="put" type="rm:put-type"/>
<xs:element name="token">
+
<xs:element name="set" type="rm:set-type"/>
<xs:complexType>
+
<xs:element name="throw" type="rm:throw-type"/>
<xs:sequence>
+
</xs:choice>
<xs:element minOccurs="0" ref="token" />
+
</xs:complexType>
</xs:sequence>
+
</xs:element>
<xs:attribute name="delim" use="required" />
+
</xs:sequence>
<xs:attribute name="return" use="required" type="xs:string">
+
<xs:attribute name="ref" type="xs:string"/>
<xs:annotation>
+
<xs:attribute name="type" default="property">
<xs:documentation>
+
<xs:simpleType>
Indicates which segments generated by the
+
<xs:restriction base="xs:string">
tokenization should be returned; can be a single numerical value,
+
<xs:enumeration value="property"/>
comma-delimited list, or colon-delimited range; by convention, N =
+
<xs:enumeration value="attribute"/>
total number of segments created.
+
</xs:restriction>
</xs:documentation>
+
</xs:simpleType>
</xs:annotation>
+
</xs:attribute>
</xs:attribute>
+
<xs:attribute name="matchAll" type="xs:boolean" default="false"/>
</xs:complexType>
+
<xs:attribute name="allowOverwrites" type="xs:boolean" default="false"/>
</xs:element>
+
</xs:complexType>
<xs:element name="validator">
+
<xs:complexType name="match-type">
<xs:annotation>
+
<xs:sequence>
<xs:documentation>
+
<xs:element name="expression" minOccurs="0" type="rm:regex-type"/>
A regular expression or an acl used to validate an
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
attribute value.
+
<xs:element name="add" type="rm:add-type"/>
</xs:documentation>
+
<xs:element name="append" type="rm:append-type"/>
</xs:annotation>
+
<xs:element name="put" type="rm:put-type"/>
<xs:complexType>
+
<xs:element name="set" type="rm:set-type"/>
<xs:sequence>
+
<xs:element name="throw" type="rm:throw-type"/>
<xs:choice>
+
</xs:choice>
<xs:element name="regex" type="xs:string" />
+
</xs:sequence>
<xs:element name="acl" type="xs:string" />
+
<xs:attribute name="moveToTop" type="xs:boolean" default="false"/>
</xs:choice>
+
</xs:complexType>
<xs:element name="error-message" minOccurs="0" type="xs:string" />
+
<xs:complexType name="column-data-type">
</xs:sequence>
+
<xs:sequence>
</xs:complexType>
+
<xs:element name="font" minOccurs="0" type="rm:font-type"/>
</xs:element>
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
<xs:element name="launch-tab">
+
</xs:sequence>
<xs:annotation>
+
<xs:attribute name="name" type="xs:string"/>
<xs:documentation>
+
<xs:attribute name="width" type="xs:int" default="-1"/>
This is a recursive description of the main UI
+
<xs:attribute name="alignment" type="xs:string"/>
element associated with the control part, the Launch Tab. NOTE: I do
+
<xs:attribute name="resizable" type="xs:boolean" default="false"/>
not as yet know how many of the underlying widget options need to be
+
<xs:attribute name="moveable" type="xs:boolean" default="false"/>
exposed here for effective building in the createControl method.
+
<xs:attribute name="foreground" type="xs:string"/>
What follows is minimal.
+
<xs:attribute name="background" type="xs:string"/>
</xs:documentation>
+
</xs:complexType>
</xs:annotation>
+
<xs:complexType name="set-type">
<xs:complexType>
+
<xs:sequence>
<xs:sequence>
+
<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
<xs:element maxOccurs="unbounded" ref="tab-controller" />
+
</xs:sequence>
</xs:sequence>
+
<xs:attribute name="field" type="xs:string"/>
<xs:attribute name="advancedModeEnabled" type="xs:boolean">
+
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
<xs:annotation>
+
</xs:complexType>
<xs:documentation>
+
<xs:complexType name="throw-type">
If this is set to true, a tab-controller which
+
<xs:sequence>
allows the user to browse the local file system and/or workspace
+
<xs:element name="entry" minOccurs="0" type="rm:entry-type"/>
to open and edit a custom batch script will be created; this will
+
</xs:sequence>
include copy and renaming buttons.
+
<xs:attribute name="field" type="xs:string"/>
</xs:documentation>
+
<xs:attribute name="message" type="xs:string"/>
</xs:annotation>
+
</xs:complexType>
</xs:attribute>
+
<xs:complexType name="add-type">
</xs:complexType>
+
<xs:sequence>
</xs:element>
+
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
<xs:element name="tab-controller">
+
</xs:sequence>
<xs:annotation>
+
<xs:attribute name="field" type="xs:string"/>
<xs:documentation>
+
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
as in:
+
</xs:complexType>
org.eclipse.ptp.rm.ui.launch.ExtendableRMLaunchConfigurationDynamicTab;
+
<xs:complexType name="append-type">
a top-level "switch" between views.
+
<xs:sequence>
</xs:documentation>
+
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
</xs:annotation>
+
</xs:sequence>
<xs:complexType>
+
<xs:attribute name="field" type="xs:string"/>
<xs:sequence>
+
<xs:attribute name="separator" type="xs:string"/>
<xs:element name="title" type="xs:string" />
+
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="group" />
+
</xs:complexType>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" />
+
<xs:complexType name="put-type">
</xs:sequence>
+
<xs:sequence>
</xs:complexType>
+
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded" type="rm:entry-type"/>
</xs:element>
+
</xs:sequence>
<xs:element name="tab-folder">
+
<xs:attribute name="field" type="xs:string"/>
<xs:complexType>
+
<xs:attribute name="forceNewObject" type="xs:boolean" default="false"/>
<xs:sequence>
+
</xs:complexType>
<xs:element name="title" type="xs:string" />
+
<xs:complexType name="entry-type">
<xs:element maxOccurs="unbounded" ref="tab-item" />
+
<xs:attribute name="key" type="xs:string"/>
</xs:sequence>
+
<xs:attribute name="keyGroup" type="xs:int" default="0"/>
</xs:complexType>
+
<xs:attribute name="keyIndex" type="xs:int" default="0"/>
</xs:element>
+
<xs:attribute name="value" type="xs:string"/>
<xs:element name="tab-item">
+
<xs:attribute name="valueGroup" type="xs:int" default="0"/>
<xs:complexType>
+
<xs:attribute name="valueIndex" type="xs:int" default="0"/>
<xs:sequence>
+
</xs:complexType>
<xs:element name="title" type="xs:string" />
+
<xs:complexType name="test-type">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="group" />
+
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" />
+
<xs:element name="test" minOccurs="0" maxOccurs="unbounded" type="rm:test-type"/>
</xs:sequence>
+
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="2"/>
</xs:complexType>
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
</xs:element>
+
<xs:element name="add" type="rm:add-type"/>
<xs:element name="group">
+
<xs:element name="append" type="rm:append-type"/>
<xs:annotation>
+
<xs:element name="put" type="rm:put-type"/>
<xs:documentation>
+
<xs:element name="set" type="rm:set-type"/>
We may want a few tweaks here, such as borders,
+
<xs:element name="throw" type="rm:throw-type"/>
etc. Dynamic attribute means this group gets rebuilt if there is a
+
</xs:choice>
button allowing the user to select displayed attributes.
+
<xs:element name="else" minOccurs="0">
</xs:documentation>
+
<xs:complexType>
</xs:annotation>
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element name="title" type="xs:string" />
+
<xs:choice>
+
 
<xs:choice maxOccurs="unbounded">
 
<xs:choice maxOccurs="unbounded">
<xs:element ref="group" />
+
<xs:element name="add" type="rm:add-type"/>
<xs:element ref="tab-folder" />
+
<xs:element name="append" type="rm:append-type"/>
<xs:element ref="widget" />
+
<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:choice>
<xs:element ref="discovered-attributes" />
+
</xs:complexType>
</xs:choice>
+
</xs:element>
</xs:sequence>
+
</xs:sequence>
<xs:attribute name="columns" type="xs:integer" />
+
<xs:attribute name="op">
<xs:attribute name="dynamic" type="xs:boolean" />
+
<xs:simpleType>
<xs:attribute name="scrollable" type="xs:boolean" />
+
<xs:restriction base="xs:string">
</xs:complexType>
+
<xs:enumeration value="EQ"/>
</xs:element>
+
<xs:enumeration value="LT"/>
<xs:element name="discovered-attributes">
+
<xs:enumeration value="GT"/>
<xs:annotation>
+
<xs:enumeration value="LE"/>
<xs:documentation>
+
<xs:enumeration value="GE"/>
Indicates that all the attributes defined at
+
<xs:enumeration value="AND"/>
runtime be placed in this group.
+
<xs:enumeration value="OR"/>
</xs:documentation>
+
<xs:enumeration value="NOT"/>
</xs:annotation>
+
</xs:restriction>
<xs:complexType>
+
</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="single-table" minOccurs="0">
+
<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 presence of this element indicates all
+
attributes should be placed in a single table; otherwise,
+
attributes are mapped serially to widgets by type.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:complexType mixed="true">
+
<xs:attribute name="checkbox" type="xs:boolean" />
+
<xs:attribute name="editable" type="xs:boolean" />
+
</xs:complexType>
+
</xs:element>
+
 
</xs:sequence>
 
</xs:sequence>
</xs:complexType>
+
</xs:choice>
</xs:element>
+
</xs:complexType>
<xs:element name="widget">
+
<xs:complexType>
+
<xs:sequence>
+
<xs:element name="label" minOccurs="0" type="xs:string" />
+
<xs:element name="tooltip" minOccurs="0" type="xs:string"/>
+
<xs:element name="content">
+
<xs:annotation>
+
<xs:documentation>
+
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:complexType>
+
<xs:sequence>
+
<xs:element ref="arglist" />
+
</xs:sequence>
+
</xs:complexType>
+
</xs:element>
+
<xs:element name="saveValueTo" type="xs:string">
+
<xs:annotation>
+
<xs:documentation>
+
The text of this element will be the name of a
+
property
+
</xs:documentation>
+
</xs:annotation>
+
</xs:element>
+
</xs:sequence>
+
<xs:attribute name="type" default="text">
+
<xs:annotation>
+
<xs:documentation>
+
Custom, fixed widgets:
+
1. select-attributes: push button which brings up wizard
+
exposing attribute names with checkboxes, allowing
+
dynamic groups to be rebuilt.
+
2. show-script: push button which displays the batch
+
script as it would currently be submitted.
+
</xs:documentation>
+
</xs:annotation>
+
<xs:simpleType>
+
<xs:restriction base="xs:string">
+
<xs:enumeration value="text" />
+
<xs:enumeration value="pushButton" />
+
<xs:enumeration value="radioButton" />
+
<xs:enumeration value="spinner" />
+
<xs:enumeration value="checkbox" />
+
<xs:enumeration value="combo" />
+
<xs:enumeration value="browseButton" />
+
<xs:enumeration value="table" />
+
<xs:enumeration value="selectAttributes" />
+
<xs:enumeration value="showScript" />
+
</xs:restriction>
+
</xs:simpleType>
+
</xs:attribute>
+
<xs:attribute name="readOnly" 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 ==
  
'''I have not yet decided whether it will be simpler (or more efficient) 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.'''
+
<source lang="xml">
 +
<?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>
 +
</source>

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