org.ota.rail
Class TrainSegment

java.lang.Object
  extended by org.ota.rail.TrainSegment

public class TrainSegment
extends java.lang.Object

The TrainSegmentType complex type defines the construct for holding a train segment availability object. 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="TrainSegmentType">
   <xs:sequence>
     <xs:element type="ns:StationDetailsType" name="DepartureStation"/>
     <xs:element type="ns:StationDetailsType" name="ArrivalStation"/>
     <xs:element type="ns:CompanyNameType" name="MarketingCompany"/>
     <xs:element type="ns:CompanyNameType" name="OperatingCompany" minOccurs="0"/>
     <xs:element name="Equipment" minOccurs="0">
       <xs:complexType>
         <xs:attributeGroup ref="ns:CodeListGroup"/>
       </xs:complexType>
     </xs:element>
   </xs:sequence>
   <xs:attribute type="xs:dateTime" use="required" name="DepartureDateTime"/>
   <xs:attribute type="xs:dateTime" use="optional" name="ArrivalDateTime"/>
   <xs:attribute type="xs:string" name="TrainNumber"/>
   <xs:attribute type="xs:int" use="optional" name="StopQuantity"/>
   <xs:attribute type="xs:string" use="optional" name="JourneyDuration"/>
   <xs:attributeGroup ref="ns:SmokingIndicatorGroup"/>
   <xs:attribute type="xs:string" name="TrainServiceType"/>
   <xs:attribute type="xs:boolean" use="optional" name="CrossBorder"/>
   <xs:attribute type="xs:boolean" use="optional" name="SeatAssignable"/>
 </xs:complexType>
 
 <xs:attributeGroup xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="SmokingIndicatorGroup">
   <xs:attribute type="xs:boolean" use="optional" name="SmokingAllowed"/>
 </xs:attributeGroup>
 


Constructor Summary
TrainSegment()
           
 
Method Summary
 java.util.Date getArrivalDateTime()
          Get the 'ArrivalDateTime' attribute value.
 StationDetails getArrivalStation()
          Get the 'ArrivalStation' element value.
 java.lang.Boolean getCrossBorder()
          Get the 'CrossBorder' attribute value.
 java.util.Date getDepartureDateTime()
          Get the 'DepartureDateTime' attribute value.
 StationDetails getDepartureStation()
          Get the 'DepartureStation' element value.
 CodeListGroup getEquipment()
          Get the 'CodeListGroup' attributeGroup value.
 java.lang.String getJourneyDuration()
          Get the 'JourneyDuration' attribute value.
 CompanyName getMarketingCompany()
          Get the 'MarketingCompany' element value.
 CompanyName getOperatingCompany()
          Get the 'OperatingCompany' element value.
 java.lang.Boolean getSeatAssignable()
          Get the 'SeatAssignable' attribute value.
 java.lang.Boolean getSmokingAllowed()
          Get the 'SmokingAllowed' attribute value.
 java.lang.Integer getStopQuantity()
          Get the 'StopQuantity' attribute value.
 java.lang.String getTrainNumber()
          Get the 'TrainNumber' attribute value.
 java.lang.String getTrainService()
          Get the 'TrainServiceType' attribute value.
 void setArrivalDateTime(java.util.Date arrivalDateTime)
          Set the 'ArrivalDateTime' attribute value.
 void setArrivalStation(StationDetails arrivalStation)
          Set the 'ArrivalStation' element value.
 void setCrossBorder(java.lang.Boolean crossBorder)
          Set the 'CrossBorder' attribute value.
 void setDepartureDateTime(java.util.Date departureDateTime)
          Set the 'DepartureDateTime' attribute value.
 void setDepartureStation(StationDetails departureStation)
          Set the 'DepartureStation' element value.
 void setEquipment(CodeListGroup equipment)
          Set the 'CodeListGroup' attributeGroup value.
 void setJourneyDuration(java.lang.String journeyDuration)
          Set the 'JourneyDuration' attribute value.
 void setMarketingCompany(CompanyName marketingCompany)
          Set the 'MarketingCompany' element value.
 void setOperatingCompany(CompanyName operatingCompany)
          Set the 'OperatingCompany' element value.
 void setSeatAssignable(java.lang.Boolean seatAssignable)
          Set the 'SeatAssignable' attribute value.
 void setSmokingAllowed(java.lang.Boolean smokingAllowed)
          Set the 'SmokingAllowed' attribute value.
 void setStopQuantity(java.lang.Integer stopQuantity)
          Set the 'StopQuantity' attribute value.
 void setTrainNumber(java.lang.String trainNumber)
          Set the 'TrainNumber' attribute value.
 void setTrainService(java.lang.String trainService)
          Set the 'TrainServiceType' attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrainSegment

