handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getVersion();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.setVersion( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("string");
desc.setHandler(handler);
desc.setRequired(true);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _version
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
org.exolab.castor.xml.validators.StringValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
typeValidator.setFixed("1.1");
typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
//-- _creator
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_creator", "creator", org.exolab.castor.xml.NodeType.Attribute);
desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getCreator();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.setCreator( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("string");
desc.setHandler(handler);
desc.setRequired(true);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _creator
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
org.exolab.castor.xml.validators.StringValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
//-- initialize element descriptors
//-- _metadata
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(net.sourceforge.gpstools.gpx.Metadata.class, "_metadata", "metadata", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getMetadata();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.setMetadata( (net.sourceforge.gpstools.gpx.Metadata) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("net.sourceforge.gpstools.gpx.Metadata");
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.topografix.com/GPX/1/1");
desc.setMultivalued(false);
addFieldDescriptor(desc);
addSequenceElement(desc);
//-- validation code for: _metadata
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- _wptList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(net.sourceforge.gpstools.gpx.Wpt.class, "_wptList", "wpt", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getWpt();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.addWpt( (net.sourceforge.gpstools.gpx.Wpt) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
GpxType target = (GpxType) object;
target.removeAllWpt();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("list");
desc.setComponentType("net.sourceforge.gpstools.gpx.Wpt");
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.topografix.com/GPX/1/1");
desc.setMultivalued(true);
addFieldDescriptor(desc);
addSequenceElement(desc);
//-- validation code for: _wptList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- _rteList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(net.sourceforge.gpstools.gpx.Rte.class, "_rteList", "rte", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getRte();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.addRte( (net.sourceforge.gpstools.gpx.Rte) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
GpxType target = (GpxType) object;
target.removeAllRte();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("list");
desc.setComponentType("net.sourceforge.gpstools.gpx.Rte");
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.topografix.com/GPX/1/1");
desc.setMultivalued(true);
addFieldDescriptor(desc);
addSequenceElement(desc);
//-- validation code for: _rteList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- _trkList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(net.sourceforge.gpstools.gpx.Trk.class, "_trkList", "trk", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getTrk();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.addTrk( (net.sourceforge.gpstools.gpx.Trk) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
GpxType target = (GpxType) object;
target.removeAllTrk();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override
@SuppressWarnings("unused")
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("list");
desc.setComponentType("net.sourceforge.gpstools.gpx.Trk");
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.topografix.com/GPX/1/1");
desc.setMultivalued(true);
addFieldDescriptor(desc);
addSequenceElement(desc);
//-- validation code for: _trkList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- _gpxExtensions
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(net.sourceforge.gpstools.gpx.GpxExtensions.class, "_gpxExtensions", "extensions", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
GpxType target = (GpxType) object;
return target.getGpxExtensions();
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
GpxType target = (GpxType) object;
target.setGpxExtensions( (net.sourceforge.gpstools.gpx.GpxExtensions) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override