Browse Source

Removed generated classes from repo.

conversation
Arjen Poutsma 16 years ago
parent
commit
5948d05ee0
  1. 4
      org.springframework.oxm/build.xml
  2. 154
      org.springframework.oxm/oxm.iml
  3. 99
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/Flight.java
  4. 143
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/FlightType.java
  5. 236
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/Flights.java
  6. 132
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightDescriptor.java
  7. 189
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightTypeDescriptor.java
  8. 186
      org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightsDescriptor.java
  9. 47
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/FlightType.java
  10. 66
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Flights.java
  11. 66
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/ObjectFactory.java
  12. 25
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/package-info.java

4
org.springframework.oxm/build.xml

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
<import file="${basedir}/../spring-build/standard/default.xml"/>
<property name="schema" value="${basedir}/src/test/resources/org/springframework/oxm/flight.xsd"/>
<property name="test.castor.dir" value="${target.dir}/castor/staging/test"/>
<property name="test.jaxb.dir" value="${target.dir}/jaxb/staging/test"/>
<property name="test.castor.dir" value="${target.dir}/castor/test"/>
<property name="test.jaxb.dir" value="${target.dir}/jaxb/test"/>
<macrodef name="test-compile">
<attribute name="classpath.id"/>

154
org.springframework.oxm/oxm.iml

@ -7,7 +7,12 @@ @@ -7,7 +7,12 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<sourceFolder url="file://$MODULE_DIR$/target/castor/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/jaxb/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target/artifacts" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/target/test-results" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
@ -180,153 +185,6 @@ @@ -180,153 +185,6 @@
<Base>
<setting name="state" value="1" />
</Base>
<LanguageOptions name="HTML">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="1" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="JAVA">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="2" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="JSP">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="1" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="JavaScript">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="1" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="Properties">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="1" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="XML">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="1" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
<LanguageOptions name="__TEMPLATE__">
<option name="templateOptions">
<value>
<option name="block" value="true" />
<option name="separateBefore" value="false" />
<option name="separateAfter" value="false" />
<option name="prefixLines" value="true" />
<option name="lenBefore" value="80" />
<option name="lenAfter" value="80" />
<option name="box" value="false" />
<option name="filler" value=" " />
</value>
</option>
<option name="notice" value="Copyright 2002-&amp;#36;today.year the original author or authors.&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10; http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
<option name="keyword" value="Copyright" />
<option name="fileTypeOverride" value="4" />
<option name="relativeBefore" value="true" />
<option name="addBlankAfter" value="true" />
<option name="fileLocation" value="1" />
<option name="useAlternate" value="false" />
</LanguageOptions>
</component>
</module>

99
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/Flight.java

