--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+
+<!-- $Header$ -->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:a="http://egee.cesnet.cz/en/Schema/LB/Attributes"
+ targetNamespace="http://egee.cesnet.cz/en/Schema/LB/Attributes"
+ version="1.0"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+ <xs:simpleType name="statusType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="SUBMITTED" />
+ <xs:enumeration value="WAITING" />
+ <xs:enumeration value="READY" />
+ <xs:enumeration value="SCHEDULED" />
+ <xs:enumeration value="RUNNING" />
+ <xs:enumeration value="DONE" />
+ <xs:enumeration value="CLEARED" />
+ <xs:enumeration value="ABORTED" />
+ <xs:enumeration value="CANCELLED" />
+ <xs:enumeration value="UNKNOWN" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="doneType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="OK"/>
+ <xs:enumeration value="FAIL"/>
+ <xs:enumeration value="CANCEL"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="historyStatusType">
+ <xs:sequence>
+ <xs:element name="status" type="a:statusType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="reason" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="jobTypeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="SIMPLE"/>
+ <xs:enumeration value="DAG"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="statusSequenceType">
+ <xs:sequence>
+ <xs:element name="status" type="a:historyStatusType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+
+
+
+ <xs:element name="user" type="xs:string" />
+
+ <!-- the following 6 elements have to be retrieved from JDL -->
+ <xs:element name="VO" type="xs:string" />
+ <xs:element name="aTag" type="xs:string" />
+ <xs:element name="rQType" type="xs:string" />
+ <xs:element name="eDuration" type="xs:duration" />
+ <xs:element name="eNodes" type="xs:int" />
+ <xs:element name="eProc" type="xs:int" />
+
+ <xs:element name="RB" type="xs:string" />
+ <xs:element name="CE" type="xs:string" />
+ <xs:element name="host" type="xs:string" /> <!-- worker node -->
+
+ <!-- Genevieve's spec has "site" and "country" here, but I've got no idea how to retrieve them -->
+ <xs:element name="UIHost" type="xs:string" />
+
+ <!-- not mandatory, currently LB hasn't got the info -->
+ <xs:element name="CPUTime" type="xs:duration" />
+ <xs:element name="NProc" type="xs:int" />
+
+ <!-- In LB the real final status is Cleared
+ However, Done, Aborted, or Cancelled should be reported here -->
+ <xs:element name="finalStatus" type="a:statusType" />
+ <xs:element name="finalStatusDate" type="xs:dateTime" />
+ <xs:element name="finalStatusReason" type="xs:string" />
+ <xs:element name="LRMSDoneStatus" type="a:doneType" />
+ <xs:element name="LRMSStatusReason" type="xs:string" />
+
+ <xs:element name="retryCount" type="xs:int" />
+ <xs:element name="additionalReason" type="xs:string" />
+
+ <xs:element name="jobType" type="a:jobTypeType" />
+ <xs:element name="nsubjobs" type="xs:int" />
+
+ <!-- timestamps of the state history of the last resubmission cycle,
+ i.e. it is guaranteed that each state apears here only once.
+ Cf. stateEnterTimes in LB JobStatus -->
+ <xs:element name="lastStatusHistory" type="a:statusSequenceType" />
+
+ <!-- timestamps of the whole state history, including all resubmission cycles -->
+ <xs:element name="fullStatusHistory" type="a:statusSequenceType" />
+
+<!-- No idea where to get these from:
+
+ ENVIRONMENT
+
+ testbed production, preproduction, specific
+ release middleware release (LCG, g-lite...)
+ version version of middleware
+ job_history_version in case of structure changes
+-->
+
+</xs:schema>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+
+<!-- $Header$ -->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jr="http://egee.cesnet.cz/en/Schema/LB/JobRecord"
+ xmlns:a="http://egee.cesnet.cz/en/Schema/LB/Attributes"
+ targetNamespace="http://egee.cesnet.cz/en/Schema/LB/JobRecord"
+ version="1.0"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+
+ <xs:complexType name="jobRecordType">
+ <xs:sequence>
+
+ <xs:element ref="a:user" minOccurs="1" maxOccurs="1"/>
+
+ <!-- the following 6 elements have to be retrieved from JDL -->
+ <xs:element ref="a:VO" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="a:aTag" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="a:rQType" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:eDuration" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:eNodes" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:eProc" minOccurs="1" maxOccurs="1"/>
+
+ <xs:element ref="a:RB" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:CE" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:host" minOccurs="0" maxOccurs="1"/> <!-- worker node -->
+
+ <!-- Genevieve's spec has "site" and "country" here, but I've got no idea how to retrieve them -->
+ <xs:element ref="a:UIHost" minOccurs="1" maxOccurs="1"/>
+
+ <!-- not mandatory, currently LB hasn't got the info -->
+ <xs:element ref="a:CPUTime" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="a:NProc" minOccurs="0" maxOccurs="1"/>
+
+ <!-- In LB the real final status is Cleared
+ However, Done, Aborted, or Cancelled should be reported here -->
+ <xs:element ref="a:finalStatus" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:finalStatusDate" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:finalStatusReason" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="a:LRMSDoneStatus" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:LRMSStatusReason" minOccurs="0" maxOccurs="1"/>
+
+ <xs:element ref="a:retryCount" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:additionalReason" minOccurs="0" maxOccurs="1"/>
+
+ <xs:element ref="a:jobType" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="a:nsubjobs" minOccurs="0" maxOccurs="1"/>
+
+ <!-- timestamps of the state history of the last resubmission cycle,
+ i.e. it is guaranteed that each state apears here only once.
+ Cf. stateEnterTimes in LB JobStatus -->
+
+ <xs:element ref="a:lastStatusHistory" minOccurs="1" maxOccurs="1"/>
+
+ <!-- timestamps of the whole state history, including all resubmission cycles -->
+ <xs:element ref="a:fullStatusHistory" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+
+ <!-- No idea where to get these from:
+
+ ENVIRONMENT
+
+ testbed production, preproduction, specific
+ release middleware release (LCG, g-lite...)
+ version version of middleware
+ job_history_version in case of structure changes
+ -->
+
+ <xs:attribute name="jobid" type="xs:string" use="required"/>
+ </xs:complexType>
+
+
+ <xs:element name="jobRecord" type="jr:jobRecordType"/>
+
+</xs:schema>