blob: 92e86a8260bf58fd5c34f84cd0b56b948f170e6f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="data-files">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="data-file"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="data-file">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="record"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.data-file"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.data-file">
<xs:attribute name="name" use="required"/>
<xs:attribute name="type-code" use="required"/>
<xs:attribute name="sender"/>
<xs:attribute name="receiver"/>
<xs:attribute name="delimiter"/>
<xs:attribute name="text-delimiter"/>
<xs:attribute name="record-length"/>
<xs:attribute name="separator-style" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="fixed-length"/>
<xs:enumeration value="fixed-record"/>
<xs:enumeration value="delimited"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="description"/>
</xs:attributeGroup>
<xs:element name="record">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="field"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.record"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.record">
<xs:attribute name="name" use="required"/>
<xs:attribute name="type-code"/>
<xs:attribute name="tc-min"/>
<xs:attribute name="tc-max"/>
<xs:attribute name="tc-isnum" default="true">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="false"/>
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="tc-position"/>
<xs:attribute name="tc-length"/>
<xs:attribute name="description"/>
<xs:attribute name="parent-name"/>
<xs:attribute name="limit" default="many">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="one"/>
<xs:enumeration value="many"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="field">
<xs:complexType>
<xs:attributeGroup ref="attlist.field"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.field">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="position"/>
<xs:attribute name="length"/>
<xs:attribute name="type" use="required">
<xs:annotation><xs:documentation>The field type is always required. See more about the type attribure in Record.setString() method</xs:documentation></xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="CustomDate"/>
<xs:enumeration value="CustomTime"/>
<xs:enumeration value="FixedPointDouble"/>
<xs:enumeration value="java.lang.String"/>
<xs:enumeration value="String"/>
<xs:enumeration value="java.sql.Timestamp"/>
<xs:enumeration value="Timestamp"/>
<xs:enumeration value="java.sql.Time"/>
<xs:enumeration value="Time"/>
<xs:enumeration value="java.lang.Integer"/>
<xs:enumeration value="Integer"/>
<xs:enumeration value="java.lang.Long"/>
<xs:enumeration value="Long"/>
<xs:enumeration value="java.lang.Float"/>
<xs:enumeration value="Float"/>
<xs:enumeration value="java.lang.Double"/>
<xs:enumeration value="Double"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="format">
<xs:annotation><xs:documentation>You may use EncryptedString if you want to encrypt the string (password for instance). See more in Record.setString() method.</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="valid-exp"/>
<xs:attribute name="description"/>
<xs:attribute name="default-value"/>
<xs:attribute name="prim-key" default="false">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ignored" default="false">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="expression" default="false">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ref-field"/>
</xs:attributeGroup>
</xs:schema>