@ -1,99 +0,0 @@ @@ -1,99 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class Flight.
*
* @version $Revision$ $Date$
*/
public class Flight extends FlightType implements java.io.Serializable {
//----------------/
//- Constructors -/
//----------------/
public Flight() {
super();
}
//-----------/
//- Methods -/
//-----------/
/**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/
public boolean isValid() {
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
}
/**
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void marshal(final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
}
/**
* @throws java.io.IOException if an IOException occurs during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
*/
public void marshal(final org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
}
/**
* Method unmarshal.
*
* @return the unmarshaled org.springframework.oxm.castor.FlightType
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public static org.springframework.oxm.castor.FlightType unmarshal(final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.springframework.oxm.castor.FlightType) Unmarshaller
.unmarshal(org.springframework.oxm.castor.Flight.class, reader);
}
/**
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void validate() throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
}
}

143
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/FlightType.java

@ -1,143 +0,0 @@ @@ -1,143 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class FlightType.
*
* @version $Revision$ $Date$
*/
public class FlightType implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/** Field _number. */
private long _number;
/** keeps track of state for field: _number */
private boolean _has_number;
//----------------/
//- Constructors -/
//----------------/
public FlightType() {
super();
}
//-----------/
//- Methods -/
//-----------/
/**
*/
public void deleteNumber() {
this._has_number = false;
}
/**
* Returns the value of field 'number'.
*
* @return the value of field 'Number'.
*/
public long getNumber() {
return this._number;
}
/**
* Method hasNumber.
*
* @return true if at least one Number has been added
*/
public boolean hasNumber() {
return this._has_number;
}
/**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/
public boolean isValid() {
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
}
/**
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void marshal(final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
}
/**
* @throws java.io.IOException if an IOException occurs during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
*/
public void marshal(final org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
}
/**
* Sets the value of field 'number'.
*
* @param number the value of field 'number'.
*/
public void setNumber(final long number) {
this._number = number;
this._has_number = true;
}
/**
* Method unmarshal.
*
* @return the unmarshaled org.springframework.oxm.castor.FlightType
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public static org.springframework.oxm.castor.FlightType unmarshal(final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.springframework.oxm.castor.FlightType) Unmarshaller
.unmarshal(org.springframework.oxm.castor.FlightType.class, reader);
}
/**
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void validate() throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
}
}

236
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/Flights.java

@ -1,236 +0,0 @@ @@ -1,236 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class Flights.
*
* @version $Revision$ $Date$
*/
public class Flights implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/** Field _flightList. */
private java.util.List _flightList;
//----------------/
//- Constructors -/
//----------------/
public Flights() {
super();
this._flightList = new java.util.ArrayList();
}
//-----------/
//- Methods -/
//-----------/
/**
* @throws java.lang.IndexOutOfBoundsException
* if the index given is outside the bounds of the collection
*/
public void addFlight(final org.springframework.oxm.castor.Flight vFlight)
throws java.lang.IndexOutOfBoundsException {
this._flightList.add(vFlight);
}
/**
* @throws java.lang.IndexOutOfBoundsException
* if the index given is outside the bounds of the collection
*/
public void addFlight(final int index, final org.springframework.oxm.castor.Flight vFlight)
throws java.lang.IndexOutOfBoundsException {
this._flightList.add(index, vFlight);
}
/**
* Method enumerateFlight.
*
* @return an Enumeration over all possible elements of this collection
*/
public java.util.Enumeration enumerateFlight() {
return java.util.Collections.enumeration(this._flightList);
}
/**
* Method getFlight.
*
* @return the value of the org.springframework.oxm.castor.Flight at the given index
* @throws java.lang.IndexOutOfBoundsException
* if the index given is outside the bounds of the collection
*/
public org.springframework.oxm.castor.Flight getFlight(final int index) throws java.lang.IndexOutOfBoundsException {
// check bounds for index
if (index < 0 || index >= this._flightList.size()) {
throw new IndexOutOfBoundsException(
"getFlight: Index value '" + index + "' not in range [0.." + (this._flightList.size() - 1) + "]");
}
return (org.springframework.oxm.castor.Flight) _flightList.get(index);
}
/**
* Method getFlight.Returns the contents of the collection in an Array. <p>Note: Just in case the collection
* contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This
* way we <i>know</i> that the Array returned is of exactly the correct length.
*
* @return this collection as an Array
*/
public org.springframework.oxm.castor.Flight[] getFlight() {
org.springframework.oxm.castor.Flight[] array = new org.springframework.oxm.castor.Flight[0];
return (org.springframework.oxm.castor.Flight[]) this._flightList.toArray(array);
}
/**
* Method getFlightCount.
*
* @return the size of this collection
*/
public int getFlightCount() {
return this._flightList.size();
}
/**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/
public boolean isValid() {
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
}
/**
* Method iterateFlight.
*
* @return an Iterator over all possible elements in this collection
*/
public java.util.Iterator iterateFlight() {
return this._flightList.iterator();
}
/**
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void marshal(final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
}
/**
* @throws java.io.IOException if an IOException occurs during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
*/
public void marshal(final org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
}
/**
*/
public void removeAllFlight() {
this._flightList.clear();
}
/**
* Method removeFlight.
*
* @return true if the object was removed from the collection.
*/
public boolean removeFlight(final org.springframework.oxm.castor.Flight vFlight) {
boolean removed = _flightList.remove(vFlight);
return removed;
}
/**
* Method removeFlightAt.
*
* @return the element removed from the collection
*/
public org.springframework.oxm.castor.Flight removeFlightAt(final int index) {
java.lang.Object obj = this._flightList.remove(index);
return (org.springframework.oxm.castor.Flight) obj;
}
/**
* @throws java.lang.IndexOutOfBoundsException
* if the index given is outside the bounds of the collection
*/
public void setFlight(final int index, final org.springframework.oxm.castor.Flight vFlight)
throws java.lang.IndexOutOfBoundsException {
// check bounds for index
if (index < 0 || index >= this._flightList.size()) {
throw new IndexOutOfBoundsException(
"setFlight: Index value '" + index + "' not in range [0.." + (this._flightList.size() - 1) + "]");
}
this._flightList.set(index, vFlight);
}
/**
*
*
* @param vFlightArray
*/
public void setFlight(final org.springframework.oxm.castor.Flight[] vFlightArray) {
//-- copy array
_flightList.clear();
for (int i = 0; i < vFlightArray.length; i++) {
this._flightList.add(vFlightArray[i]);
}
}
/**
* Method unmarshal.
*
* @return the unmarshaled org.springframework.oxm.castor.Flight
* @throws org.exolab.castor.xml.MarshalException
* if object is null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public static org.springframework.oxm.castor.Flights unmarshal(final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.springframework.oxm.castor.Flights) Unmarshaller
.unmarshal(org.springframework.oxm.castor.Flights.class, reader);
}
/**
* @throws org.exolab.castor.xml.ValidationException
* if this object is an invalid instance according to the schema
*/
public void validate() throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
}
}

