org.ota.air
Class CabinAvailability

java.lang.Object
  extended by org.ota.air.CabinAvailability
Direct Known Subclasses:
MarketingCabin

public class CabinAvailability
extends java.lang.Object

Construct for holding cabin class information, such as seat availability or meal codes. Can be up to three of these per flight segment or air leg - First, Business and Economy. Schema fragment(s) for this class:

 <xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="CabinAvailabilityType">
   <xs:sequence>
     <xs:element name="Meal" minOccurs="0" maxOccurs="5">
       <!-- Reference to inner class Meal -->
     </xs:element>
     <xs:element name="BaggageAllowance" minOccurs="0">
       <xs:complexType>
         <xs:attributeGroup ref="ns:UnitsOfMeasureGroup"/>
       </xs:complexType>
     </xs:element>
   </xs:sequence>
   <xs:attribute type="ns:CabinType" use="required" name="CabinType"/>
 </xs:complexType>
 


Nested Class Summary
static class CabinAvailability.Meal
          Identifies any meal and/or beverage services that are provided.
 
Constructor Summary
CabinAvailability()
           
 
Method Summary
 void addMeal(CabinAvailability.Meal item)
          Add a 'Meal' element item.
 void clearMeals()
          Remove all 'Meal' element items.
 UnitsOfMeasureGroup getBaggageAllowance()
          Get the 'UnitsOfMeasureGroup' attributeGroup value.
 Cabin getCabin()
          Get the 'CabinType' attribute value.
 CabinAvailability.Meal getMeal(int index)
          Get 'Meal' element item by position.
 java.util.List<CabinAvailability.Meal> getMeals()
          Get the list of 'Meal' element items.
 void setBaggageAllowance(UnitsOfMeasureGroup baggageAllowance)
          Set the 'UnitsOfMeasureGroup' attributeGroup value.
 void setCabin(Cabin cabin)
          Set the 'CabinType' attribute value.
 void setMeals(java.util.List<CabinAvailability.Meal> list)
          Set the list of 'Meal' element items.
 int sizeMeals()
          Get the number of 'Meal' element items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CabinAvailability

public CabinAvailability()
Method Detail

getMeals

public java.util.List<CabinAvailability.Meal> getMeals()
Get the list of 'Meal' element items.

Returns:
list

setMeals

public void setMeals(java.util.List<CabinAvailability.Meal> list)
Set the list of 'Meal' element items.

Parameters:
list -

sizeMeals

public int sizeMeals()
Get the number of 'Meal' element items.

Returns:
count

addMeal

public void addMeal(CabinAvailability.Meal item)
Add a 'Meal' element item.

Parameters:
item -

getMeal

public CabinAvailability.Meal getMeal(int index)
Get 'Meal' element item by position.

Parameters:
index -
Returns:
item

clearMeals

public void clearMeals()
Remove all 'Meal' element items.


getBaggageAllowance

public UnitsOfMeasureGroup getBaggageAllowance()
Get the 'UnitsOfMeasureGroup' attributeGroup value. Provides the maximum weight of checked-in bags per passenger in this cabin.

Returns:
value

setBaggageAllowance

public void setBaggageAllowance(UnitsOfMeasureGroup baggageAllowance)
Set the 'UnitsOfMeasureGroup' attributeGroup value. Provides the maximum weight of checked-in bags per passenger in this cabin.

Parameters:
baggageAllowance -

getCabin

public Cabin getCabin()
Get the 'CabinType' attribute value. A section of an aircraft identified by the service level (e.g., First, Business, Economy)

Returns:
value

setCabin

public void setCabin(Cabin cabin)
Set the 'CabinType' attribute value. A section of an aircraft identified by the service level (e.g., First, Business, Economy)

Parameters:
cabin -