[#395] Use XML configuration file instead of plain properties file - Added jaxb artefacts

This commit is contained in:
Lukas Eder 2012-01-29 18:52:58 +00:00
parent c47e79b92f
commit 882f2ba7c8
13 changed files with 736 additions and 18 deletions

View File

@ -13,7 +13,6 @@
<!-- Run a full mvn clean package install deploy first before this -->
<target name="xjc-generator" description="Generate JAXB artefacts from XSD">
<delete dir="${dir.target}" failonerror="no" />
<mkdir dir="${dir.java}/org/jooq/util/jaxb" />
<xjc schema="${dir.resources}/jooq-codegen.xsd" destdir="${dir.java}" package="org.jooq.util.jaxb"/>
</target>

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//

View File

@ -2,12 +2,14 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
package org.jooq.util.jaxb;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -34,6 +36,39 @@ import javax.xml.bind.annotation.XmlType;
* &lt;element name="excludes" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="inputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="outputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="masterDataTables" minOccurs="0">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;element name="enumTypes" minOccurs="0">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;element name="forcedTypes" minOccurs="0">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>
@ -58,6 +93,9 @@ public class Database {
protected String inputSchema;
@XmlElement(defaultValue = "")
protected String outputSchema;
protected Database.MasterDataTables masterDataTables;
protected Database.EnumTypes enumTypes;
protected Database.ForcedTypes forcedTypes;
/**
* Gets the value of the name property.
@ -179,4 +217,253 @@ public class Database {
this.outputSchema = value;
}
/**
* Gets the value of the masterDataTables property.
*
* @return
* possible object is
* {@link Database.MasterDataTables }
*
*/
public Database.MasterDataTables getMasterDataTables() {
return masterDataTables;
}
/**
* Sets the value of the masterDataTables property.
*
* @param value
* allowed object is
* {@link Database.MasterDataTables }
*
*/
public void setMasterDataTables(Database.MasterDataTables value) {
this.masterDataTables = value;
}
/**
* Gets the value of the enumTypes property.
*
* @return
* possible object is
* {@link Database.EnumTypes }
*
*/
public Database.EnumTypes getEnumTypes() {
return enumTypes;
}
/**
* Sets the value of the enumTypes property.
*
* @param value
* allowed object is
* {@link Database.EnumTypes }
*
*/
public void setEnumTypes(Database.EnumTypes value) {
this.enumTypes = value;
}
/**
* Gets the value of the forcedTypes property.
*
* @return
* possible object is
* {@link Database.ForcedTypes }
*
*/
public Database.ForcedTypes getForcedTypes() {
return forcedTypes;
}
/**
* Sets the value of the forcedTypes property.
*
* @param value
* allowed object is
* {@link Database.ForcedTypes }
*
*/
public void setForcedTypes(Database.ForcedTypes value) {
this.forcedTypes = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"enumType"
})
public static class EnumTypes {
protected List<EnumType> enumType;
/**
* Gets the value of the enumType property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the enumType property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEnumType().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link EnumType }
*
*
*/
public List<EnumType> getEnumType() {
if (enumType == null) {
enumType = new ArrayList<EnumType>();
}
return this.enumType;
}
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"forcedType"
})
public static class ForcedTypes {
protected List<ForcedType> forcedType;
/**
* Gets the value of the forcedType property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the forcedType property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getForcedType().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ForcedType }
*
*
*/
public List<ForcedType> getForcedType() {
if (forcedType == null) {
forcedType = new ArrayList<ForcedType>();
}
return this.forcedType;
}
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"masterDataTable"
})
public static class MasterDataTables {
protected List<MasterDataTable> masterDataTable;
/**
* Gets the value of the masterDataTable property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the masterDataTable property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMasterDataTable().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link MasterDataTable }
*
*
*/
public List<MasterDataTable> getMasterDataTable() {
if (masterDataTable == null) {
masterDataTable = new ArrayList<MasterDataTable>();
}
return this.masterDataTable;
}
}
}

View File