132
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightDescriptor.java

@ -1,132 +0,0 @@ @@ -1,132 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor.descriptors;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
/**
* Class FlightDescriptor.
*
* @version $Revision$ $Date$
*/
public class FlightDescriptor extends org.springframework.oxm.castor.descriptors.FlightTypeDescriptor {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/** Field _elementDefinition. */
private boolean _elementDefinition;
/** Field _nsPrefix. */
private java.lang.String _nsPrefix;
/** Field _nsURI. */
private java.lang.String _nsURI;
/** Field _xmlName. */
private java.lang.String _xmlName;
/** Field _identity. */
private org.exolab.castor.xml.XMLFieldDescriptor _identity;
//----------------/
//- Constructors -/
//----------------/
public FlightDescriptor() {
super();
setExtendsWithoutFlatten(new org.springframework.oxm.castor.descriptors.FlightTypeDescriptor());
_nsURI = "http://samples.springframework.org/flight";
_xmlName = "flight";
_elementDefinition = true;
}
//-----------/
//- Methods -/
//-----------/
/**
* Method getAccessMode.
*
* @return the access mode specified for this class.
*/
public org.exolab.castor.mapping.AccessMode getAccessMode() {
return null;
}
/**
* Method getIdentity.
*
* @return the identity field, null if this class has no identity.
*/
public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
if (_identity == null) {
return super.getIdentity();
}
return _identity;
}
/**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/
public java.lang.Class getJavaClass() {
return org.springframework.oxm.castor.Flight.class;
}
/**
* Method getNameSpacePrefix.
*
* @return the namespace prefix to use when marshaling as XML.
*/
public java.lang.String getNameSpacePrefix() {
return _nsPrefix;
}
/**
* Method getNameSpaceURI.
*
* @return the namespace URI used when marshaling and unmarshaling as XML.
*/
public java.lang.String getNameSpaceURI() {
return _nsURI;
}
/**
* Method getValidator.
*
* @return a specific validator for the class described by this ClassDescriptor.
*/
public org.exolab.castor.xml.TypeValidator getValidator() {
return this;
}
/**
* Method getXMLName.
*
* @return the XML Name for the Class being described.
*/
public java.lang.String getXMLName() {
return _xmlName;
}
/**
* Method isElementDefinition.
*
* @return true if XML schema definition of this Class is that of a global element or element with anonymous type
* definition.
*/
public boolean isElementDefinition() {
return _elementDefinition;
}
}

189
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightTypeDescriptor.java

