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)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
= JAXB Configurable Resource Manager XML =
<html>
+
<head>
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
<title>The PTP Configurable Resource Manager</title>
+
<link rel="stylesheet" type="text/css" href="help.css">
+
</head>
+
<body>
+
<br>
+
<h1>The JAXB Configurable Resource Manager</h1>
+
<h2>
+
<a name="Introduction">Introduction</a>
+
</h2>
+
  
<p>
+
== XSD ==
The JAXB Resource Manager plug-ins allow you to launch and monitor
+
applications on local or remote resources using resource managers
+
which are configured from an XML file via JAXB (
+
<code>javax.xml.bind</code>
+
) technology.<br>
+
</p>
+
  
<p>There are two main motivations for providing this class of
+
<source lang="xml">
resource managers:</p>
+
<?xml version="1.0" encoding="UTF-8"?>
<ol>
+
<!-- ******************************************************************************* -->
<li>To allow for maximum configurability. Often job schedulers
+
<!-- * Copyright (c) 2011 University of Illinois All rights reserved. This program -->
(PBS, LSF, LoadLeveler, etc.) or interactive runtime systems
+
<!-- * and the accompanying materials are made available under the terms of the -->
(OpenMPI, PE, SLURM, etc.) are set up by system administrators in
+
<!-- * Eclipse Public License v1.0 which accompanies this distribution, and is -->
special or non-standard ways which make it difficult to use a generic
+
<!-- * available at http://www.eclipse.org/legal/epl-v10.html -->
tool. The configuration file allows a user or community of users to
+
<!-- * -->
fit the resource manager to a class of systems, to a single host, or
+
<!-- * Contributors: -->
even to special application usage.</li>
+
<!-- * Albert L. Rossi - design and implementation -->
<li>Building the resource manager and its UI presentation from an
+
<!-- ****************************************************************************** -->
XML configuration means that in most cases no special Java coding is
+
<xs:schema targetNamespace="http://org.eclipse.ptp/rm" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rm="http://org.eclipse.ptp/rm"
necessary. Users should be able to accommodate new systems, at least
+
elementFormDefault="qualified">
on the client-end, without writing and loading additional Eclipse
+
<xs:element name="resource-manager-builder" type="rm:resource-manager-data"/>
plugins. (The only qualification here is that the monitoring
+
<xs:complexType name="resource-manager-data">
component also support that type of scheduler or runtime; see the
+
<xs:sequence>
following paragraphs.)</li>
+
<xs:element name="site-data" minOccurs="0" type="rm:site-type"/>
</ol>
+
<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>
 +
</source>
  
<p>Additional considerations in designing a generically
+
== Tokenizer Examples ==
configurable resource manager were to partition the client
+
functionality so as to eliminate the need for special server-side
+
proxies and to scale more successfully in the updating of job and
+
resource information.</p>
+
  
<p>
+
<source lang="xml">
To this end, JAXB resource managers now consist of two components, a
+
<?xml version="1.0" encoding="UTF-8"?>
"control", which governs the configuration, launch and cancellation of
+
<resource-manager-builder xmlns="http://org.eclipse.ptp/rm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
individual jobs entirely from the client end, and a "monitor", which
+
xsi:schemaLocation="resource_manager_type.xsd" name="test-parsers">
displays job status as well as global information about the HPC
+
<control-data>
resource. In most cases, the monitor will be a pre-built type provided
+
<!-- EXAMPLE 1: output is a list of line-separated queue names to be assigned
by the PTP distribution, implemented using <a
+
to the known property "available-queues" -->
href="http://www2.fz-juelich.de/jsc/llview">LLview</a>. Since <b>LLview</b>
+
<start-up-command name="test01ParseQstat">
already supports a good number of the standard scheduler types, adding
+
<arg/>
a new resource manager type will normally entail only the specific
+
<stdout-parser delim="\n">
configuration of its control part. The default mode of usage is that
+
<target ref="queues">
the client stages the necessary LLview components (mostly Perl
+
<match>
scripts) automatically, but in a future release, the monitor will also
+
<expression>([\w\d]+)</expression>
be capable of connecting directly to a system-wide (web-based)
+
<add field="value">
deployment.
+
<entry valueGroup="1"/>
</p>
+
</add>
<p>
+
</match>
<b>The following is a guide to the resource manager XML
+
</target>
definition. Those interested only in using the JAXB resource managers
+
</stdout-parser>
already provided with the PTP distribution should consult the User
+
</start-up-command>
pages under the relevant scheduler (currently only the PBS resource
+
<!-- EXAMPLE 2: output is to be searched for its final line which should
managers are JAXB-configurable).</b>
+
contain a job id of the form "[digits].[chars]" -->
</p>
+
<start-up-command name="test02JobId" waitForId="true">
<hr>
+
<arg/>
<h2>
+
<stdout-parser delim="\n" all="true" save="1">
<a name="Customizing"></a><a href="JAXBDemo.pdf">Configuring/Customizing
+
<target ref="@jobId">
the Resource Manager</a>
+
<match>
</h2>
+
<expression>([\d]+)([.])(.+)[\s]+.*</expression>
 
+
<append field="name">
<p>We provide here an introductory tutorial slide set demonstrating
+
<entry valueGroup="1"/>
some simple additions to a pre-existing resource manager definition
+
<entry valueGroup="2"/>
file.</p>
+
<entry valueGroup="3"/>
<hr>
+
</append>
 
+
<set field="default">
<h2>
+
<entry valueGroup="1"/>
<a name="XSD"></a><a href="resource_manager_type.xsd">The JAXB
+
</set>
Configurable Resource Manager XML Schema</a><br>
+
<set field="value">
</h2>
+
<entry value="SUBMITTED"/>
 
+
</set>
<p>
+
</match>
The JAXB Resource Manager is <b><i>model-driven</i> </b>; this means
+
<match>
that its functioning and appearance are determined by a set of
+
<expression>([\d]+)[.].+</expression>
definitions provided via an XML file. What follows is a detailed
+
<set field="name">
explanation of the schema governing the resource manager XML
+
<entry valueGroup="0"/>
definition.
+
</set>
</p>
+
<set field="default">
 
+
<entry valueGroup="1"/>
<h3>
+
</set>
<a name="ResourceManagerData">The Resource Manager Data Type</a>
+
<set field="value">
</h3>
+
<entry value="SUBMITTED"/>
 
+
</set>
<img alt="ResourceManagerData" src="images/01rm-data.jpeg" />
+
</match>
 
+
</target>
<p>
+
<target ref="@jobId">
The top-level of the definition tree consists of three elements: <b>site-</b>,
+
<match>
<b>control-</b> and <b>monitor-data</b>. In addition, a resource
+
<expression flags="DOTALL">.*Job not submitted.*</expression>
manager should be given a name which sufficiently distinguishes it
+
<set field="value">
from others of a similar type; e.g., <i>pbs-torque-v_2.3.7_abe</i> is
+
<entry value="FAILED"/>
specific to an installation on the host abe, <i>ll-v_4.0</i> suits all
+
</set>
installations of LoadLeveler version 4, etc.
+
</match>
</p>
+
</target>
 
+
</stdout-parser>
<p>
+
<stderr-parser delim="\n">
The <b>site-data</b> element provides an optional place to set fixed
+
<target ref="@jobId">
or default remote site information. The connection strings are URIs
+
<match>
which are specific to the PTP RemoteServices definitions. The scheme
+
<expression>.*Job not submitted.*</expression>
for these URIs will usually name the specific remote service (e.g,
+
<throw message="Job Submit Failed"/>
<code>rse:</code>
+
</match>
or
+
</target>
<code>remotetools:</code>
+
</stderr-parser>
; local is simply
+
</start-up-command>
<code>file:</code>
+
<!-- EXAMPLE 3: indeterminate number and order of lines containing parts
). The host name and port given here will appear as defaults in the
+
of attribute definitions, but each line bearing a distinct
resource manager selection wizard when you create a new connection.
+
id (e.g., openMPI attribute discovery) -->
</p>
+
<start-up-command name="test03OpenMPI">
 
+
<arg/>
<p>
+
<stdout-parser delim="\n">
The principal section of the schema is devoted to defining the
+
<target type="attribute">
resource manager's <b>control</b> part. The top-level control elements
+
<match>
include properties and attributes, files to be staged, job script to
+
<expression>mca:.*:param:([^:]*):value:(.*)</expression>
be generated (if any), commands specific to the resource manager, and
+
<set field="name">
the layout of the Launch Tab.
+
<entry valueGroup="1"/>
</p>
+
</set>
 
