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.
Difference between revisions of "PTP/designs/resource manager xsd"
Line 2: | Line 2: | ||
'''Note that I have not attempted to figure out yet what the monitoring part will look like or what the control and monitoring sections may need to interact; it may also be the case that some things inside the control node should come up a level.''' | '''Note that I have not attempted to figure out yet what the monitoring part will look like or what the control and monitoring sections may need to interact; it may also be the case that some things inside the control node should come up a level.''' | ||
+ | |||
+ | '''''Revised version (17/01/2011):''''' | ||
Line 45: | Line 47: | ||
<xs:element minOccurs="0" ref="on-start-up" /> | <xs:element minOccurs="0" ref="on-start-up" /> | ||
<xs:element minOccurs="0" ref="retrieve-dynamic-attributes" /> | <xs:element minOccurs="0" ref="retrieve-dynamic-attributes" /> | ||
− | <xs:element minOccurs=" | + | <xs:element name="run-commands"> |
− | + | <xs:complexType> | |
− | + | <xs:choice minOccurs="1" maxOccurs="3"> | |
+ | <xs:element ref="run-interactive" /> | ||
+ | <xs:element ref="run-batch" /> | ||
+ | <xs:element ref="run-debug" /> | ||
+ | </xs:choice> | ||
+ | </xs:complexType> | ||
+ | </xs:element> | ||
<xs:element ref="cancel-job" /> | <xs:element ref="cancel-job" /> | ||
<xs:element minOccurs="0" ref="suspend-job" /> | <xs:element minOccurs="0" ref="suspend-job" /> | ||
<xs:element minOccurs="0" ref="resume-job" /> | <xs:element minOccurs="0" ref="resume-job" /> | ||
<xs:element minOccurs="0" ref="on-shut-down" /> | <xs:element minOccurs="0" ref="on-shut-down" /> | ||
− | <xs:element ref="commands" /> | + | <xs:element minOccurs="0" ref="commands" /> |
− | <xs:element ref="parsers" /> | + | <xs:element minOccurs="0" ref="parsers" /> |
<xs:element minOccurs="0" ref="script" /> | <xs:element minOccurs="0" ref="script" /> | ||
<xs:element ref="attribute-definitions" /> | <xs:element ref="attribute-definitions" /> | ||
Line 68: | Line 76: | ||
</xs:annotation> | </xs:annotation> | ||
<xs:complexType> | <xs:complexType> | ||
− | <xs:attribute name="name" type="xs: | + | <xs:attribute name="name" type="xs:string" /> |
</xs:complexType> | </xs:complexType> | ||
</xs:element> | </xs:element> | ||
Line 79: | Line 87: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 92: | Line 100: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 104: | Line 112: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 117: | Line 125: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 129: | Line 137: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 141: | Line 149: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 153: | Line 161: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 165: | Line 173: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 177: | Line 185: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 184: | Line 192: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 198: | Line 206: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element ref="directive-definitions" /> | + | <xs:element minOccurs="0" ref="directive-definitions" /> |
− | <xs:element ref="environment-definitions" /> | + | <xs:element minOccurs="0" ref="environment-definitions" /> |
− | <xs:element ref="pre-execute-commands" /> | + | <xs:element minOccurs="0" ref="pre-execute-commands" /> |
<xs:element ref="execute-command" /> | <xs:element ref="execute-command" /> | ||
− | <xs:element ref="post-execute-commands" /> | + | <xs:element minOccurs="0" ref="post-execute-commands" /> |
</xs:sequence> | </xs:sequence> | ||
<xs:attribute name="shell" use="required" /> | <xs:attribute name="shell" use="required" /> | ||
Line 210: | Line 218: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="directive-definition" /> |
− | + | ||
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 229: | Line 236: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="environment-definition" /> |
− | + | ||
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 248: | Line 254: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 262: | Line 268: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element maxOccurs="unbounded" ref="command" /> |
</xs:sequence> | </xs:sequence> | ||
</xs:complexType> | </xs:complexType> | ||
Line 286: | Line 292: | ||
</xs:element> | </xs:element> | ||
<xs:element name="defaultValue" minOccurs="0" type="xs:string" /> | <xs:element name="defaultValue" minOccurs="0" type="xs:string" /> | ||
+ | <xs:element minOccurs="0" ref="validator"/> | ||
</xs:sequence> | </xs:sequence> | ||
− | <xs:attribute name="id" use="required" type="xs: | + | <xs:attribute name="id" use="required" type="xs:string" /> |
− | <xs:attribute name="name" use="required" type="xs: | + | <xs:attribute name="name" use="required" type="xs:string" /> |
− | <xs:attribute name="type" use="required" type="xs: | + | <xs:attribute name="type" use="required" type="xs:string" /> |
+ | <xs:attribute name="version" type="xs:string" /> | ||
+ | <xs:attribute name="mode" type="xs:string" /> | ||
<xs:attribute name="basic" type="xs:boolean"> | <xs:attribute name="basic" type="xs:boolean"> | ||
<xs:annotation> | <xs:annotation> | ||
Line 306: | Line 315: | ||
<xs:sequence> | <xs:sequence> | ||
<xs:element maxOccurs="unbounded" ref="arg" /> | <xs:element maxOccurs="unbounded" ref="arg" /> | ||
− | <xs:element maxOccurs="2" ref="stream-parser" /> | + | <xs:element minOccurs="0" maxOccurs="2" ref="stream-parser" /> |
</xs:sequence> | </xs:sequence> | ||
− | <xs:attribute name="name" type="xs: | + | <xs:attribute name="name" type="xs:string" /> |
</xs:complexType> | </xs:complexType> | ||
</xs:element> | </xs:element> | ||
Line 331: | Line 340: | ||
<xs:complexType> | <xs:complexType> | ||
<xs:sequence> | <xs:sequence> | ||
− | <xs:element | + | <xs:element name="parse-lines" type="xs:string"> |
+ | <xs:annotation> | ||
+ | <xs:documentation> | ||
+ | Which lines of output should be examined. Indicated | ||
+ | by single numerical value, comma-delimited list, or colon-delimited | ||
+ | range; by convention, N = total number of lines returned. | ||
+ | </xs:documentation> | ||
+ | </xs:annotation> | ||
+ | </xs:element> | ||
<xs:element maxOccurs="unbounded" ref="token" /> | <xs:element maxOccurs="unbounded" ref="token" /> | ||
<xs:element maxOccurs="unbounded" ref="put" /> | <xs:element maxOccurs="unbounded" ref="put" /> | ||
</xs:sequence> | </xs:sequence> | ||
− | <xs:attribute name="name" use="required" type="xs: | + | <xs:attribute name="name" use="required" type="xs:string" /> |
<xs:attribute name="stderr" type="xs:boolean" /> | <xs:attribute name="stderr" type="xs:boolean" /> | ||
</xs:complexType> | </xs:complexType> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</xs:element> | </xs:element> | ||
<xs:element name="put"> | <xs:element name="put"> | ||
Line 357: | Line 365: | ||
</xs:annotation> | </xs:annotation> | ||
<xs:complexType> | <xs:complexType> | ||
− | <xs:attribute name="name" use="required" type="xs: | + | <xs:attribute name="name" use="required" type="xs:string" /> |
<xs:attribute name="index" type="xs:integer" /> | <xs:attribute name="index" type="xs:integer" /> | ||
</xs:complexType> | </xs:complexType> | ||
Line 379: | Line 387: | ||
</xs:complexType> | </xs:complexType> | ||
</xs:element> | </xs:element> | ||
+ | <xs:element name="validator"> | ||
+ | <xs:annotation> | ||
+ | <xs:documentation> | ||
+ | A regular expression or an acl used to validate an attribute value. | ||
+ | </xs:documentation> | ||
+ | </xs:annotation> | ||
+ | <xs:complexType> | ||
+ | <xs:choice> | ||
+ | <xs:element name="regex" type="xs:string"/> | ||
+ | <xs:element name="acl" type="xs:string"/> | ||
+ | </xs:choice> | ||
+ | </xs:complexType> | ||
+ | </xs:element> | ||
<xs:element name="launch-tab"> | <xs:element name="launch-tab"> | ||
<xs:annotation> | <xs:annotation> | ||
Line 466: | Line 487: | ||
</xs:annotation> | </xs:annotation> | ||
</xs:element> | </xs:element> | ||
+ | <xs:element name="saveValueTo"> | ||
+ | <xs:annotation> | ||
+ | <xs:documentation> | ||
+ | The text of this element will be the name of a property | ||
+ | </xs:documentation> | ||
+ | </xs:annotation> | ||
+ | </xs:element> | ||
</xs:sequence> | </xs:sequence> | ||
<xs:attribute name="label" type="xs:string" /> | <xs:attribute name="label" type="xs:string" /> | ||
Line 482: | Line 510: | ||
<xs:enumeration value="checkbox" /> | <xs:enumeration value="checkbox" /> | ||
<xs:enumeration value="combo" /> | <xs:enumeration value="combo" /> | ||
− | + | <xs:enumeration value="browse-button" /> | |
</xs:restriction> | </xs:restriction> | ||
</xs:simpleType> | </xs:simpleType> |
Revision as of 17:55, 17 January 2011
The following is a draft of the proposed Resource Manager XML Schema (XSD). It has been annotated internally where I felt some explanation necessary.
Note that I have not attempted to figure out yet what the monitoring part will look like or what the control and monitoring sections may need to interact; it may also be the case that some things inside the control node should come up a level.
Revised version (17/01/2011):
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="resource-manager"> <xs:annotation> <xs:documentation> It is assumed that the xml instance of the schema will bear a name which sufficiently distinguishes it from others of a similar type; e.g., pbs-torque-v_2.3.7_abe is specific to an installation on the host abe, ll-v_4.0 suits all installations of LoadLeveler version 4, etc. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element ref="control" /> <xs:element ref="monitor" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="control"> <xs:annotation> <xs:documentation> The implementation will construct a map serving as the resource manager "environment"; these are dereferenced in the configuration file via ${name} or ${name.part}; in addition to the properties specified at the top level of the control tree, all attributes and parsers will be mapped for reference. The top level of the tree represents the available commands/methods on all resource managers, places for defining stdout or stderr parsers, for defining the structure of a batch script to be used, for defining (job) attributes, and finally for describing how to construct the UI (Launch Configuration Tab). </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="property" /> <xs:element minOccurs="0" ref="on-start-up" /> <xs:element minOccurs="0" ref="retrieve-dynamic-attributes" /> <xs:element name="run-commands"> <xs:complexType> <xs:choice minOccurs="1" maxOccurs="3"> <xs:element ref="run-interactive" /> <xs:element ref="run-batch" /> <xs:element ref="run-debug" /> </xs:choice> </xs:complexType> </xs:element> <xs:element ref="cancel-job" /> <xs:element minOccurs="0" ref="suspend-job" /> <xs:element minOccurs="0" ref="resume-job" /> <xs:element minOccurs="0" ref="on-shut-down" /> <xs:element minOccurs="0" ref="commands" /> <xs:element minOccurs="0" ref="parsers" /> <xs:element minOccurs="0" ref="script" /> <xs:element ref="attribute-definitions" /> <xs:element ref="launch-tab" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="property"> <xs:annotation> <xs:documentation> The value is any object type; these are set at runtime. </xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="on-start-up"> <xs:annotation> <xs:documentation> Arbitrary commands which need to be run on startup. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="retrieve-dynamic-attributes"> <xs:annotation> <xs:documentation> A command for retrieving (if possible) attributes defined by the service dynamically. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="run-interactive"> <xs:annotation> <xs:documentation> The command(s) for running interactive jobs. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="run-batch"> <xs:annotation> <xs:documentation> The command(s) for running jobs through the scheduler. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="run-debug"> <xs:annotation> <xs:documentation> The command(s) for running debug jobs. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="cancel-job"> <xs:annotation> <xs:documentation> The command(s) for cancelling or killing jobs. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="suspend-job"> <xs:annotation> <xs:documentation> The command(s) for suspending jobs. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="resume-job"> <xs:annotation> <xs:documentation> The command(s) for restarting suspended jobs. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="on-shut-down"> <xs:annotation> <xs:documentation> Arbitrary commands which need to be run on startup. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="commands"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="parsers"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="stream-parser" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="script"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" ref="directive-definitions" /> <xs:element minOccurs="0" ref="environment-definitions" /> <xs:element minOccurs="0" ref="pre-execute-commands" /> <xs:element ref="execute-command" /> <xs:element minOccurs="0" ref="post-execute-commands" /> </xs:sequence> <xs:attribute name="shell" use="required" /> </xs:complexType> </xs:element> <xs:element name="directive-definitions"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="directive-definition" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="directive-definition"> <xs:annotation> <xs:documentation> 'ValueFrom' refers to properties in the resource manager environment. </xs:documentation> </xs:annotation> <xs:complexType mixed="true"> <xs:attribute name="valueFrom" /> </xs:complexType> </xs:element> <xs:element name="environment-definitions"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="environment-definition" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="environment-definition"> <xs:annotation> <xs:documentation> 'ValueFrom' refers to properties in the resource manager environment. </xs:documentation> </xs:annotation> <xs:complexType mixed="true"> <xs:attribute name="valueFrom" /> </xs:complexType> </xs:element> <xs:element name="pre-execute-commands"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="execute-command"> <xs:complexType> <xs:sequence> <xs:element ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="post-execute-commands"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="command" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="attribute-definitions"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="job-attribute" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="job-attribute"> <xs:complexType> <xs:sequence> <xs:element name="description" type="xs:string" /> <xs:element name="tooltip" type="xs:string" /> <xs:element name="choice" minOccurs="0" type="xs:string"> <xs:annotation> <xs:documentation> A a comma-delimited set of values. </xs:documentation> </xs:annotation> </xs:element> <xs:element name="defaultValue" minOccurs="0" type="xs:string" /> <xs:element minOccurs="0" ref="validator"/> </xs:sequence> <xs:attribute name="id" use="required" type="xs:string" /> <xs:attribute name="name" use="required" type="xs:string" /> <xs:attribute name="type" use="required" type="xs:string" /> <xs:attribute name="version" type="xs:string" /> <xs:attribute name="mode" type="xs:string" /> <xs:attribute name="basic" type="xs:boolean"> <xs:annotation> <xs:documentation> Indicates if this attribute is part of a basic (required) set, or if it is an (advanced) option. </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="minValue" type="xs:int" /> <xs:attribute name="maxValue" type="xs:int" /> </xs:complexType> </xs:element> <xs:element name="command"> <xs:complexType mixed="true"> <xs:sequence> <xs:element maxOccurs="unbounded" ref="arg" /> <xs:element minOccurs="0" maxOccurs="2" ref="stream-parser" /> </xs:sequence> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="arg" type="xs:string"> <xs:annotation> <xs:documentation> The text of the argument will be parsed for references to the resource manager environment; e.g., ${a}, v=${v}, etc. </xs:documentation> </xs:annotation> </xs:element> <xs:element name="stream-parser"> <xs:annotation> <xs:documentation> These are attached to the stdout or stderr streams in order to capture the output of the command and add values into the resource manager environment. It is understood that a parser tokenization is a list of matching tokens. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="parse-lines" type="xs:string"> <xs:annotation> <xs:documentation> Which lines of output should be examined. Indicated by single numerical value, comma-delimited list, or colon-delimited range; by convention, N = total number of lines returned. </xs:documentation> </xs:annotation> </xs:element> <xs:element maxOccurs="unbounded" ref="token" /> <xs:element maxOccurs="unbounded" ref="put" /> </xs:sequence> <xs:attribute name="name" use="required" type="xs:string" /> <xs:attribute name="stderr" type="xs:boolean" /> </xs:complexType> </xs:element> <xs:element name="put"> <xs:annotation> <xs:documentation> Value assigned to the name is the token with the given index in the returned list; a put without index assigns the entire list to the name. </xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="name" use="required" type="xs:string" /> <xs:attribute name="index" type="xs:integer" /> </xs:complexType> </xs:element> <xs:element name="token"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" ref="token" /> </xs:sequence> <xs:attribute name="delim" use="required" /> <xs:attribute name="return" use="required" type="xs:string"> <xs:annotation> <xs:documentation> Indicates which segments generated by the tokenization should be returned; can be a single numerical value, comma-delimited list, or colon-delimited range; by convention, N = total number of segments created. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="validator"> <xs:annotation> <xs:documentation> A regular expression or an acl used to validate an attribute value. </xs:documentation> </xs:annotation> <xs:complexType> <xs:choice> <xs:element name="regex" type="xs:string"/> <xs:element name="acl" type="xs:string"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="launch-tab"> <xs:annotation> <xs:documentation> This is a recursive description of the main UI element associated with the control part, the Launch Tab. NOTE: I do not as yet know how many of the underlying widget options need to be exposed here for effective building in the createControl method. What follows is minimal. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="tab-controller" /> </xs:sequence> <xs:attribute name="advanced-mode-enabled" type="xs:boolean"> <xs:annotation> <xs:documentation> If this is set to true, a tab-controller which allows the user to browse the local file system and/or workspace to open and edit a custom batch script will be created; this will include copy and renaming buttons. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="tab-controller"> <xs:annotation> <xs:documentation> as in: org.eclipse.ptp.rm.ui.launch.ExtendableRMLaunchConfigurationDynamicTab; a top-level "switch" between views. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="group" /> <xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" /> </xs:sequence> <xs:attribute name="id" use="required" /> </xs:complexType> </xs:element> <xs:element name="tab-folder"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="tab-item" /> </xs:sequence> <xs:attribute name="title" use="required" /> </xs:complexType> </xs:element> <xs:element name="tab-item"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="group" /> <xs:element minOccurs="0" maxOccurs="unbounded" ref="tab-folder" /> </xs:sequence> <xs:attribute name="name" use="required" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="group"> <xs:annotation> <xs:documentation> We may want a few tweaks here, such as borders, etc. </xs:documentation> </xs:annotation> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="group" /> <xs:element ref="widget" /> </xs:choice> <xs:attribute name="columns" type="xs:integer" /> <xs:attribute name="title" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="widget"> <xs:complexType> <xs:sequence> <xs:element name="content"> <xs:annotation> <xs:documentation> The text of this element will be parsed for references to the resource manager environment; e.g., ${a}, version-${b}, etc. </xs:documentation> </xs:annotation> </xs:element> <xs:element name="saveValueTo"> <xs:annotation> <xs:documentation> The text of this element will be the name of a property </xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute name="label" type="xs:string" /> <xs:attribute name="type" default="text"> <xs:annotation> <xs:documentation> Need to complete this list? </xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="text" /> <xs:enumeration value="push-button" /> <xs:enumeration value="radio-button" /> <xs:enumeration value="spinner" /> <xs:enumeration value="checkbox" /> <xs:enumeration value="combo" /> <xs:enumeration value="browse-button" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="read-only" type="xs:boolean" /> </xs:complexType> </xs:element> <xs:element name="monitor"> <xs:annotation> <xs:documentation> I have for the moment left this undefined. </xs:documentation> </xs:annotation> </xs:element> </xs:schema>
The classes generated by the JAXB compiler from this schema:
AttributeDefinitions.java CancelJob.java Command.java Commands.java Control.java DirectiveDefinition.java DirectiveDefinitions.java EnvironmentDefinition.java EnvironmentDefinitions.java ExecuteCommand.java Group.java JobAttribute.java LaunchTab.java ObjectFactory.java OnShutDown.java OnStartUp.java Parsers.java PostExecuteCommands.java PreExecuteCommands.java Property.java Put.java ResourceManager.java ResumeJob.java RetrieveDynamicAttributes.java RunBatch.java RunDebug.java RunInteractive.java Script.java StreamParser.java SuspendJob.java TabController.java TabFolder.java TabItem.java Token.java Widget.java
I have not yet decided whether it will be simpler (or more efficient) to use JAXB runtime to build the actual instance objects from valid instances of the XML, or whether we just might want to parse it in using a DOM parser and then pull from it as necessary.