org.jbind.example.meansOfTransport
Class AutomobileData

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.AutomobileData
All Implemented Interfaces:
IAnyTypeData, IAutomobileData, IComplexCCData, IComplexData, IMeansOfTransport, IMeansOfTransportData, IVehicle, IVehicleData

public class AutomobileData
extends Vehicle
implements IAutomobileData


Nested Class Summary
static class AutomobileData.DataCreator_
           
 
Constructor Summary
AutomobileData()
           
 
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.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 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 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

AutomobileData

public AutomobileData()
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.

Specified by:
getEngine in interface IAutomobileData
Returns:
(optional) The value.

hasEngine

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

Specified by:
hasEngine in interface IAutomobileData
Returns:
Returns true iff the element is present.

getConsumption

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

Specified by:
getConsumption in interface IAutomobileData
Returns:
The value.

setConsumption

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

Specified by:
setConsumption in interface IAutomobileData
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.

Specified by:
hasConsumption in interface IAutomobileData
Returns:
Returns true iff the attribute is present.

getFuelType

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

Specified by:
getFuelType in interface IAutomobileData
Returns:
(optional) The value.

setFuelType

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

Specified by:
setFuelType in interface IAutomobileData
Parameters:
aValue - (optional).
Throws:
XmlException - Raised if the value could not be set.

getManufacturer

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

Specified by:
getManufacturer in interface IMeansOfTransportData
Returns:
(optional) The value.

setManufacturer

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

Specified by:
setManufacturer in interface IMeansOfTransportData
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.

Specified by:
hasManufacturer in interface IMeansOfTransportData
Returns:
Returns true iff the attribute is present.

getNumberOfWheels

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

Specified by:
getNumberOfWheels in interface IVehicleData
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.

Specified by:
hasNumberOfWheels in interface IVehicleData
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).

Specified by:
removeNumberOfWheels in interface IVehicleData
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.

Specified by:
refManufacturer in interface IMeansOfTransportData
Returns:
The referenced data object.