public TrainSegment()
Method Detail

getDepartureStation

public StationDetails getDepartureStation()
Get the 'DepartureStation' element value. Departure point of train segment.

Returns:
value

setDepartureStation

public void setDepartureStation(StationDetails departureStation)
Set the 'DepartureStation' element value. Departure point of train segment.

Parameters:
departureStation -

getArrivalStation

public StationDetails getArrivalStation()
Get the 'ArrivalStation' element value. Arrival point of train segment.

Returns:
value

setArrivalStation

public void setArrivalStation(StationDetails arrivalStation)
Set the 'ArrivalStation' element value. Arrival point of train segment.

Parameters:
arrivalStation -

getMarketingCompany

public CompanyName getMarketingCompany()
Get the 'MarketingCompany' element value. The marketing train company

Returns:
value

setMarketingCompany

public void setMarketingCompany(CompanyName marketingCompany)
Set the 'MarketingCompany' element value. The marketing train company

Parameters:
marketingCompany -

getOperatingCompany

public CompanyName getOperatingCompany()
Get the 'OperatingCompany' element value. The operating train company, if different

Returns:
value

setOperatingCompany

public void setOperatingCompany(CompanyName operatingCompany)
Set the 'OperatingCompany' element value. The operating train company, if different

Parameters:
operatingCompany -

getEquipment

public CodeListGroup getEquipment()
Get the 'CodeListGroup' attributeGroup value. The type of equipment used for the train journey e.g. Amtrak equipment code, UIC, etc.

Returns:
value

setEquipment

public void setEquipment(CodeListGroup equipment)
Set the 'CodeListGroup' attributeGroup value. The type of equipment used for the train journey e.g. Amtrak equipment code, UIC, etc.

Parameters:
equipment -

getDepartureDateTime

public java.util.Date getDepartureDateTime()
Get the 'DepartureDateTime' attribute value.

Returns:
value

setDepartureDateTime

public void setDepartureDateTime(java.util.Date departureDateTime)
Set the 'DepartureDateTime' attribute value.

Parameters:
departureDateTime -

getArrivalDateTime

public java.util.Date getArrivalDateTime()
Get the 'ArrivalDateTime' attribute value.

Returns:
value

setArrivalDateTime

public void setArrivalDateTime(java.util.Date arrivalDateTime)
Set the 'ArrivalDateTime' attribute value.

Parameters:
arrivalDateTime -

getTrainNumber

public java.lang.String getTrainNumber()
Get the 'TrainNumber' attribute value. The train number assigned to this journey.

Returns:
value

setTrainNumber

public void setTrainNumber(java.lang.String trainNumber)
Set the 'TrainNumber' attribute value. The train number assigned to this journey.

Parameters:
trainNumber -

getStopQuantity

public java.lang.Integer getStopQuantity()
Get the 'StopQuantity' attribute value. The number of stops the train makes

Returns:
value

setStopQuantity

public void setStopQuantity(java.lang.Integer stopQuantity)
Set the 'StopQuantity' attribute value. The number of stops the train makes

Parameters:
stopQuantity -

getJourneyDuration

public java.lang.String getJourneyDuration()
Get the 'JourneyDuration' attribute value. The duration of the train from departure location to destination location.

Returns:
value

setJourneyDuration

public void setJourneyDuration(java.lang.String journeyDuration)
Set the 'JourneyDuration' attribute value. The duration of the train from departure location to destination location.

Parameters:
journeyDuration -

getSmokingAllowed

public java.lang.Boolean getSmokingAllowed()
Get the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. false

Returns:
value

setSmokingAllowed

public void setSmokingAllowed(java.lang.Boolean smokingAllowed)
Set the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. false

Parameters:
smokingAllowed -

getTrainService

public java.lang.String getTrainService()
Get the 'TrainServiceType' attribute value.

Returns:
value

setTrainService

public void setTrainService(java.lang.String trainService)
Set the 'TrainServiceType' attribute value.

Parameters:
trainService -

getCrossBorder

public java.lang.Boolean getCrossBorder()
Get the 'CrossBorder' attribute value. false

Returns:
value

setCrossBorder

public void setCrossBorder(java.lang.Boolean crossBorder)
Set the 'CrossBorder' attribute value. false

Parameters:
crossBorder -

getSeatAssignable

public java.lang.Boolean getSeatAssignable()
Get the 'SeatAssignable' attribute value.

Returns:
value

setSeatAssignable

public void setSeatAssignable(java.lang.Boolean seatAssignable)
Set the 'SeatAssignable' attribute value.

Parameters:
seatAssignable -