| <?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"> |
| <!-- ====================== Root Element ======================= --> |
| <xs:element name="fieldtypemodel"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-type-def"/> |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| <!-- ================= Children of fieldtypemodel =================== --> |
| <xs:element name="field-type-def"> |
| <xs:complexType> |
| <xs:attributeGroup ref="attlist.field-type-def"/> |
| </xs:complexType> |
| </xs:element> |
| <xs:attributeGroup name="attlist.field-type-def"> |
| <xs:attribute type="xs:string" name="type" use="required"/> |
| <xs:attribute type="xs:string" name="sql-type" use="required"/> |
| <xs:attribute type="xs:string" name="sql-type-alias"/> |
| <xs:attribute name="java-type" use="required"> |
| <xs:annotation><xs:documentation> |
| The java-type attribute must contain a Java data type |
| recognized by the JDBC driver (ResultSet getXxx methods |
| or PreparedStatement setXxx methods). |
| </xs:documentation></xs:annotation> |
| <!-- Developers Note: SQL type to Java type mapping taken from |
| https://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html --> |
| <xs:simpleType> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="byte[]"> |
| <xs:annotation><xs:documentation> |
| Use with BLOB, BINARY, VARBINARY, and LONGVARBINARY SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Boolean"> |
| <xs:annotation><xs:documentation> |
| Use with BIT and BOOLEAN SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Double"> |
| <xs:annotation><xs:documentation> |
| Use with DOUBLE and FLOAT SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Float"> |
| <xs:annotation><xs:documentation> |
| Use with REAL SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Integer"> |
| <xs:annotation><xs:documentation> |
| Use with INTEGER SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Long"> |
| <xs:annotation><xs:documentation> |
| Use with BIGINT SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Object"> |
| <xs:annotation><xs:documentation> |
| Use with BLOB and LONGVARBINARY SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="Short"> |
| <xs:annotation><xs:documentation> |
| Use with SMALLINT and TINYINT SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="String"> |
| <xs:annotation><xs:documentation> |
| Use with CLOB, CHAR, VARCHAR, |
| and LONGVARCHAR SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.math.BigDecimal"> |
| <xs:annotation><xs:documentation> |
| Use with DECIMAL and NUMERIC SQL types |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.sql.Blob"> |
| <xs:annotation><xs:documentation> |
| Use with BLOB SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.sql.Clob"> |
| <xs:annotation><xs:documentation> |
| Use with CLOB SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.sql.Date"> |
| <xs:annotation><xs:documentation> |
| Use with DATE SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.sql.Time"> |
| <xs:annotation><xs:documentation> |
| Use with TIME SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| <xs:enumeration value="java.sql.Timestamp"> |
| <xs:annotation><xs:documentation> |
| Use with TIMESTAMP SQL type |
| </xs:documentation></xs:annotation> |
| </xs:enumeration> |
| </xs:restriction> |
| </xs:simpleType> |
| </xs:attribute> |
| </xs:attributeGroup> |
| </xs:schema> |