@ -1,189 +0,0 @@ @@ -1,189 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor.descriptors;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.springframework.oxm.castor.FlightType;
/**
* Class FlightTypeDescriptor.
*
* @version $Revision$ $Date$
*/
public class FlightTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/** Field _elementDefinition. */
private boolean _elementDefinition;
/** Field _nsPrefix. */
private java.lang.String _nsPrefix;
/** Field _nsURI. */
private java.lang.String _nsURI;
/** Field _xmlName. */
private java.lang.String _xmlName;
/** Field _identity. */
private org.exolab.castor.xml.XMLFieldDescriptor _identity;
//----------------/
//- Constructors -/
//----------------/
public FlightTypeDescriptor() {
super();
_nsURI = "http://samples.springframework.org/flight";
_xmlName = "flightType";
_elementDefinition = false;
//-- set grouping compositor
setCompositorAsSequence();
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
org.exolab.castor.mapping.FieldHandler handler = null;
org.exolab.castor.xml.FieldValidator fieldValidator = null;
//-- initialize attribute descriptors
//-- initialize element descriptors
//-- _number
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_number", "number",
org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
FlightType target = (FlightType) object;
if (!target.hasNumber()) {
return null;
}
return new java.lang.Long(target.getNumber());
}
public void setValue(java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException {
try {
FlightType target = (FlightType) object;
// ignore null values for non optional primitives
if (value == null) {
return;
}
target.setNumber(((java.lang.Long) value).longValue());
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://samples.springframework.org/flight");
desc.setRequired(true);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _number
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
org.exolab.castor.xml.validators.LongValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.LongValidator();
fieldValidator.setValidator(typeValidator);
typeValidator.setMinInclusive(-9223372036854775808L);
typeValidator.setMaxInclusive(9223372036854775807L);
}
desc.setValidator(fieldValidator);
}
//-----------/
//- Methods -/
//-----------/
/**
* Method getAccessMode.
*
* @return the access mode specified for this class.
*/
public org.exolab.castor.mapping.AccessMode getAccessMode() {
return null;
}
/**
* Method getIdentity.
*
* @return the identity field, null if this class has no identity.
*/
public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
return _identity;
}
/**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/
public java.lang.Class getJavaClass() {
return org.springframework.oxm.castor.FlightType.class;
}
/**
* Method getNameSpacePrefix.
*
* @return the namespace prefix to use when marshaling as XML.
*/
public java.lang.String getNameSpacePrefix() {
return _nsPrefix;
}
/**
* Method getNameSpaceURI.
*
* @return the namespace URI used when marshaling and unmarshaling as XML.
*/
public java.lang.String getNameSpaceURI() {
return _nsURI;
}
/**
* Method getValidator.
*
* @return a specific validator for the class described by this ClassDescriptor.
*/
public org.exolab.castor.xml.TypeValidator getValidator() {
return this;
}
/**
* Method getXMLName.
*
* @return the XML Name for the Class being described.
*/
public java.lang.String getXMLName() {
return _xmlName;
}
/**
* Method isElementDefinition.
*
* @return true if XML schema definition of this Class is that of a global element or element with anonymous type
* definition.
*/
public boolean isElementDefinition() {
return _elementDefinition;
}
}

186
org.springframework.oxm/src/test/java/org/springframework/oxm/castor/descriptors/FlightsDescriptor.java

@ -1,186 +0,0 @@ @@ -1,186 +0,0 @@
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package org.springframework.oxm.castor.descriptors;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.springframework.oxm.castor.Flights;
/**
* Class FlightsDescriptor.
*
* @version $Revision$ $Date$
*/
public class FlightsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/** Field _elementDefinition. */
private boolean _elementDefinition;
/** Field _nsPrefix. */
private java.lang.String _nsPrefix;
/** Field _nsURI. */
private java.lang.String _nsURI;
/** Field _xmlName. */
private java.lang.String _xmlName;
/** Field _identity. */
private org.exolab.castor.xml.XMLFieldDescriptor _identity;
//----------------/
//- Constructors -/
//----------------/
public FlightsDescriptor() {
super();
_nsURI = "http://samples.springframework.org/flight";
_xmlName = "flights";
_elementDefinition = true;
//-- set grouping compositor
setCompositorAsSequence();
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
org.exolab.castor.mapping.FieldHandler handler = null;
org.exolab.castor.xml.FieldValidator fieldValidator = null;
//-- initialize attribute descriptors
//-- initialize element descriptors
//-- _flightList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.springframework.oxm.castor.Flight.class,
"_flightList", "flight", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue(java.lang.Object object) throws IllegalStateException {
Flights target = (Flights) object;
return target.getFlight();
}
public void setValue(java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException {
try {
Flights target = (Flights) object;
target.addFlight((org.springframework.oxm.castor.Flight) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
Flights target = (Flights) object;
target.removeAllFlight();
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new org.springframework.oxm.castor.Flight();
}
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://samples.springframework.org/flight");
desc.setRequired(true);
desc.setMultivalued(true);
addFieldDescriptor(desc);
//-- validation code for: _flightList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
}
desc.setValidator(fieldValidator);
}
//-----------/
//- Methods -/
//-----------/
/**
* Method getAccessMode.
*
* @return the access mode specified for this class.
*/
public org.exolab.castor.mapping.AccessMode getAccessMode() {
return null;
}
/**
* Method getIdentity.
*
* @return the identity field, null if this class has no identity.
*/
public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
return _identity;
}
/**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/
public java.lang.Class getJavaClass() {
return org.springframework.oxm.castor.Flights.class;
}
/**
* Method getNameSpacePrefix.
*
* @return the namespace prefix to use when marshaling as XML.
*/
public java.lang.String getNameSpacePrefix() {
return _nsPrefix;
}
/**
* Method getNameSpaceURI.
*
* @return the namespace URI used when marshaling and unmarshaling as XML.
*/
public java.lang.String getNameSpaceURI() {
return _nsURI;
}
/**
* Method getValidator.
*
* @return a specific validator for the class described by this ClassDescriptor.
*/
public org.exolab.castor.xml.TypeValidator getValidator() {
return this;
}
/**
* Method getXMLName.
*
* @return the XML Name for the Class being described.
*/
public java.lang.String getXMLName() {
return _xmlName;
}
/**
* Method isElementDefinition.
*
* @return true if XML schema definition of this Class is that of a global element or element with anonymous type
* definition.
*/
public boolean isElementDefinition() {
return _elementDefinition;
}
}

