org.ota.rail
Class BookRQ.OriginDestinationOption

java.lang.Object
  extended by org.ota.rail.BookRQ.OriginDestinationOption
Enclosing class:
BookRQ

public static class BookRQ.OriginDestinationOption
extends java.lang.Object

Details aboout one specific jouney between this origin and destination location. This element will be repeated for each journey. For example, for a round-trip reservation, this element will occur two times. Schema fragment(s) for this class:

 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OriginDestinationOption" maxOccurs="99">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="TrainSegments">
         <xs:complexType>
           <xs:sequence>
             <xs:element 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 BookRQ.OriginDestinationOption.TrainSegment
          Full details on one specific train segment, including the origin and destination locations for this segment, the requested class of service, and the operating company, if appropriate.
 
Constructor Summary
BookRQ.OriginDestinationOption()
           
 
Method Summary
 void addTrainSegment(BookRQ.OriginDestinationOption.TrainSegment item)
          Add a 'TrainSegment' element item.
 void clearTrainSegments()
          Remove all 'TrainSegment' element items.
 BookRQ.OriginDestinationOption.TrainSegment getTrainSegment(int index)
          Get 'TrainSegment' element item by position.
 java.util.List<BookRQ.OriginDestinationOption.TrainSegment> getTrainSegments()
          Get the list of 'TrainSegment' element items.
 void setTrainSegments(java.util.List<BookRQ.OriginDestinationOption.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

BookRQ.OriginDestinationOption

public BookRQ.OriginDestinationOption()
Method Detail

getTrainSegments

public java.util.List<BookRQ.OriginDestinationOption.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<BookRQ.OriginDestinationOption.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(BookRQ.OriginDestinationOption.TrainSegment item)
Add a 'TrainSegment' element item.

Parameters:
item -

getTrainSegment

public BookRQ.OriginDestinationOption.TrainSegment getTrainSegment(int index)
Get 'TrainSegment' element item by position.

Parameters:
index -
Returns:
item

clearTrainSegments

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