org.ota.rail
Class RailReservation.OriginandDestination

java.lang.Object
  extended by org.ota.rail.RailReservation.OriginandDestination
Enclosing class:
RailReservation

public static class RailReservation.OriginandDestination
extends java.lang.Object

Information on one specific journey from one specific origin to one specific destination. Schema fragment(s) for this class:

 <xs:element xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OriginandDestination" maxOccurs="9">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="LocationType" name="OriginLocation"/>
       <xs:element type="LocationType" name="DestinationLocation"/>
       <xs:element name="TrainSegments">
         <xs:complexType>
           <xs:sequence>
             <xs:element type="BookedTrainSegmentType" name="TrainSegment" maxOccurs="9">
               <!-- Reference to inner class TrainSegment -->
             </xs:element>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 


Nested Class Summary
static class RailReservation.OriginandDestination.TrainSegment
          Full details on one specific train segment, including the origin and destination locations for this segment, equipment used, services offered, etc.
 
Constructor Summary
RailReservation.OriginandDestination()
           
 
Method Summary
 void addTrainSegment(RailReservation.OriginandDestination.TrainSegment item)
          Add a 'TrainSegment' element item.
 void clearTrainSegments()
          Remove all 'TrainSegment' element items.
 Location getDestinationLocation()
          Get the 'DestinationLocation' element value.
 Location getOriginLocation()
          Get the 'OriginLocation' element value.
 RailReservation.OriginandDestination.TrainSegment getTrainSegment(int index)
          Get 'TrainSegment' element item by position.
 java.util.List<RailReservation.OriginandDestination.TrainSegment> getTrainSegments()
          Get the list of 'TrainSegment' element items.
 void setDestinationLocation(Location destinationLocation)
          Set the 'DestinationLocation' element value.
 void setOriginLocation(Location originLocation)
          Set the 'OriginLocation' element value.
 void setTrainSegments(java.util.List<RailReservation.OriginandDestination.TrainSegment> list)
          Set the list of 'TrainSegment' element items.
 int sizeTrainSegments()
          Get the number of 'TrainSegment' element items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RailReservation.OriginandDestination

public RailReservation.OriginandDestination()
Method Detail

getOriginLocation

public Location getOriginLocation()
Get the 'OriginLocation' element value. Travel Origin Location - for example, air uses the IATA 3 letter code.

Returns:
value

setOriginLocation

public void setOriginLocation(Location originLocation)
Set the 'OriginLocation' element value. Travel Origin Location - for example, air uses the IATA 3 letter code.

Parameters:
originLocation -

getDestinationLocation

public Location getDestinationLocation()
Get the 'DestinationLocation' element value. Travel Destination Location - for example, air uses the IATA 3 letter code.

Returns:
value

setDestinationLocation

public void setDestinationLocation(Location destinationLocation)
Set the 'DestinationLocation' element value. Travel Destination Location - for example, air uses the IATA 3 letter code.

Parameters:
destinationLocation -

getTrainSegments

public java.util.List<RailReservation.OriginandDestination.TrainSegment> getTrainSegments()
Get the list of 'TrainSegment' element items. A collection of train segements that together provide the journey from origin to destination.

Returns:
list

setTrainSegments

public void setTrainSegments(java.util.List<RailReservation.OriginandDestination.TrainSegment> list)
Set the list of 'TrainSegment' element items. A collection of train segements that together provide the journey from origin to destination.

Parameters:
list -

sizeTrainSegments

public int sizeTrainSegments()
Get the number of 'TrainSegment' element items.

Returns:
count

addTrainSegment

public void addTrainSegment(RailReservation.OriginandDestination.TrainSegment item)
Add a 'TrainSegment' element item.

Parameters:
item -

getTrainSegment

public RailReservation.OriginandDestination.TrainSegment getTrainSegment(int index)
Get 'TrainSegment' element item by position.

Parameters:
index -
Returns:
item

clearTrainSegments

public void clearTrainSegments()
Remove all 'TrainSegment' element items.