47
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/FlightType.java

@ -1,47 +0,0 @@ @@ -1,47 +0,0 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.3-b01-fcs
// 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: 2009.01.08 at 12:41:36 PM CET
//
package org.springframework.oxm.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for flightType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="flightType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="number" type="{http://www.w3.org/2001/XMLSchema}long"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "flightType", propOrder = {"number"})
public class FlightType {
protected long number;
/** Gets the value of the number property. */
public long getNumber() {
return number;
}
/** Sets the value of the number property. */
public void setNumber(long value) {
this.number = value;
}
}

66
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Flights.java

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.3-b01-fcs
// 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: 2009.01.08 at 12:41:36 PM CET
//
package org.springframework.oxm.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;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <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="flight" type="{http://samples.springframework.org/flight}flightType"
* maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"flight"})
@XmlRootElement(name = "flights")
public class Flights {
@XmlElement(required = true)
protected List<FlightType> flight;
/**
* Gets the value of the flight 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 flight property.
*
* <p> For example, to add a new item, do as follows:
* <pre>
* getFlight().add(newItem);
* </pre>
*
*
* <p> Objects of the following type(s) are allowed in the list {@link FlightType }
*/
public List<FlightType> getFlight() {
if (flight == null) {
flight = new ArrayList<FlightType>();
}
return this.flight;
}
}

66
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/ObjectFactory.java

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed 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.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.3-b01-fcs
// 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: 2009.01.08 at 12:41:36 PM CET
//
package org.springframework.oxm.jaxb;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each Java content interface and Java element interface generated in the
* org.springframework.oxm.jaxb package. <p>An ObjectFactory allows you to programatically construct new instances of
* the Java representation for XML content. The Java representation of XML content can consist of schema derived
* interfaces and classes representing the binding of schema type definitions, element declarations and model groups.
* Factory methods for each of these are provided in this class.
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _Flight_QNAME = new QName("http://samples.springframework.org/flight", "flight");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
* org.springframework.oxm.jaxb
*/
public ObjectFactory() {
}
/** Create an instance of {@link FlightType } */
public FlightType createFlightType() {
return new FlightType();
}
/** Create an instance of {@link Flights } */
public Flights createFlights() {
return new Flights();
}
/** Create an instance of {@link JAXBElement }{@code <}{@link FlightType }{@code >}} */
@XmlElementDecl(namespace = "http://samples.springframework.org/flight", name = "flight")
public JAXBElement<FlightType> createFlight(FlightType value) {
return new JAXBElement<FlightType>(_Flight_QNAME, FlightType.class, null, value);
}
}

25
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/package-info.java

@ -1,25 +0,0 @@ @@ -1,25 +0,0 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed 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.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.3-b01-fcs
// 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: 2009.01.08 at 12:41:36 PM CET
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://samples.springframework.org/flight",
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.springframework.oxm.jaxb;
Loading…
Cancel
Save