org.ota.rail
Class RailReservation.OriginandDestination.TrainSegment

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

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

Full details on one specific train segment, including the origin and destination locations for this segment, equipment used, services offered, etc. 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" type="ns:BookedTrainSegmentType" name="TrainSegment" maxOccurs="9"/>
 
 <xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="BookedTrainSegmentType">
   <xs:complexContent>
     <xs:extension base="ns:TrainSegmentType">
       <xs:sequence>
         <xs:element name="ClassCode">
           <xs:complexType>
             <xs:attributeGroup ref="ns:ClassCodeGroup"/>
           </xs:complexType>
         </xs:element>
         <xs:element type="ns:FreeTextType" name="Comment" minOccurs="0" maxOccurs="10"/>
         <xs:element name="Compartments" minOccurs="0">
           <!-- Reference to inner class Compartments -->
         </xs:element>
         <xs:element name="SeatAssignments" minOccurs="0">
           <!-- Reference to inner class SeatAssignments -->
         </xs:element>
       </xs:sequence>
       <xs:attribute type="xs:string" use="required" name="BookStatus"/>
       <xs:attribute type="xs:string" use="optional" name="TicketStatus"/>
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>
 
 <xs:attributeGroup xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ClassCodeGroup">
   <xs:attribute type="xs:string" use="required" name="ClassCode"/>
   <xs:attribute type="xs:int" use="optional" name="Quantity"/>
 </xs:attributeGroup>
 


Nested Class Summary
static class RailReservation.OriginandDestination.TrainSegment.Compartments
          Schema fragment(s) for this class:
static class RailReservation.OriginandDestination.TrainSegment.SeatAssignments
          Schema fragment(s) for this class:
 
Constructor Summary
RailReservation.OriginandDestination.TrainSegment()
           
 
Method Summary
 void addComment(FreeText item)
          Add a 'Comment' element item.
 void clearComments()
          Remove all 'Comment' element items.
 java.lang.String getBookStatus()
          Get the 'BookStatus' attribute value.
 java.lang.String getClassCodeClassCode()
          Get the 'ClassCode' attribute value.
 java.lang.Integer getClassCodeQuantity()
          Get the 'Quantity' attribute value.
 FreeText getComment(int index)
          Get 'Comment' element item by position.
 java.util.List<FreeText> getComments()
          Get the list of 'Comment' element items.
 RailReservation.OriginandDestination.TrainSegment.Compartments getCompartments()
          Get the 'Compartments' element value.
 RailReservation.OriginandDestination.TrainSegment.SeatAssignments getSeatAssignments()
          Get the 'SeatAssignments' element value.
 java.lang.String getTicketStatus()
          Get the 'TicketStatus' attribute value.
 TrainSegment getTrainSegment()
          Get the extension value.
 void setBookStatus(java.lang.String bookStatus)
          Set the 'BookStatus' attribute value.
 void setClassCodeClassCode(java.lang.String classCodeClassCode)
          Set the 'ClassCode' attribute value.
 void setClassCodeQuantity(java.lang.Integer classCodeQuantity)
          Set the 'Quantity' attribute value.
 void setComments(java.util.List<FreeText> list)
          Set the list of 'Comment' element items.
 void setCompartments(RailReservation.OriginandDestination.TrainSegment.Compartments compartments)
          Set the 'Compartments' element value.
 void setSeatAssignments(RailReservation.OriginandDestination.TrainSegment.SeatAssignments seatAssignments)
          Set the 'SeatAssignments' element value.
 void setTicketStatus(java.lang.String ticketStatus)
          Set the 'TicketStatus' attribute value.
 void setTrainSegment(TrainSegment trainSegment)
          Set the extension value.
 int sizeComments()
          Get the number of 'Comment' element items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RailReservation.OriginandDestination.TrainSegment

public RailReservation.OriginandDestination.TrainSegment()
Method Detail

getTrainSegment

public TrainSegment getTrainSegment()
Get the extension value.

Returns:
value

setTrainSegment

public void setTrainSegment(TrainSegment trainSegment)
Set the extension value.

Parameters:
trainSegment -

getClassCodeClassCode

public java.lang.String getClassCodeClassCode()
Get the 'ClassCode' attribute value.

Returns:
value

setClassCodeClassCode

public void setClassCodeClassCode(java.lang.String classCodeClassCode)
Set the 'ClassCode' attribute value.

Parameters:
classCodeClassCode -

getClassCodeQuantity

public java.lang.Integer getClassCodeQuantity()
Get the 'Quantity' attribute value. 1

Returns:
value

setClassCodeQuantity

public void setClassCodeQuantity(java.lang.Integer classCodeQuantity)
Set the 'Quantity' attribute value. 1

Parameters:
classCodeQuantity -

getComments

public java.util.List<FreeText> getComments()
Get the list of 'Comment' element items. Any special comments on the segment.

Returns:
list

setComments

public void setComments(java.util.List<FreeText> list)
Set the list of 'Comment' element items. Any special comments on the segment.

Parameters:
list -

sizeComments

public int sizeComments()
Get the number of 'Comment' element items.

Returns:
count

addComment

public void addComment(FreeText item)
Add a 'Comment' element item.

Parameters:
item -

getComment

public FreeText getComment(int index)
Get 'Comment' element item by position.

Parameters:
index -
Returns:
item

clearComments

public void clearComments()
Remove all 'Comment' element items.


getCompartments

public RailReservation.OriginandDestination.TrainSegment.Compartments getCompartments()
Get the 'Compartments' element value. The BookedTrainSegmentType complex type defines the information needed to describe a train segment that has been booked as part of a reservation.

Returns:
value

setCompartments

public void setCompartments(RailReservation.OriginandDestination.TrainSegment.Compartments compartments)
Set the 'Compartments' element value. The BookedTrainSegmentType complex type defines the information needed to describe a train segment that has been booked as part of a reservation.

Parameters:
compartments -

getSeatAssignments

public RailReservation.OriginandDestination.TrainSegment.SeatAssignments getSeatAssignments()
Get the 'SeatAssignments' element value. The BookedTrainSegmentType complex type defines the information needed to describe a train segment that has been booked as part of a reservation.

Returns:
value

setSeatAssignments

public void setSeatAssignments(RailReservation.OriginandDestination.TrainSegment.SeatAssignments seatAssignments)
Set the 'SeatAssignments' element value. The BookedTrainSegmentType complex type defines the information needed to describe a train segment that has been booked as part of a reservation.

Parameters:
seatAssignments -

getBookStatus

public java.lang.String getBookStatus()
Get the 'BookStatus' attribute value.

Returns:
value

setBookStatus

public void setBookStatus(java.lang.String bookStatus)
Set the 'BookStatus' attribute value.

Parameters:
bookStatus -

getTicketStatus

public java.lang.String getTicketStatus()
Get the 'TicketStatus' attribute value.

Returns:
value

setTicketStatus

public void setTicketStatus(java.lang.String ticketStatus)
Set the 'TicketStatus' attribute value.

Parameters:
ticketStatus -