org.jbind.example.meansOfTransport
Class TruckData

java.lang.Object
  extended byorg.jbind.xml.instance.data.AbstractData
      extended byorg.jbind.xml.instance.data.AnyTypeData
          extended byorg.jbind.example.meansOfTransport.MeansOfTransport
              extended byorg.jbind.example.meansOfTransport.Vehicle
                  extended byorg.jbind.example.meansOfTransport.Truck
                      extended byorg.jbind.example.meansOfTransport.TruckData
All Implemented Interfaces:
IAnyTypeData, IAutomobileData, IComplexCCData, IComplexData, IMeansOfTransport, IMeansOfTransportData, ITruck, ITruckData, IVehicle, IVehicleData

public class TruckData
extends Truck


Nested Class Summary
static class TruckData.DataCreator_
           
 
Constructor Summary
TruckData()
           
 
Method Summary
protected  void doAcceptEnds_(IDataVisitor aVisitor)
           
protected  void doAcceptStarts_(IDataVisitor aVisitor)
           
protected  void doSetNumberOfWheels(int aValue)
          Declaration of the hook method.
 double getConsumption()
          Gets the consumptionInLitres attribute.
 IAnyTypeData getEngine()
          Gets the engine element.
 java.lang.String getFuelType()
          Gets the fuelType attribute.
 java.math.BigDecimal getLoadCapacityInTons()
          Gets the loadCapacityInTons attribute.
 java.lang.String getManufacturer()
          Gets the manufacturer attribute.
 int getNumberOfWheels()
          Gets the numberOfWheels attribute.
 boolean hasConsumption()
          Checks if the consumptionInLitres attribute is present.
 boolean hasEngine()
          Checks if the engine element is present.
 boolean hasLoadCapacityInTons()
          Checks if the loadCapacityInTons attribute is present.
 boolean hasManufacturer()
          Checks if the manufacturer attribute is present.
 boolean hasNumberOfWheels()
          Checks if the numberOfWheels attribute is present.
 IManufacturerData refManufacturer()
          Gets the data object referenced by the "IDREF(manufacturer)" reference constraint.
 void removeNumberOfWheels()
          Removes the numberOfWheels attribute.
 void setConsumption(double aValue)
          Sets the consumptionInLitres attribute.
 void setFuelType(java.lang.String aValue)
          Sets the fuelType attribute.
 void setLoadCapacityInTons(java.math.BigDecimal aValue)
          Sets the loadCapacityInTons attribute.
 void setManufacturer(java.lang.String aValue)
          Sets the manufacturer attribute.
 
Methods inherited from class org.jbind.example.meansOfTransport.Vehicle
setNumberOfWheels
 
Methods inherited from class org.jbind.xml.instance.data.AnyTypeData
acceptImpl_
 
Methods inherited from class org.jbind.xml.instance.data.AbstractData
accept_, addReferencedData_, createElement_, createElement_, createUncheckedAttributeData_, equals, fetchByXPath_, getAttribute_, getDataDesc_, getFixed_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, iterReferencedData_, newElementData_, numberByXPath_, removeAttributeData_, selectByXPath_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_, stringByXPath_, testByXPath_
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.example.meansOfTransport.IVehicleData
setNumberOfWheels
 
Methods inherited from interface org.jbind.xml.core.data.IAnyTypeData
accept_, acceptImpl_, addReferencedData_, createElement_, createElement_, equals, getAttribute_, getDataDesc_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_
 

Constructor Detail

TruckData

public TruckData()
Method Detail

doAcceptStarts_

protected void doAcceptStarts_(IDataVisitor aVisitor)

doAcceptEnds_

protected void doAcceptEnds_(IDataVisitor aVisitor)

getEngine

public IAnyTypeData getEngine()
Description copied from interface: IAutomobileData
Gets the engine element.

Returns:
(optional) The value.

hasEngine

public boolean hasEngine()
Description copied from interface: IAutomobileData
Checks if the engine element is present.

Returns:
Returns true iff the element is present.

getConsumption

public double getConsumption()
Description copied from interface: IAutomobileData
Gets the consumptionInLitres attribute.

Returns:
The value.

setConsumption

public void setConsumption(double aValue)
                    throws XmlException
Description copied from interface: IAutomobileData
Sets the consumptionInLitres attribute.

Parameters:
aValue - The new value.
Throws:
XmlException - Raised if the value could not be set.

hasConsumption

public boolean hasConsumption()
Description copied from interface: IAutomobileData
Checks if the consumptionInLitres attribute is present.

Returns:
Returns true iff the attribute is present.

getFuelType

public java.lang.String getFuelType()
Description copied from interface: IAutomobileData
Gets the fuelType attribute.

Returns:
(optional) The value.

setFuelType

public void setFuelType(java.lang.String aValue)
                 throws XmlException
Description copied from interface: IAutomobileData
Sets the fuelType attribute.

Parameters:
aValue - (optional).
Throws:
XmlException - Raised if the value could not be set.

getLoadCapacityInTons

public java.math.BigDecimal getLoadCapacityInTons()
Description copied from interface: ITruckData
Gets the loadCapacityInTons attribute.

Returns:
(optional) The value.

setLoadCapacityInTons

public void setLoadCapacityInTons(java.math.BigDecimal aValue)
                           throws XmlException
Description copied from interface: ITruckData
Sets the loadCapacityInTons attribute.

Parameters:
aValue - (optional).
Throws:
XmlException - Raised if the value could not be set.

hasLoadCapacityInTons

public boolean hasLoadCapacityInTons()
Description copied from interface: ITruckData
Checks if the loadCapacityInTons attribute is present.

Returns:
Returns true iff the attribute is present.

getManufacturer

public java.lang.String getManufacturer()
Description copied from interface: IMeansOfTransportData
Gets the manufacturer attribute.

Returns:
(optional) The value.

setManufacturer

public void setManufacturer(java.lang.String aValue)
                     throws XmlException
Description copied from interface: IMeansOfTransportData
Sets the manufacturer attribute.

Parameters:
aValue - (optional).
Throws:
XmlException - Raised if the value could not be set.

hasManufacturer

public boolean hasManufacturer()
Description copied from interface: IMeansOfTransportData
Checks if the manufacturer attribute is present.

Returns:
Returns true iff the attribute is present.

getNumberOfWheels

public int getNumberOfWheels()
Description copied from interface: IVehicleData
Gets the numberOfWheels attribute.

Returns:
The value.

doSetNumberOfWheels

protected void doSetNumberOfWheels(int aValue)
                            throws XmlException
Description copied from class: Vehicle
Declaration of the hook method. The hook method is implemented by the generated data class.

Specified by:
doSetNumberOfWheels in class Vehicle
Throws:
XmlException

hasNumberOfWheels

public boolean hasNumberOfWheels()
Description copied from interface: IVehicleData
Checks if the numberOfWheels attribute is present.

Returns:
Returns true iff the attribute is present.

removeNumberOfWheels

public void removeNumberOfWheels()
                          throws XmlException
Description copied from interface: IVehicleData
Removes the numberOfWheels attribute. If the attribute has a default (or fixed) value than a new attribute is created (on demand).

Throws:
XmlException - Raised if it is tried to remove a required attribute.

refManufacturer

public IManufacturerData refManufacturer()
Description copied from interface: IMeansOfTransportData
Gets the data object referenced by the "IDREF(manufacturer)" reference constraint.

Returns:
The referenced data object.