@ -0,0 +1,100 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
package org.jooq.util.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Configuration for custom enum types
*
*
* <p>Java class for EnumType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="EnumType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="literals" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EnumType", propOrder = {
})
public class EnumType {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String literals;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the literals property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLiterals() {
return literals;
}
/**
* Sets the value of the literals property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLiterals(String value) {
this.literals = value;
}
}

View File

@ -0,0 +1,100 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
package org.jooq.util.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Configuration for forced types
*
*
* <p>Java class for ForcedType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ForcedType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="expressions" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ForcedType", propOrder = {
})
public class ForcedType {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String expressions;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the expressions property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getExpressions() {
return expressions;
}
/**
* Sets the value of the expressions property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setExpressions(String value) {
this.expressions = value;
}
}

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//

View File

@ -0,0 +1,126 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
package org.jooq.util.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Configuration for a master data table
*
*
* <p>Java class for MasterDataTable complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="MasterDataTable">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="literal" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MasterDataTable", propOrder = {
})
public class MasterDataTable {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String literal;
protected String description;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the literal property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLiteral() {
return literal;
}
/**
* Sets the value of the literal property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLiteral(String value) {
this.literal = value;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
}

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
@ -36,6 +36,38 @@ public class ObjectFactory {
public ObjectFactory() {
}
/**
* Create an instance of {@link Database.EnumTypes }
*
*/
public Database.EnumTypes createDatabaseEnumTypes() {
return new Database.EnumTypes();
}
/**
* Create an instance of {@link Target }
*
*/
public Target createTarget() {
return new Target();
}
/**
* Create an instance of {@link Database.ForcedTypes }
*
*/
public Database.ForcedTypes createDatabaseForcedTypes() {
return new Database.ForcedTypes();
}
/**
* Create an instance of {@link Generator }
*
*/
public Generator createGenerator() {
return new Generator();
}
/**
* Create an instance of {@link Database }
*
@ -53,27 +85,27 @@ public class ObjectFactory {
}
/**
* Create an instance of {@link Configuration }
* Create an instance of {@link ForcedType }
*
*/
public Configuration createConfiguration() {
return new Configuration();
public ForcedType createForcedType() {
return new ForcedType();
}
/**
* Create an instance of {@link Target }
* Create an instance of {@link MasterDataTable }
*
*/
public Target createTarget() {
return new Target();
public MasterDataTable createMasterDataTable() {
return new MasterDataTable();
}
/**
* Create an instance of {@link Generator }
* Create an instance of {@link EnumType }
*
*/
public Generator createGenerator() {
return new Generator();
public EnumType createEnumType() {
return new EnumType();
}
/**
@ -84,4 +116,20 @@ public class ObjectFactory {
return new Generate();
}
/**
* Create an instance of {@link Configuration }
*
*/
public Configuration createConfiguration() {
return new Configuration();
}
/**
* Create an instance of {@link Database.MasterDataTables }
*
*/
public Database.MasterDataTables createDatabaseMasterDataTables() {
return new Database.MasterDataTables();
}
}

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 07:32:18 PM MEZ
// Generated on: 2012.01.29 at 07:51:03 PM MEZ
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

View File

@ -69,6 +69,64 @@
minOccurs="0" maxOccurs="1" />
<element name="outputSchema" type="string" default=""
minOccurs="0" maxOccurs="1" />
<element name="masterDataTables" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="masterDataTable" type="tns:MasterDataTable" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="enumTypes" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="enumType" type="tns:EnumType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="forcedTypes" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="forcedType" type="tns:ForcedType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</all>
</complexType>
<complexType name="MasterDataTable">
<annotation>
<documentation>
Configuration for a master data table
</documentation>
</annotation>
<all>
<element name="name" type="string" minOccurs="1" maxOccurs="1"/>
<element name="literal" type="string" minOccurs="1" maxOccurs="1"/>
<element name="description" type="string" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="EnumType">
<annotation>
<documentation>
Configuration for custom enum types
</documentation>
</annotation>
<all>
<element name="name" type="string" minOccurs="1" maxOccurs="1"/>
<element name="literals" type="string" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="ForcedType">
<annotation>
<documentation>
Configuration for forced types
</documentation>
</annotation>
<all>
<element name="name" type="string" minOccurs="1" maxOccurs="1"/>
<element name="expressions" type="string" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>