+
<set field="visible">
<h4>
+
<entry value="true"/>
<a name="Environment">Resource Manager Environment</a>
+
</set>
</h4>
+
<set field="value">
<p>
+
<entry valueGroup="2"/>
The resource manager implementation constructs a variable map from the
+
</set>
defined properties and attributes which serves as the resource manager
+
</match>
"environment". Some elements directly reference these by name; a
+
<match>
text/string representation of property or attribute fields can be
+
<expression>mca:.*:param:([^:]*):status:(.*)</expression>
obtained via the Eclipse variable resolver syntax, with the namespace
+
<set field="status">
prefix set to <i>ptp_rm</i>:
+
<entry valueGroup="2"/>
<code>
+
</set>
${ptp_rm:name#<i>fieldName</i>}
+
</match>
</code>
+
<match>
, e.g.,
+
<expression>mca:.*:param:([^:]*):help:(.*)</expression>
<code>${ptp_rm:queues#value}</code>
+
<set field="tooltip">
(see further <a href="#PropertyAttributeType">below</a> on the
+
<entry valueGroup="2"/>
specific fields for properties and attributes).
+
</set>
</p>
+
</match>
<p>
+
<test op="EQ">
All properties and attributes defined in the configuration are mapped.
+
<value>#status</value>
The following hard-coded properties are also added at runtime: <br>
+
<value>read-only</value>
<br>
+
<set field="readOnly">
<code>control.user.name</code>
+
<entry value="true"/>
<br>
+
</set>
<code>control.address</code>
+
<else>
<br>
+
<set field="readOnly">
<code>control.working.dir</code>
+
<entry value="false"/>
<br>
+
</set>
<code>executablePath</code>
+
</else>
<br>
+
</test>
<code>progArgs</code>
+
</target>
<br>
+
<target type="attribute">
<code>directory</code>
+
<match>
<br> <br> In addition, these properties may be linked (see <a
+
<expression>ompi:version:full:([\d]+)[.]([\d]+).*</expression>
href="#PropertyAttributeType">below</a>) to other attributes to
+
<set field="name">
furnish the resource manager with an implementation-independent
+
<entry value="ompi_major_version"/>
variable for the queue and for any remote output files produced in
+
</set>
connection with the job submission. <br> <br>
+
<set field="value">
<code>control.queue.name</code>
+
<entry valueGroup="1"/>
<br>
+
</set>
<code>stdout_remote_path</code>
+
<set field="visible">
<br>
+
<entry value="true"/>
<code>stderr_remote_path</code>
+
</set>
<br>
+
<set field="readOnly">
</p>
+
<entry value="true"/>
 
+
</set>
<h4>
+
<set field="name" forceNewObject="true">
<a name="CommandTypes">Resource Manager Command Types</a>
+
<entry value="ompi_minor_version"/>
</h4>
+
</set>
<p>
+
<set field="value">
<i>Commands</i> are system calls, either to a local or remote OS,
+
<entry valueGroup="2"/>
depending on the connection defined for the resource manager. The <b>start-up-</b>
+
</set>
and <b>shut-down-command</b>s are arbitrary commands to be run
+
<set field="visible">
(serially in order) when the resource manager is started or stopped.
+
<entry value="true"/>
The <b>submit</b> commands are those used to launch jobs. Currently a
+
</set>
configuration may have only a batch or an interactive mode. Thus it
+
<set field="readOnly">
may have only two submission modes, a run and a debug, for the given
+
<entry value="true"/>
type. In the future we may allow all four to coexist in a single
+
</set>
configuration. <b>get-job-status</b> is a user-initiated (on-demand)
+
</match>
request to refresh the status information for a submission. Normal
+
<test op="AND">
(polled) updates, on the other hand, are the responsibility of the
+
<test op="EQ">
<code>monitor</code>
+
<value>#name</value>
component. The status command nevertheless needs to be implemented in
+
<value>ompi_minor_version</value>
most cases, as it will be called internally just after submission. The
+
</test>
remaining "-job" commands are operations which can be executed on
+
<test op="LT">
submitted jobs; with the exception of <i>terminate</i>, the rest of
+
<value>#value</value>
these have to do with schedulers (batch-systems) and do not apply to
+
<value>7</value>
resource managers which connect to interactive runtime-systems such as
+
</test>
OpenMPI or PE. <b>Note</b>: if the submission type is interactive, the
+
<throw message="Only supports Open MPI 1.7 and later"/>
<b>terminate-job</b> command usually does not need to be implemented,
+
</test>
as the process termination will be handled internally. However, in
+
</target>
some cases (such as PBS -I) which require the interactive job to run
+
<target type="attribute">
as a pseudo-terminal, one may need this command in order to force its
+
<match>
termination externally. Finally, a <b>button-action</b> is an
+
<expression>(.*):([^:]*)</expression>
arbitrary command associated with a button exposed through the
+
<set field="name">
<code>Launch Tab</code>
+
<entry valueGroup="1"/>
(see further <a href="#Widget">below</a>).
+
</set>
</p>
+
<set field="value">
 
+
<entry valueGroup="2"/>
<h3>
+
</set>
<a name="ControlType">The Control Data Type</a>
+
<set field="visible">
</h3>
+
<entry value="false"/>
 
+
</set>
<img alt="ControlData" src="images/02control.jpeg" />
+
<set field="readOnly">
 
+
<entry value="true"/>
<p>The majority of the XML definition is given over to the set-up
+
</set>
of the resource manager control. One can think of this section as
+
</match>
having four subdivisions:</p>
+
</target>
 
+
</stdout-parser>
<ol>
+
</start-up-command>
<li>Configuration Variable Definitions (the «Environment»)</li>
+
<!-- EXAMPLE 4: indeterminate number of definitions, but grouped
<li>Files and Scripts</li>
+
by caption; use of moveToTop to promote the target to the top of the list
<li>External Commands and their Stream Parsers</li>
+
when the caption appears -->
<li>UI Configuration (Launch Tab)</li>
+
<start-up-command name="test04ImplicitWithTags">
</ol>
+
<arg/>
 
+
<stdout-parser delim="\n">
<p>We will look at these each in turn.</p>
+
<target type="property">
 
+
<match moveToTop="true">
<h4>
+
<expression>PROPERTY</expression>
<a name="PropertyAttributeType">1. Property and Attribute Types</a>
+
</match>
</h4>
+
<match>
<p>
+
<expression>name:(.*)</expression>
A property is any variable necessary for the functioning of the
+
<set field="name">
resource manager. Properties often (but not necessarily) are not
+
<entry valueGroup="1"/>
visible. The value for properties can be any primitive type, or lists
+
</set>
or maps of strings. If
+
</match>
<code>stdout</code>
+
<match>
and
+
<expression>value:(.*)</expression>
<code>stderr</code>
+
<set field="value">
from a scheduled job is to be delivered to the client, the properties
+
<entry valueGroup="1"/>
<i>stdout_remote_path</i> and <i>stderr_remote_path</i> should be
+
</set>
included in the resource manager property set. Simarly, the native
+
</match>
designation for the selected queue, if used, should be linked to <i>control.queue.name</i>.
+
</target>
</p>
+
<target type="attribute">
 
+
<match moveToTop="true">
<p>The distinction between attribute and property is not hard and
+
<expression>ATTRIBUTE</expression>
fast, but the intention is to provide a way of differentiating between
+
</match>
external, system-determined variables (attributes) and variables only
+
<match>
required by the PTP implementation itself. There are several other
+
<expression>name:(.*)</expression>
elements and fields on the attribute, e.g., for type-specific defaults
+
<set field="name">
(min/max, choice). Generally, if the variable is exposed to the user,
+
<entry valueGroup="1"/>
who should also be provided with a description or instructions for
+
</set>
use, then it should be defined as an attribute.</p>
+
</match>
 
+
<match>
<img alt="Attribute" src="images/040attribute.jpeg" />
+
<expression>value:(.*)</expression>
 
+
<set field="value">
<p>
+
<entry valueGroup="1"/>
The <i>visible</i> attribute is a way of indicating to the resource
+
</set>
manager that the user will not be directly changing the value of the
+
</match>
property or attribute via the user interface. Certain widgets (such as
+
</target>
the
+
</stdout-parser>
<code>attribute viewer</code>
+
</start-up-command>
) check this to see if the property or attribute should be included
+
<!-- EXAMPLE 5: similar to 4, but without delimiter (implicit ordering) -->
automatically in its list. <i>status</i> is an optional field for
+
<start-up-command name="test05ImplicitOrdering">
capturing the validity of the attribute at runtime or for a particular
+
<arg/>
installation, if such information is made available by the system. The
+
<stdout-parser delim="\n">
<i>readOnly</i> property can be defined here, but more often will be
+
<target type="attribute" matchAll="true">
enforced directly on the widget which is connected to the property or
+
<match>
attribute. <i>min</i> and <i>max</i> give the boundaries for integer
+
<expression>.+</expression>
values, usually represented by spinner widgets.
+
<set field="name">
</p>
+
<entry valueGroup="0"/>
 
+
</set>
<p>
+
</match>
<code>description</code>
+
<match>
is meant to be a brief one-sentence definition; most of the time
+
<expression>.*</expression>
detailed information will go into the
+
<set field="type">
<code>tooltip</code>
+
<entry valueGroup="0"/>
element.
+
</set>
<code>choice</code>
+
</match>
is a predetermined, fixed set of values to choose from; these are
+
<match>
comma-delimited and will appear as the items of a combo-box.
+
<expression>.*</expression>
<code>items-from</code>
+
<set field="description">
instead links the combo items (choice) to another property or
+
<entry valueGroup="0"/>
attribute value (whose type must be
+
</set>
<code>java.util.Collection</code>
+
</match>
).
+
<match>
</p>
+
<expression>.*</expression>
 
+
<set field="tooltip">
<h4 align="center">
+
<entry valueGroup="0"/>
<a name="PAValueLink"> Property and Attribute Values </a>
+
</set>
</h4>
+
</match>
 
+
<match>
<p>
+
<expression>.*</expression>
The untyped
+
<set field="value">
<code>value</code>
+
<entry valueGroup="0"/>
element on properties and attributes is for internal use only; to give
+
</set>
a predefined (primitive) value, use the
+
</match>
<code>default</code>
+
</target>
element along with the <i>type</i> attribute.
+
</stdout-parser>
</p>
+
</start-up-command>
 
+
<!-- EXAMPLE 6: similar to 4, but with indeterminate type order and using buffer + DOTALL | UNIX_LINES -->
<p>
+
<start-up-command name="test06ImplicitWithTagsDotall">
<code>link-value-to</code>
+
<arg/>
works as follows: the property or attribute gets its value from the
+
<stdout-parser maxMatchLen="32" applyToAll="true">
property or attributed linked to, unless that property or attribute
+
<target type="property">
has an undefined (empty) value; in the latter case, any default
+
<match>
defined on the present property or attribute will be used. This
+
<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
feature is primarily intended for defining dependent properties or
+
<set field="name">
attributes whose values are not directly modified by the user.
+
<entry valueGroup="1"/>
</p>
+
</set>
 
+
<set field="value">
<p>Attributes also carry optional validators which allow you to
+
<entry valueGroup="2"/>
enforce syntactic rules or file-system semantics on the value when the
+
</set>
user enters text.</p>
+
</match>
 
+
</target>
<img alt="Validator" src="images/041validator.jpeg" />
+
<target type="property">
 
+
<match>
<h4 align="center">
+
<expression flags="DOTALL | UNIX_LINES">.*PROPERTY[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
<a name="Regex">Regex and File Match Types</a>
+
<set field="name">
</h4>
+
<entry valueGroup="2"/>
 
+
</set>
<p>
+
<set field="value">
The validator makes use of the
+
<entry valueGroup="1"/>
<code>regex</code>
+
</set>
type (also used in the parser or tokenizer; see <a
+
</match>
href="#StreamParsers">below</a>), along with a special
+
</target>
<code>file-match</code>
+
<target type="attribute">
type. A regex can be used to match by setting the <i>expression</i>
+
<match>
field; to split the segment into tokens on the basis of the
+
<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]name:(\w*)[\n]value:([\d.-]*).*</expression>
expression, set the <i>split</i> field to true (this applies only to
+
<set field="name">
the
+
<entry valueGroup="1"/>
<code>match</code>
+
</set>
type discussed <a href="#MatchType">below</a>). The expression should
+
<set field="value">
follow the grammar in
+
<entry valueGroup="2"/>
<code>java.util.regex</code>
+
</set>
; the <i>flags</i> are those made available in the
+
</match>
<code>java.util.regex.Pattern</code>
+
</target>
class (consult the Javadoc for explanations):
+
<target type="attribute">
</p>
+
<match>
<ul>
+
<expression flags="DOTALL | UNIX_LINES">.*ATTRIBUTE[\n]value:([\d.-]*)[\n]name:(\w*).*</expression>
<li>CASE_INSENSITIVE</li>
+
<set field="name">
<li>MULTILINE</li>
+
<entry valueGroup="2"/>
<li>DOTALL</li>
+
</set>
<li>UNICODE_CASE</li>
+
<set field="value">
<li>CANON_EQ</li>
+
<entry valueGroup="1"/>
<li>LITERAL</li>
+
</set>
<li>COMMENTS</li>
+
</match>
<li>UNIX_LINES</li>
+
</target>
</ul>
+
</stdout-parser>
 
+
</start-up-command>
<p>These can be OR'd in the usual manner.</p>
+
<!-- EXAMPLE 7: indeterminate number of property definitions, but on single line -->
 
+
<start-up-command name="test07PropertyDefsSingleLine">
<p>
+
<arg/>
<code>file-match</code>
+
<stdout-parser delim="\n">
exports the attributes pertaining to
+
<target type="property">
<code>org.eclipse.core.filesystem.IFileInfo</code>
+
<match>
; <i>efsAttributes</i> is an OR'd string of the EFS constants:
+
<expression expression="&lt;name&gt;(.*)&lt;/name&gt;&lt;value&gt;(.*)&lt;/value&gt;"/>
</p>
+
<set field="name">
 
+
<entry valueGroup="1"/>
<ul>
+
</set>
<li>ATTRIBUTE_READ_ONLY</li>
+
<set field="value">
<li>ATTRIBUTE_IMMUTABLE</li>
+
<entry valueGroup="2"/>
<li>ATTRIBUTE_OWNER_READ</li>
+
</set>
<li>ATTRIBUTE_OWNER_WRITE</li>
+
</match>
<li>ATTRIBUTE_OWNER_EXECUTE</li>
+
</target>
<li>ATTRIBUTE_GROUP_READ</li>
+
</stdout-parser>
<li>ATTRIBUTE_GROUP_WRITE</li>
+
</start-up-command>
<li>ATTRIBUTE_GROUP_EXECUTE</li>
+
<!-- EXAMPLE 8: looking for values interspersed in the stream but which will
<li>ATTRIBUTE_OTHER_READ</li>
+
not exceed 32 chars -->
<li>ATTRIBUTE_OTHER_WRITE</li>
+
<start-up-command name="test08JobStates">
<li>ATTRIBUTE_OTHER_EXECUTE</li>
+
<arg/>
<li>ATTRIBUTE_EXECUTABLE</li>
+
<stdout-parser maxMatchLen="32">
<li>ATTRIBUTE_ARCHIVE</li>
+
<target ref="jobStates">
<li>ATTRIBUTE_HIDDEN</li>
+
<match>
<li>ATTRIBUTE_SYMLINK</li>
+
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
<li>ATTRIBUTE_LINK_TARGET</li>
+
<put field="value">
</ul>
+
<entry keyGroup="1" valueGroup="2"/>
 
+
</put>
<p>
+
</match>
The <i>lastModified...</i> fields require the format
+
</target>
<code>yyyy/MM/dd HH:mm:ss</code>
+
</stdout-parser>
.
+
</start-up-command>
</p>
+
<!-- EXAMPLE 9: successive names/values, in order, but staggered -->
 
+
<start-up-command name="test09Staggered">
<h4>
+
<arg/>
<a name="Files">2. Managed Files</a>
+
<stdout-parser delim="\n">
</h4>
+
<target type="property">
 
+
<match>
<p>
+
<expression>name:(.*)</expression>
By "managed file" is meant a local file required by the executable but
+
<set field="name">
which may not automatically be present on the host on which the job
+
<entry valueGroup="1"/>
will run; hence, these files may either be external or may actually be
+
</set>
generated from the resource manager environment in conjunction with
+
</match>
the job submission, but in any case need to be copied to that host
+
<match>
just prior to it. The
+
<expression>value:(.*)</expression>
<code>script</code>
+
<set field="value">
file used in connection with scheduler (batch) jobs is a special
+
<entry valueGroup="1"/>
category of the
+
</set>
<code>managed-file</code>
+
</match>
type, and will be discussed in the next sub-section.
+
</target>
</p>
+
</stdout-parser>
 
+
</start-up-command>
<img alt="ManagedFiles" src="images/05managed-files.jpeg" />
+
<!-- EXAMPLE 10: forced merge -->
 
+
<start-up-command name="test10Merged">
<p>
+
<arg/>
Managed files are added to the definition in groups determined by
+
<stdout-parser delim="\n">
their shared staging location, which is a path relative to the working
+
<target type="property">
directory of the connection. (The batch script is normally staged to <i>
+
<match>
.eclipsesettings</i> in the user home directory, since it is by default
+
<expression>name:(.+);value:(.+)</expression>
temporary and deleted after the submit call returns.) The file itself
+
<set field="name">
can be set to be deleted after submission (<i>deleteTargetAfterUse</i>;
+
<entry valueGroup="1"/>
this is currently not implemented in the general case) and if the file
+
</set>
is actually generated by the resource manager, the local temporary
+
<set field="value">
copy can be deleted or retained (<i>deleteSourceAfterUse</i>). In the
+
<entry valueGroup="2"/>
latter case, one can also distinguish multiple copies of the generated
+
</set>
file by setting <i>uniqueIdPrefix</i> to true.
+
</match>
</p>
+
<match>
 
+
<expression>name:(.+);default:(.+)</expression>
<p>The managed file definition allows one of three possibilities as
+
<set field="name">
to specifying content.</p>
+
<entry valueGroup="1"/>
<ol>
+
</set>
<li>If it is an external file or one edited perhaps through the
+
<set field="default">
workspace, one can use the <code>path</code> element to indicate
+
<entry valueGroup="2"/>
location; this can be either a hard-coded path or a reference to a
+
</set>
property or attribute value.</li>
+
</match>
<li>The <code>contents</code> element is a string which literally
+
</target>
represents the file contents. The <i>resolveContents</i> attribute in
+
</stdout-parser>
this case is used to indicate whether to pass this string through the
+
</start-up-command>
variable resolver, substituting any references to property or
+
<!-- EXAMPLE 11: exit-on -->
attribute values it may contain. However, caution should be exercised
+
<start-up-command name="test11ExitOn">
here in that this string should not contain "${...}" sequences which
+
<arg/>
do not actually refer to Eclipse variables (such as batch script
+
<stdout-parser maxMatchLen="32">
variables), or the resolution will fail. If <i>resolveContents</i> is
+
<target ref="jobStates">
set to false, you can still provide this text element with a single
+
<match>
reference to a property or attribute, in which case the value of that
+
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
property or attribute will be used <i>as is</i>, without further
+
<put field="value">
dereferencing.</li>
+
<entry keyGroup="1" valueGroup="2"/>
<li>The preferred, and most flexible way to represent the
+
</put>
contents of a file to be generated, however, is to use the <code>line</code>
+
</match>
type which is discussed <a href="#LineArg">below</a> in connection
+
</target>
with the <code>script</code> type.</li>
+
<exit-on flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-on>
 
+
</stdout-parser>
</ol>
+
</start-up-command>
 
+
<!-- EXAMPLE 12: exit-after -->
<p>When the submit call is executed, managed files are written out,
+
<start-up-command name="test12ExitAfter">
if so indicated, and then their target paths are determined as
+
<arg/>
follows:</p>
+
<stdout-parser maxMatchLen="32">
 
+
<target ref="jobStates">
<ul>
+
<match>
<li>If the <code>path</code> element is used, the target path
+
<expression flags="DOTALL | UNIX_LINES">.*&lt;job&gt;([\d]*):([\w]*)&lt;/job&gt;.*</expression>
becomes <i>staging directory / name of pre-existing file</i>;</li>
+
<put field="value">
<li>If the <code>content</code> or <code>line</code> elements are
+
<entry keyGroup="1" valueGroup="2"/>
used, the target path becomes <i>staging directory/
+
</put>
[uniqueIdPrefix]managed-file-name</i>);</li>
+
</match>
<li>A property is placed in the environment whose <i>name</i> is
+
</target>
the managed-file <i>name</i> and whose <i>value</i> is this target
+
<exit-after flags="DOTALL | UNIX_LINES">.*EXIT.*</exit-after>
path.</li>
+
</stdout-parser>
</ul>
+
</start-up-command>
 
+
<submit-interactive name="empty">
<h4 align="center">
+
<arg/>
<a name="Script">The (Batch) Script Element</a>
+
</submit-interactive>
</h4>
+
<!-- EXAMPLE 13: get-status (use of tests) -->
 
+
<get-job-status name="get-job-status" ignoreExitStatus="true">
<p>A resource manager definition for a scheduler system such as PBS
+
<arg>qstat</arg>
or LoadLeveler can be instrumented to work without a batch script (by
+
<arg>${ptp_rm:@jobId#name}</arg>
setting command-line flags or passing all the job control information
+
<stdout-parser delim="\n">
as environment variables, for instance), but most frequently the use
+
<target ref="@jobId">
of a script allows more flexibility in configuring the job
+
<match>
(interactive managers of course have no need of a script).</p>
+
<expression>[\d]+[.].+[\s]+.+[\s]+.+[\s]+.+[\s]+([A-Z])[\s]+.+</expression>
 
+
<set field="value">
<img alt="ScriptType" src="images/06script.jpeg" />
+
<entry valueGroup="1"/>
 
+
</set>
<p>
+
</match>
If the script is specified in the XML definition, its path is
+
<test op="EQ">
automatically added to the list of managed files to be staged to the <i>.eclipsesettings</i>
+
<value>#value</value>
directory, and so there is no need to include a script entry
+
<value>Q</value>
explicitly under the
+
<set field="value">
<code>managed-files</code>
+
<entry value="QUEUED_ACTIVE"/>
element. As with the
+
</set>
<code>managed-file</code>
+
</test>
, <i>deleteAfterSubmit</i> indicates that the script target should not
+
<test op="EQ">
be retained (this is the default behavior); unlike the
+
<value>#value</value>
<code>managed-file</code>
+
<value>R</value>
, however, the local copy of the generated script is always deleted. A
+
<set field="value">
reserved property,
+
<entry value="RUNNING"/>
<code>managed_file_for_script</code>
+
</set>
, should be used to reference the script's path on the target
+
</test>
resource; for instance, in the PBS submit command:
+
<test op="EQ">
</p>
+
<value>#value</value>
 
+
<value>S</value>
<code>
+
<set field="value">
&lt;arg&gt;qsub&lt;/arg&gt;<br>
+
<entry value="SUSPENDED"/>
&lt;arg&gt;${ptp_rm:managed_file_for_script#value}&lt;/arg&gt;
+
</set>
</code>
+
</test>
<br>
+
<test op="EQ">
 
+
<value>#value</value>
<p>
+
<value>H</value>
<b>Note</b>: If the
+
<set field="value">
<code>import</code>
+
<entry value="SYSTEM_ON_HOLD"/>
tab (see <a href="#LaunchTab">below</a>) is used to provide an
+
</set>
external or workspace edited batch script to the run, nothing extra
+
</test>
need be done in the definition XML, as the presence of any external
+
<else>
path for the script is handled under the covers.
+
<set field="value">
</p>
+
<entry value="COMPLETED"/>
 
+
</set>
<p>
+
</else>
<i>insertEnvironmentAfter</i> is a line number indicating where in the
+
</target>
script to add any extra environment variables set through the <b>Environment</b>
+
</stdout-parser>
tab provided as part of the <b>Run Configuration</b> wizard. This way
+
<stderr-parser delim="\n">
the user has control over whether these should overwrite previously
+
<target ref="@jobId">
defined environment variable values.
+
<match>
</p>
+
<expression>.+</expression>
 
+
<set field="value">
<p></p>
+
<entry value="COMPLETED"/>
 
+
</set>
<h4 align="center">
+
</match>
<a name="LineArg"><code>line</code> and <code>arg</code> types</a>
+
</target>
</h4>
+
</stderr-parser>
 
+
</get-job-status>
<p>
+
</control-data>
The
+
<monitor-data schedulerType="test">
<code>line</code>
+
<driver>
element was mentioned <a href="#Files">above</a> in connection
+
<name></name>
with managed file content; it is essentially a wrapper around a series
+
</driver>
of
+
</monitor-data>
<code>arg</code>
+
</resource-manager-builder>
elements, all of which are placed on a single line (that is, the group
+
</source>
is terminated by a line separator).
+
</p>
+
 
+
<img alt="Line" src="images/07line-arg.jpeg" />
+
 
+
<p>
+
The
+
<code>arg</code>
+
element is used for script and managed file content as well as in the
+
definition of commands. Its text element can contain variable
+
references to be resolved against the environment, but also allows for
+
the entire string to be treated as a literal by setting <i>resolve</i>
+
to false (default is true). This is useful in the context of the
+
<code>script</code>
+
definition inasmuch as it allows for the presence of batch-type
+
variables (e.g., ${HOME}) which should be resolved by the remote shell
+
and not inside the Eclipse client.
+
</p>
+
<p>
+
The default behavior of the argument resolver is not to write out or
+
include arguments whose value is undefined (either
+
<code>null</code>
+
or zero-length). <i>isUndefinedIfMatches</i> affords more nuanced
+
control over whether an argument should be so eliminated. If the
+
argument references property or attribute values, but also has
+
text-literal segments, a regex can be provided to define what an
+
"empty" argument would be in this case. For instance, if an argument
+
flag should not appear when the value it precedes is an empty string,
+
one could write:
+
</p>
+
 
+
<code> &lt;arg isUndefinedIfMatches="-f"&gt;-f
+
${ptp_rm:flag#value}&lt;/arg&gt; </code>
+
<br>
+
 
+
<p>For the purposes of matching, trailing whitespace is trimmed
+
from the resolved argument, so there is no need to specify this as
+
part of the regex used to match.</p>
+
 
+
<h4 align="center">
+
<a name="JustInTimeEval">"Just-in-time" resolution of <i>@jobId</i>
+
and <code>managed-file</code> paths</a>
+
</h4>
+
 
+
<p>
+
<i>@jobId</i> is a special property name designating the runtime id
+
for a job instance. In the lifecycle of the run/launch (submit) call,
+
this value begins as an internally generated unique id which then is
+
swapped for the id returned by the scheduler or runtime system.
+
</p>
+
 
+
<p>
+
The <i>@jobId</i>, along with the target paths for
+
<code>managed-file</code>
+
elements, are not known at configuration time (i.e., before the user
+
hits "Run"). While the former is made visible to the parsers and the
+
returned status object of the submit command, neither is available for
+
reference in other managed files or in the
+
<code>script</code>
+
element, because these elements are generated prior to the actual
+
submission.
+
</p>
+
 
+
<p>
+
If the
+
<code>script</code>
+
needs to refer to the <i>@jobId</i>, it must do so via the variable
+
made available by the particular scheduler it is written for. An
+
example of how to reference the target path of a
+
<code>managed-file</code>
+
inside the
+
<code>script</code>
+
is included in the <a href="JAXBDemo.pdf">tutorial slides</a>; this
+
essentially involves defining a variable in the submission command's
+
environment, with a reference to the
+
<code>managed-file</code>
+
path property as its value, and then using this environment variable
+
inside the
+
<code>script</code>
+
.
+
</p>
+
 
+
<h4>
+
<a name="CommandsParsers">3. Commands</a>
+
</h4>
+
 
+
<p>
+
As mentioned <a href="#CommandTypes">above</a>, the resource manager
+
<code>command</code>
+
denotes a [UNIX-type] system call made on the resource manager's
+
remote (target) connection (PTP does not generally support execution
+
on Windows systems). The command is always configured and executed
+
through a Java API (the "process builder") which bottoms out in a
+
<code>bash -c</code>
+
command. The first argument of the command thus must be the name/path
+
of the executable only. Its own arguments can then be subsequently
+
specified by an arbitrary number of
+
<code>arg</code>
+
elements.
+
</p>
+
 
+
<img alt="CommandType" src="images/08command.jpeg" />
+
 
+
<p>
+
There are a number of important attributes on the
+
<code>command-type</code>
+
element which bear detailed discussion here. <i>directory</i> of
+
course refers to where the command will be executed; also as expected,
+
<i>redirectStderr</i> means that both output and error streams are
+
sent back on
+
<code>stdout</code>
+
. One can, if necessary, tune the buffer sizes on the stream readers
+
via the <i>streamBufferLimit</i>. If the environment set on the
+
command should entirely replace the shell environment (the default
+
behavior is to append the command environment), set <i>replaceEnvironment</i>
+
to true.
+
</p>
+
 
+
<p>
+
If you do not wish an error to be thrown in the case of non-zero exit
+
of the command, set <i>ignoreExitStatus</i> to true. The <i>flags</i>
+
attribute is an OR'd string of three possible values:
+
</p>
+
 
+
<ul>
+
<li>NONE (default)</li>
+
<li>ALLOCATE_PTY (allocates a pseudo-terminal)</li>
+
<li>FORWARD_X11</li>
+
</ul>
+
 
+
<p>
+
Two crucial fields for command control are <i>waitForId</i> and <i>keepOpen</i>.
+
The former indicates to the resource manager that the output stream
+
for the command is being parsed for an id which will appear as a
+
property in the environment during the command execution, and that the
+
execution should not return until it sees this id. Very often the
+
submit commands will have these semantics. The latter field indicates
+
that the command should be held open for potentially repeated
+
redirection of input (see next paragraph). There can only be one such
+
process open inside the resource manager at a time (these semantics
+
will usually pertain to interactive managers using a pseudo-terminal
+
mode to control job submission).
+
</p>
+
 
+
<p>
+
We have discussed the
+
<code>arg</code>
+
type <a href="#LineArg">above</a>. Note that the command arguments, input and even
+
environment variables make use of this element. For the
+
<code>name-value-pair</code>
+
type comprising the latter one can as simple alternative set the <i>value</i>
+
attribute to a string (which will be resolved first in the current
+
environment); finer-grained control over the resolution of the value,
+
however, requires the use of the
+
<code>arg</code>
+
type. When there is
+
<code>input</code>
+
present, it is directed to the input stream of the command. If the <i>keepOpen</i>
+
attribute is true, a check will be made to see if there already exists
+
an open process (which is also alive), and use that; otherwise, the
+
arguments are executed, then the input arguments are given to the
+
process. With an open command/process, the input arguments can be fed
+
repeatedly to the same process; this allows, for instance, for
+
continuous testing of an interactive job in the same interactive
+
session.
+
</p>
+
 
+
<h4 align="center">
+
<a name="StreamParsers">Stream Parsers</a>
+
</h4>
+
 
+
<p>
+
One can attach parsers (which we also refer to as tokenizers) to the
+
output and error streams of any
+
<code>command</code>
+
in order to capture information and use it to side-effect existing
+
properties or attributes, or to generate new ones on the fly. While
+
the parser is not completely general, it is capable of a wide range of
+
tasks which would typically be required in the handling of output from
+
batch and runtime systems. We here explain the main elements (
+
<code>target, match, test</code>
+
) used by the tokenizer; one should further consult the <a
+
href="#TokenizerExamples">tokenizer examples</a> demonstrating
+
various usage scenarios.
+
</p>
+
 
+
<img alt="TokenizerType" src="images/090tokenizer.jpeg" />
+
 
+
<p>
+
The
+
<code>type</code>
+
element will most commonly not be set, meaning the built-in parser
+
will be used; however, it is possible to implement a custom parser as
+
a contribution to the
+
<code>org.eclipse.ptp.rm.jaxb.core.streamParserTokenizer</code>
+
extension point, in which case this element should be set to its
+
extension id.
+
</p>
+
 
+
<p>
+
The built-in tokenizer can read the stream in two different ways. If <i>delim</i>
+
is provided, the stream is split using the indicated value. The string
+
should only be one character in length (escaped or non-escaped).
+
Provision is made for the '\r\n' (Windows) two-character delimiter
+
internally; in this case the delimiter should be set to "\r" (however,
+
as already mentioned, PTP does not generally guarantee that system calls
+
will work on Windows). Setting <i>includeDelim</i> means that the
+
delimiter will appear as the last char on the returned stream segment.
+
</p>
+
 
+
<p>
+
The second way to read from the stream is to provide a <i>maxMatchLen</i>
+
size; what this indicates is that whatever substring needs to be found
+
on the stream will not exceed this length. The stream is then read in
+
swatches of <i>maxMatchLen</i>, with the internal buffer set to twice
+
this size, so that each successive read shifts the buffer to the
+
"left" by one length. This guarantees that all such substrings will
+
eventually be matched.
+
</p>
+
 
+
<p>
+
Sometimes a sort of "look-ahead" paradigm is necessary. For instance,
+
one may need to match a segment or segments whose position is defined
+
from the end of the output, but you do not know in advance the actual
+
stream length. In this case, one can opt to read until the end of the
+
stream (<i>all</i>="true"), retaining only the last N buffer-lengths
+
or delimited segments, as indicated by the <i>save</i> field. When the
+
parser reaches the end of the stream, it will then apply the various
+
targets to each saved segment in order.
+
</p>
+
 
+
<p>
+
<i>applyToAll</i> is discussed further under
+
<code>target</code>
+
. The
+
<code>exit-on</code>
+
element indicates that the tokenizer should quit immediately when it
+
encounters this pattern;
+
<code>exit-after</code>
+
indicates that the tokenizer should quit when it encounters this
+
pattern, but should first apply the current segment to its targets.
+
</p>
+
 
+
<h5 align="CENTER">
+
<a name="TargetType">TARGET</a>
+
</h5>
+
 
+
<img alt="TargetType" src="images/091target.jpeg" />
+
 
+
<p>
+
A tokenizer may be given any number of
+
<code>target</code>
+
elements. The target denotes a particular value (object) currently in,
+
or to be written to, the environment, which will be side-effected on
+
the basis of the result of the tokenization. A target in turn contains
+
<code>match</code>
+
elements and
+
<code>test</code>
+
elements; the former are run as part of the stream processing; the
+
latter are run after the stream processing has been completed.
+
</p>
+
 
+
<p>
+
The target object is either to be constructed at match time, or it
+
pre-exists in the environment. If constructed, the <i>type</i> field
+
is used to indicate whether the object is a
+
<code>property</code>
+
or an
+
<code>attribute</code>
+
type; otherwise, <i>ref</i> points to the name of the
+
<code>property</code>
+
or
+
<code>attribute</code>
+
in the environment (recall that for the runtime job identifier, <i>@jobId</i>
+
is used).
+
</p>
+
<p>
+
<b>Note</b>: when new targets are constructed, there is a merge
+
operation at the end of tokenization which attempts to combine objects
+
into a single instance identified by their <i>name</i> attribute. This
+
assumes that such names will be unique and that any other values to be
+
set on the object which are not explicitly bound in some way to that
+
name via the match pattern will appear on the stream before a new name
+
does (see ex. 5 in <a href="#TokenizerExamples">tokenizer examples</a>).
+
</p>
+
 
+
<p>The default behavior of the tokenizer read-match sequence is as
+
follows:</p>
+
 
+
<ol>
+
<li>read from the stream either a set number of chars or until
+
the delimiter is found;</li>
+
<li>for each target:
+
<ul>
+
<li>for each match:
+
<ul>
+
<li>if the match is positive, process each of the actions,
+
and go to (1).</li>
+
</ul>
+
</ul></li>
+
</ol>
+
 
+
<p>
+
Only one qualifying target is processed for any given segment read,
+
and for the given target, the first pattern matched is the one
+
processed for its actions. This is basically the "OR" semantics of
+
normal logic programming; hence <i>the implementer must be careful
+
to arrange the matches inside a target in such a way that the more
+
specific match patterns precede the more general</i>.
+
</p>
+
<p>Three boolean fields allow you to modify this behavior.</p>
+
 
+
<ol>
+
<li>The <i>applyToAll</i> field on the <code>tokenizer-type</code>
+
element means take the unmatched part of the read stream and pass it
+
to the next target, even if there was a previous match; this allows
+
you to capture more than one regex pattern per stream segment (see
+
ex. 6 in <a href="#TokenizerExamples">tokenizer examples</a>).</li>
+
<li>The <i>matchAll</i> field on the <code>target-type</code>
+
element means do not try to match an already matched expression until
+
all the others are matched (i.e., a logical AND instead of OR governs
+
the set of matches at successive calls to the target match
+
operation); this allows one to use, for instance, .* repeatedly but
+
set different fields of the object with the resulting match (see ex.
+
5 in <a href="#TokenizerExamples">tokenizer examples</a>).</li>
+
<li>The <i>moveToTop</i> field on the <code>match-type</code>
+
element indicates to the tokenizer that the matched target be
+
promoted to first position in the list of targets. This is useful
+
when there is an ordering which expects types of attributes or
+
properties to be grouped in sequence on the stream (see ex. 4 in <a
+
href="#TokenizerExamples">tokenizer examples</a>).</li>
+
</ol>
+
 
+
<p>When a match is found, the set of action types it contains are
+
all applied.</p>
+
 
+
<h5 align="CENTER">
+
<a name="MatchType">MATCH</a>
+
</h5>
+
 
+
<img alt="MatchType" src="images/10match.jpeg" />
+
 
+
<p>Each of these types corresponds to an action to be taken on the
+
indicated field of the target object.</p>
+
 
+
<table align="center" rules="all">
+
<tr>
+
<td><code>set</code></td>
+
<td>sets the value of that field</td>
+
</tr>
+
<tr>
+
<td><code>append</code></td>
+
<td>adds to a string buffer, whose string value will be set on
+
the field</td>
+
</tr>
+
<tr>
+
<td><code>add</code></td>
+
<td>adds to a trst to which the value of that field will be set</td>
+
</tr>
+
<tr>
+
<td><code>put</code></td>
+
<td>places a key-value pair in a map to which the value of that
+
field will be set</td>
+
</tr>
+
<tr>
+
<td><code>throw</code></td>
+
<td>throws an exception and (optionally) also sets the value of
+
the field</td>
+
</tr>
+
</table>
+
 
+
<p>
+
The actions listed here all have
+
<code>entry-type</code>
+
children, either single (
+
<code>set, throw</code>
+
) or potentially multiple.
+
</p>
+
 
+
<h5 align="CENTER">
+
<a name="EntryType">ENTRY</a>
+
</h5>
+
 
+
<img alt="EntryType" src="images/11entry.jpeg" />
+
 
+
<p>
+
This value-abstraction allows one to set <i>key</i> (for maps) and <i>value</i>
+
as literals or references to other properties or attributes to be
+
resolved in the current environment; to reference the matched segment
+
parts one sets <i>keyIndex</i> and <i>valueIndex</i> if the regex was
+
used to split the segment; otherwise, <i>keyGroup</i> and <i>valueGroup</i>
+
refer to the capture group of the regex pattern, with group 0
+
referring to the entire match.
+
</p>
+
 
+
<h5 align="CENTER">
+
<a name="TestType">TEST</a>
+
</h5>
+
 
+
<img alt="TestType" src="images/12test.jpeg" />
+
 
+
<p>
+
As mentioned <a href="#TargetType">above</a>, the
+
<code>test-type</code>
+
elements are all run after the tokenization has reached the end of the
+
stream. This class of actions is useful for setting values based on
+
other values produced during tokenization. A test is one or more
+
comparison operations plus a set of actions to apply to the target
+
fields in the case of either success or failure (the "else" element);
+
see ex. 3 or the "get-job-status" example in <a
+
href="#TokenizerExamples">tokenizer examples</a>.
+
</p>
+
 
+
<p>
+
The <i>op</i> attribute can be one of the following comparisons:
+
</p>
+
 
+
<table align="center">
+
<tr>
+
<td>EQ</td>
+
<td>:</td>
+
<td>equals</td>
+
</tr>
+
<tr>
+
<td>LT</td>
+
<td>:</td>
+
<td>less than</td>
+
</tr>
+
<tr>
+
<td>LE</td>
+
<td>:</td>
+
<td>less than or equal to</td>
+
</tr>
+
<tr>
+
<td>GT</td>
+
<td>:</td>
+
<td>greater than</td>
+
</tr>
+
<tr>
+
<td>GE</td>
+
<td>:</td>
+
<td>greater than or equal to</td>
+
</tr>
+
</table>
+
 
+
<p>
+
When the operation is set to one of these, it is expected that the two
+
<code>value</code>
+
elements will be used. As usual, these elements can be literals or can
+
contain variables to be resolved into a string type;
+
<code>#FIELD</code>
+
refers to the value of the given field on the current target; the
+
strings will be converted in conformity with the inferred (primitive)
+
type of the comparison. The
+
<code>else</code>
+
element also pertains to comparison tests; the actions listed there
+
will be taken upon failure of the comparison.
+
</p>
+
 
+
<p>
+
The <i>op</i> attribute can also be a logical operator [AND, OR, NOT],
+
in which case the embedded
+
<code>test</code>
+
object should be used; these can be nested to an arbitrary depth, but
+
of course must bottom out in a comparison operation.
+
</p>
+
 
+
<h4 align="center">
+
<a name="TokenizerExamples"></a><b>Contents of Tokenizer Examples
+
(</b><a href="tokenizer-examples.xml">tokenizer-examples.xml</a>)
+
</h4>
+
<br>
+
 
+
<table align="center" rules="all">
+
<tr>
+
<th>Example</th>
+
<th>Description</th>
+
</tr>
+
<tr>
+
<td>1</td>
+
<td>output is a list of line-separated queue names to be
+
assigned to the known property "available-queues"</td>
+
</tr>
+
<tr>
+
<td>2</td>
+
<td>output is to be searched for its final line which should
+
contain a job id of the form "[digits].[chars]"</td>
+
</tr>
+
<tr>
+
<td>3</td>
+
<td>indeterminate number and order of lines containing parts of
+
attribute definitions, but each line bearing a distinct id (e.g.,
+
openMPI attribute discovery)</td>
+
</tr>
+
<tr>
+
<td>4</td>
+
<td>indeterminate number of definitions, but grouped by caption;
+
use of <i>moveToTop</i> to promote the target to the top of the list
+
when the caption appears</td>
+
</tr>
+
<tr>
+
<td>5</td>
+
<td>similar to 4, but without delimiter (implicit ordering)</td>
+
</tr>
+
<tr>
+
<td>6</td>
+
<td>similar to 4, but with indeterminate type order and using
+
buffer + DOTALL | UNIX_LINES</td>
+
</tr>
+
<tr>
+
<td>7</td>
+
<td>indeterminate number of property definitions, but on single
+
line</td>
+
</tr>
+
<tr>
+
<td>8</td>
+
<td>looking for values interspersed in the stream but which will
+
not exceed 32 chars</td>
+
</tr>
+
<tr>
+
<td>9</td>
+
<td>successive names/values, in order, but staggered</td>
+
</tr>
+
<tr>
+
<td>10</td>
+
<td>forced merge</td>
+
</tr>
+
<tr>
+
<td>11</td>
+
<td>exit-on</td>
+
</tr>
+
<tr>
+
<td>12</td>
+
<td>exit-after</td>
+
</tr>
+
<tr>
+
<td>13</td>
+
<td>get-job-status (use of tests)</td>
+
</tr>
+
</table>
+
<br>
+
 
+
<h4>
+
<a name="LaunchTab">4. The Launch Tab</a>
+
</h4>
+
 
+
<p>
+
The UI component which needs to be configured in conjunction with the
+
resource manager control is the <b>Launch Tab</b>, which is actually
+
the main area of the <b>Resources Tab</b>, one of the six tabs
+
comprising the <b>Run Configuration</b> wizard or the seven tabs
+
comprising the <b>Debug Configuration</b> wizard. The purpose of this
+
component is to allow the user to set up the job by providing values
+
relating to resource requirements or to the properties of the job in
+
general. In other words, it is in this component that the user can set
+
the values on the
+
<code>attribute</code>
+
elements making up the configurable environment as defined in the XML.
+
</p>
+
 
+
<p>
+
Specifying the composition and layout of this component can be tricky
+
and tedious because it deals with widgets defined by the Eclipse
+
<code>JFace</code>
+
library and with their underlying implementation in
+
<code>SWT</code>
+
. We intend in the near future to provide some standard "templates"
+
for typical widget groups that can be cut and pasted into the XML
+
definition. Some of this can already be achieved by importing into the
+
workspace a provided definition (such as for the PBS resource manager)
+
and modifying it or borrowing from it. This is, in fact, the approach
+
demostrated in the <a href="JAXBDemo.pdf">tutorial</a>.
+
</p>
+
 
+
<img alt="LaunchTabType" src="images/13launch-tab.jpeg" />
+
 
+
<p>
+
As seen from this top-level specification, the Launch Tab can have any
+
number of
+
<code>dynamic</code>
+
tab-controllers, "dynamic" meaning configurable from the XML. There is
+
also a fixed
+
<code>import</code>
+
controller type; the text of this element is the label/title that will
+
appear on the tab. This component allows you to browse the workspace
+
to set a custom script as the one to run. Its main text area widget is
+
read-only; any editing of the script must be done through the
+
workspace editor. The browse is local only, so remote scripts should
+
first be imported into a local project in the workspace (using the
+
remote systems import wizard), and then captured by this controller's
+
browse button.
+
</p>
+
 
+
<h4 align="CENTER">
+
<a name="TabController">Tab Controller</a>
+
</h4>
+
 
+
<p>
+
The
+
<code>dynamic</code>
+
controllers belong to the
+
<code>tab-controller-type</code>
+
. It contains an arbitrary number of
+
<code>tab-folder</code>
+
or
+
<code>composite</code>
+
elements; as will be seen shortly, these both have potentially
+
recursive elements, so that one can nest "containers" in the usual
+
manner.
+
</p>
+
 
+
<img alt="TabController" src="images/14tab-controller.jpeg" />
+
 
+
<p>
+
The <i>includeWidgetValuesFrom</i> field is important. By default, it
+
is set to empty, meaning that the subset of the total resource manager
+
environment represented by the controller's widgets is all that will
+
be passed to the actual job configuration when the job is launched.
+
This behavior can be changed by giving a comma-delimited list of the
+
<code>title</code>
+
values for other controllers. In this case, the configuration for the
+
job, when the "Run" button is pressed with this controller being the
+
visible one, will also include the values of the widgets on the listed
+
controllers. <b>NOTE:</b> while this field controls the inclusion or
+
exclusion of attribute and property names in the configuration, their
+
values are always shared across the controllers (there is only one
+
environment); thus if a variable value is changed on one controller,
+
and this variable is also exposed on another, the value for that
+
variable will also change on the other controller when it becomes
+
visible; similarly, if the user switches off a controller to another
+
having only a subset of the first controller's variables, the
+
variables not represented on the second controller will become
+
undefined or return to their defaults.
+
</p>
+
 
+
<p>
+
<b> Throughout the following, it may generally be assumed that
+
fields such as <i>style</i>, <i>foreground</i>, <i>background</i>,
+
etc., take string equivalents of the corresponding <code>SWT</code>
+
constants (e.g., "SWT.LEFT", "SWT.VERTICAL", "SWT.NONE") which can be
+
OR'd (using "|") wherever they would be in Java code. We will <i>not</i>
+
exhaustively specify here which constants pertain to which widgets,
+
because in most cases we have tried to reflect very closely the names
+
of the <code>SWT</code> object types and fields, and this information
+
can be found by consulting the Javadocs relative to the widgets in
+
question. </b>
+
</p>
+
 
+
<h4 align="CENTER">
+
<a name="TabFolders">Tab Folders and Tab Items</a>
+
</h4>
+
 
+
<img alt="TabFolder" src="images/15tab-folder.jpeg" />
+
 
+
<p>
+
The
+
<code>tab-folder</code>
+
is a container which looks like a file-folder, with tabs running
+
across the top or bottom ("SWT.TOP, SWT.BOTTOM"). Each tab label
+
corresponds to a
+
<code>tab-item</code>
+
which provides the actual visible content. The
+
<code>tooltip</code>
+
pertains to the entire folder.
+
</p>
+
 
+
<p>
+
The
+
<code>tab-item</code>
+
is an all-purpose "container" in which all widget types can be
+
embedded. It is distinguished from the
+
<code>composite group</code>
+
in that it can only be the child of a
+
<code>tab-folder</code>
+
, that it can have a tooltip (which appears on the tab).
+
</p>
+
 
+
<p>
+
As with
+
<code>composite</code>
+
(see <a href="#Composite">below</a>), the tab folder and tab item take
+
<code>layout</code>
+
and
+
<code>layout-data</code>
+
elements; these closely reflect their
+
<code>SWT</code>
+
objects and types; for further explanation we refer the reader once
+
again to the relevant Javadocs.
+
</p>
+
 
+
<h4 align="CENTER">
+
<a name="Layout">Layout</a>
+
</h4>
+
<img alt="Layout" src="images/17layout.jpeg" />
+
<h4 align="CENTER">
+
<a name="LayoutData">Layout Data</a>
+
</h4>
+
<img alt="LayoutData" src="images/18layout-data.jpeg" />
+
 
+
<h4 align="CENTER">
+
<a name="Composite">Composite/Group</a>
+
</h4>
+
 
+
<p>
+
The main container, of course, is the
+
<code>composite</code>
+
; its sub-type, the group (<i>group</i>="true"), allows for decoration
+
and a title, while the simple composite acts as a widget holder and
+
has no visible characteristics, though it does have a layout. As is
+
evident, composites can be contained in composites and tab-items, and
+
tab-folders can be contained in composites.
+
</p>
+
 
+
<img alt="Composite" src="images/16composite.jpeg" />
+
<br>
+
 
+
<p>
+
We now come to the three non-container widget elements with functional
+
characteristics. The first of these is the
+
<code>widget</code>
+
, which comprises a number of simple widget types.
+
<p>
+
<h4 align="CENTER">
+
<a name="Widget">Widget</a>
+
</h4>
+
 
+
<img alt="Widget" src="images/19widget.jpeg" />
+
 
+
<p>
+
The <i>type</i> of the widget can be one of the following:
+
</p>
+
<br>
+
<table align="center" rules="all">
+
<tr>
+
<td><code>label</code></td>
+
<td>fixed text for display</td>
+
</tr>
+
<tr>
+
<td><code>text</code></td>
+
<td>area for entering/editing text</td>
+
</tr>
+
<tr>
+
<td><code>checkbox</code></td>
+
<td>corresponds to a boolean choice</td>
+
</tr>
+
<tr>
+
<td><code>radiobutton</code></td>
+
<td>usually used in connection with <code>button-group</code></td>
+
</tr>
+
<tr>
+
<td><code>spinner</code></td>
+
<td>provides a continuous range of integer values</td>
+
</tr>
+
<tr>
+
<td><code>combo</code></td>
+
<td>select from a list of items</td>
+
</tr>
+
<tr>
+
<td><code>browse</code></td>
+
<td>a text widget followed by a push button allowing the user to
+
browse for directory or file.</td>
+
</tr>
+
<tr>
+
<td><code>action</code></td>
+
<td>a push button associated with a <code>button-action</code>
+
command</td>
+
</tr>
+
</table>
+
<br>
+
<p>
+
Not all attributes and elements of the
+
<code>widget</code>
+
descriptor are applicable to all types.
+
</p>
+
<br>
+
<table align="center" rules="all">
+
<tr>
+
<td><i>title</i>
+
</td>
+
<td>used with <code>checkbox</code> and <code>push button</code>
+
widgets (<code>browse, action</code>) for the button label</td>
+
</tr>
+
<tr>
+
<td><i>style</i>
+
</td>
+
<td>carries the <code>SWT</code> style constants appropriate to
+
the widget type</td>
+
</tr>
+
<tr>
+
<td><i>directory</i>
+
</td>
+
<td>limit the <code>browse</code> widget to directories</td>
+
</tr>
+
<tr>
+
<td><i>uri</i>
+
</td>
+
<td>have the <code>browse</code> widget set a URI as the text
+
(default is false, in which case the text is an absolute path)</td>
+
</tr>
+
<tr>
+
<td><i>localOnly</i>
+
</td>
+
<td>limit the <code>browse</code> widget to the local file
+
system (otherwise, the choice of local or remote is enabled)</td>
+
</tr>
+
<tr>
+
<td><i>readOnly</i>
+
</td>
+
<td>applies to <code>text</code> and <code>combo</code> widgets;
+
the text area in this case is not editable</td>
+
</tr>
+
<tr>
+
<td><i>saveValueTo</i>
+
</td>
+
<td>applies to all widgets except <code>label</code> and <code>action</code>;
+
the name of the property or attribute whose value should be set on
+
the basis of the widget's "selected" value or text<br> <b>Note:</b>
+
use of this attribute is mutually exclusive with the <code>fixed-</code>
+
and <code>dynamic-text</code> elements.</td>
+
</tr>
+
<tr>
+
<td><i>translateBooleanAs</i>
+
</td>
+
<td>applies to the <code>checkbox</code> widget; a
+
comma-delimited pair indicating a string equivalent for the boolean
+
to be used as the actual value for the property or attribute set by
+
the widget<br> <i>Example</i>: "YES,NO" would mean true yields
+
the first string and false the second</td>
+
</tr>
+
<tr>
+
<td><code>sub-layout-data</code>
+
</td>
+
<td>applies to the <code>browse</code> widget; applies to the
+
button component, whereas <code>layout-data</code> applies to the
+
text area</td>
+
</tr>
+
<tr>
+
<td><code>items-from</code>
+
</td>
+
<td>applies to the <code>combo</code> widget; indicates a
+
property or attribute <i>value</i> (of type <code>java.util.Collection</code>)
+
to use to populate the items<br> <b>Note:</b> if a combo widget
+
saves its value to an attribute and the present element on the
+
widget descriptor is not set, the attribute will be checked for
+
non-empty <code>choice</code> and <code>items-from</code> values,
+
which then will be used to populate the combo items; the <code>items-from</code>
+
field on the widget is for added flexibility (for instance, linking
+
up a target property with another property providing the list of
+
choices)</td>
+
</tr>
+
<tr>
+
<td><code>fixed-text</code>
+
</td>
+
<td>applies to the <code>label</code> and (read-only)<code>text</code>
+
widgets; text is resolved once and remains constant thereafter</td>
+
</tr>
+
<tr>
+
<td><code>dynamic-text</code>
+
</td>
+
<td>applies only to (read-only)<code>text</code> widgets; text
+
is resolved each time there is an update of a value from the Launch
+
Tab</td>
+
</tr>
+
<tr>
+
<td><code>button-action</code>
+
</td>
+
<td>applies to the <code>action</code> widget; the <code>button-action-type</code>
+
specifies the name of a command (<code>action</code>) defined in the
+
XML; this can be one of the <code>start-up</code>, <code>shut-down</code>,
+
commands, or a special <code>button-action</code> command (<b>note
+
</b>that it cannot, however, be a <code>-job</code> command, as the
+
Launch Tab is not coupled to any submitted jobs); the <code>button-action-type</code>
+
also indicates whether the variable affected by the command should
+
be cleared prior to the command execution, and whether the launch
+
tab should be refreshed (default is true) afterwards</td>
+
</tr>
+
</table>
+
<br>
+
 
+
<p>Widget foreground, background (color) and font are in principle
+
configurable, though the font setting may not always work. The tooltip
+
will appear on the widget whereever it usually does.</p>
+
 
+
<h4 align="CENTER">
+
<a name="ButtonGroup">Button Group</a>
+
</h4>
+
 
+
<img alt="ButtonGroup" src="images/20button-group.jpeg" />
+
 
+
<p>
+
The button group provides an explicit selection of a single value
+
based on a mutually exclusive set of button labels. Just as with the
+
<code>widget</code>
+
, one uses <i>saveValueTo</i> to indicate what property or attribute
+
value to set. The
+
<code>button</code>
+
elements, which can be arranged horizontally or vertically using the <i>style</i>
+
attribute ("SWT.HORIZONTAL","SWT.VERTICAL"), will be
+
<code>widget</code>
+
elements whose type is either <i>checkbox</i> or <i>radiobutton</i>
+
(if a different widget type is given, an error will occur); the <i>saveValueTo</i>
+
attribute on the individual button will be ignored. Radio buttons are
+
"sticky" in the sense that once they are selected, they cannot be
+
"unchecked" until a different button in the group is selected. It is
+
thus advisable always to provide a default value for the property or
+
attribute associated with the group value if radio buttons are used.
+
If check boxes are used, they can be individually checked on and off
+
(one at a time), thus allowing for the value of the group to be
+
potentially empty.
+
</p>
+
 
+
<p>Below is an example of a button group using radio buttons,
+
disposed vertically.</p>
+
<br>
+
<img alt="ButtonGroupExample" src="images/ButtonGroup.jpeg" />
+
<br>
+
 
+
<h4 align="CENTER">
+
<a name="AttributeViewer">Attribute Viewer</a>
+
</h4>
+
 
+
<img alt="AttributeViewer" src="images/21attribute-viewer.jpeg" />
+
 
+
<p>
+
The last of the widget types, the
+
<code>attribute-viewer</code>
+
, displays visible properties and attributes in a table or tree
+
viewer, with the value columns as editable widgets. The type of cell
+
editor is determined implicitly here by the type of the property or
+
attribute; the presence of a combo editor is determined by an
+
attribute whose
+
<code>choice</code>
+
or
+
<code>items-from</code>
+
element is defined. (This is the only viable possibility for a combo
+
in the table, as there would also need to be a target to save the
+
selected item to, viz., the value of this same attribute).
+
</p>
+
 
+
<p>Each entry in the viewer is provided with a checkbox to indicate
+
which attributes have been chosen. A checkbox is also placed above the
+
viewer to allow for filtering the unchecked items. The viewer outputs
+
its checked values to the environment (and on update removes
+
unselected ones). The name of the viewer is also stored against a
+
string of all selected values, constructed from a template ( further
+
discussion at the end of this section).</p>
+
 
+
<p>
+
The viewer <i>type</i> can be either "table" or "tree"; in the case of
+
the tree, the type, default, status and description fields of the
+
attribute or property are displayed as collapsible child rows hanging
+
off the main name entry. Either table or tree can have up to seven
+
columns assigned to the various fields of the attribute. These are
+
defined by the
+
<code>column-data</code>
+
elements. Tooltips for the column appear when hovering over the column
+
header. (<i>A caveat on the foreground and background settings for
+
this type: they are exposed here but may not work as expected: these
+
are currently applied to the column through the cell label provider;
+
foreground does not change the font color but applies the color to
+
the entire cell.</i>)
+
</p>
+
 
+
<p>
+
<i>sort</i> is done on the name field/column. This is a toggle sort,
+
such that alternate clicks reverse the sort direction. <i>headerVisible</i>
+
and <i>linesVisible</i> control the look of the table. <i>tooltipEnabled</i>
+
enables column-viewer label provider tooltip support. The tooltip
+
defined for an attribute will appear on the row of the table or the
+
parent node of the tree. The attribute description will also appear as
+
a tooltip on the description columns if they exist.
+
</p>
+
 
+
<p>
+
Control over the actual contents of the viewer is achieved through the
+
<code>viewer-items-type</code>
+
; one can here explicitly list properties or attributes for inclusion
+
using the
+
<code>include</code>
+
element, or one can set one or both of the <i>all</i> attributes; in
+
the latter case, attributes and properties can be excluded from the
+
set using
+
<code>exclude</code>
+
.
+
</p>
+
 
+
<p>
+
A property bearing the name given to this widget is written to the
+
environment at each update/refresh; the value of the property is a
+
string formed from the selected (checked) rows of the table using the
+
<code>template-type</code>
+
(the
+
<code>value</code>
+
element). The <i>pattern</i> can be any literal string embedding <i>@name</i>
+
and <i>@value</i> tags as placeholders for the row's name and value;
+
for instance, '@name="@value"' would generate a string of name-value
+
assignments. The default <i>separator</i> between patterned segments
+
is a single space.
+
</p>
+
 
+
<p>Below is an example of the tree version of the attribute viewer.
+
The text area above it displays the current value of its templated
+
pattern string. The child rows reporting status, default, etc., cannot
+
be selected or unselected (only the parent row can). Hovering over the
+
name (here walltime) displays the tooltip.</p>
+
<br>
+
<img alt="AttributeViewerTree" src="images/AttribViewerTree.jpeg" />
+
<br>
+
 
+
<h3>
+
<a name="MonitorType">The Monitor Data Type</a>
+
</h3>
+
 
+
<p>At present, the monitor component has less elements to define;
+
this may change in future releases, when certain hard-coded features
+
of the driver may be handed over to the client for configuration.</p>
+
 
+
<img alt="MonitorType" src="images/22monitor.jpeg" />
+
 
+
<p>
+
This component can be furnished with its own set of properties
+
(currently unused). What is necessary to set at present is only the <i>schedulerType</i>
+
attribute (e.g., "PBS"). <i>refreshFrequencyInSeconds</i> defaults to
+
60, but this can be changed according to the needs of the user. Be
+
aware that too low a setting will probably not work, as the command on
+
an average sized system will take upwards of five seconds to complete
+
(XML is being streamed to the driver and a
+
<code>diff</code>
+
is sent back to the client ).
+
</p>
+
 
+
<p>
+
If the
+
<code>driver</code>
+
element is configured, then the default behavior, which is to stage
+
over the necessary driver scripts to the <i>.eclipsesettings</i>
+
directory in the user's home, is overridden by connecting to a
+
pre-existent installation. This can be specified either using the
+
<code>url</code>
+
, or a combination of the
+
<code>name</code>
+
,
+
<code>path</code>
+
and
+
<code>args</code>
+
elements.
+
</p>
+
<hr>
+
<a href="toc.html">Back to Table of Contents</a>
+
</body>
+
</html>
+

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