org.ota.rail
Class JourneySegment

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

public class JourneySegment
extends java.lang.Object

Any valid journey leg type. 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="JourneySegmentType">
   <xs:choice>
     <xs:element name="TrainSegment">
       <xs:complexType>
         <xs:complexContent>
           <xs:extension base="ns:TrainSegmentType">
             <xs:sequence>
               <xs:element type="ns:LocationType" name="TrainOrigin" minOccurs="0"/>
               <xs:element type="ns:LocationType" name="TrainDestination" minOccurs="0"/>
               <xs:element name="ClassCodes">
                 <xs:complexType>
                   <xs:sequence>
                     <xs:element name="ClassCode" maxOccurs="9">
                       <xs:complexType>
                         <xs:attributeGroup ref="ns:CodeListGroup"/>
                       </xs:complexType>
                     </xs:element>
                   </xs:sequence>
                 </xs:complexType>
               </xs:element>
               <xs:element type="ns:VendorMessagesType" name="VendorMessages" minOccurs="0"/>
             </xs:sequence>
             <xs:attribute type="xs:float" use="optional" name="OnTimeRate"/>
           </xs:extension>
         </xs:complexContent>
       </xs:complexType>
     </xs:element>
     <xs:element name="NonTrainSegment">
       <xs:complexType>
         <xs:sequence>
           <xs:element type="ns:LocationType" name="Origin"/>
           <xs:element type="ns:LocationType" name="Destination"/>
         </xs:sequence>
         <xs:attribute type="xs:string" use="required" name="LegRef"/>
         <xs:attribute type="xs:string" use="required" name="TransportationCode"/>
         <xs:attribute type="xs:time" name="TransitTime"/>
         <xs:attribute type="xs:time" name="ChangeTime"/>
       </xs:complexType>
     </xs:element>
   </xs:choice>
 </xs:complexType>
 


Constructor Summary
JourneySegment()
           
 
Method Summary
 void addTrainSegmentClassCode(CodeListGroup item)
          Add a 'ClassCode' element item.
 void clearChoiceSelect()
          Clear the choice selection.
 void clearTrainSegmentClassCodes()
          Remove all 'ClassCode' element items.
 java.sql.Time getNonTrainSegmentChangeTime()
          Get the 'ChangeTime' attribute value.
 Location getNonTrainSegmentDestination()
          Get the 'Destination' element value.
 java.lang.String getNonTrainSegmentLegRef()
          Get the 'LegRef' attribute value.
 Location getNonTrainSegmentOrigin()
          Get the 'Origin' element value.
 java.sql.Time getNonTrainSegmentTransitTime()
          Get the 'TransitTime' attribute value.
 java.lang.String getNonTrainSegmentTransportationCode()
          Get the 'TransportationCode' attribute value.
 CodeListGroup getTrainSegmentClassCode(int index)
          Get 'ClassCode' element item by position.
 java.util.List<CodeListGroup> getTrainSegmentClassCodes()
          Get the list of 'ClassCode' element items.
 java.lang.Float getTrainSegmentOnTimeRate()
          Get the 'OnTimeRate' attribute value.
 Location getTrainSegmentTrainDestination()
          Get the 'TrainDestination' element value.
 Location getTrainSegmentTrainOrigin()
          Get the 'TrainOrigin' element value.
 TrainSegment getTrainSegmentTrainSegment()
          Get the extension value.
 VendorMessages getTrainSegmentVendorMessages()
          Get the 'VendorMessages' element value.
 boolean ifNonTrainSegment()
          Check if NonTrainSegment is current selection for choice.
 boolean ifTrainSegment()
          Check if TrainSegment is current selection for choice.
 void setNonTrainSegmentChangeTime(java.sql.Time nonTrainSegmentChangeTime)
          Set the 'ChangeTime' attribute value.
 void setNonTrainSegmentDestination(Location nonTrainSegmentDestination)
          Set the 'Destination' element value.
 void setNonTrainSegmentLegRef(java.lang.String nonTrainSegmentLegRef)
          Set the 'LegRef' attribute value.
 void setNonTrainSegmentOrigin(Location nonTrainSegmentOrigin)
          Set the 'Origin' element value.
 void setNonTrainSegmentTransitTime(java.sql.Time nonTrainSegmentTransitTime)
          Set the 'TransitTime' attribute value.
 void setNonTrainSegmentTransportationCode(java.lang.String nonTrainSegmentTransportationCode)
          Set the 'TransportationCode' attribute value.
 void setTrainSegmentClassCodes(java.util.List<CodeListGroup> list)
          Set the list of 'ClassCode' element items.
 void setTrainSegmentOnTimeRate(java.lang.Float trainSegmentOnTimeRate)
          Set the 'OnTimeRate' attribute value.
 void setTrainSegmentTrainDestination(Location trainSegmentTrainDestination)
          Set the 'TrainDestination' element value.
 void setTrainSegmentTrainOrigin(Location trainSegmentTrainOrigin)
          Set the 'TrainOrigin' element value.
 void setTrainSegmentTrainSegment(TrainSegment trainSegmentTrainSegment)
          Set the extension value.
 void setTrainSegmentVendorMessages(VendorMessages trainSegmentVendorMessages)
          Set the 'VendorMessages' element value.
 int sizeTrainSegmentClassCodes()
          Get the number of 'ClassCode' element items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JourneySegment

public JourneySegment()
Method Detail

clearChoiceSelect

public void clearChoiceSelect()
Clear the choice selection.


ifTrainSegment

public boolean ifTrainSegment()
Check if TrainSegment is current selection for choice.

Returns:
true if selection, false if not

getTrainSegmentTrainSegment

public TrainSegment getTrainSegmentTrainSegment()
Get the extension value.

Returns:
value

setTrainSegmentTrainSegment

public void setTrainSegmentTrainSegment(TrainSegment trainSegmentTrainSegment)
Set the extension value.

Parameters:
trainSegmentTrainSegment -

getTrainSegmentTrainOrigin

public Location getTrainSegmentTrainOrigin()
Get the 'TrainOrigin' element value. Represents the start location of this train service.

Returns:
value

setTrainSegmentTrainOrigin

public void setTrainSegmentTrainOrigin(Location trainSegmentTrainOrigin)
Set the 'TrainOrigin' element value. Represents the start location of this train service.

Parameters:
trainSegmentTrainOrigin -

getTrainSegmentTrainDestination

public Location getTrainSegmentTrainDestination()
Get the 'TrainDestination' element value. Represents the final destination location of this train service.

Returns:
value

setTrainSegmentTrainDestination

public void setTrainSegmentTrainDestination(Location trainSegmentTrainDestination)
Set the 'TrainDestination' element value. Represents the final destination location of this train service.

Parameters:
trainSegmentTrainDestination -

getTrainSegmentClassCodes

public java.util.List<CodeListGroup> getTrainSegmentClassCodes()
Get the list of 'ClassCode' element items. Collection of codes identifying the class of service or accommodations.

Returns:
list

setTrainSegmentClassCodes

public void setTrainSegmentClassCodes(java.util.List<CodeListGroup> list)
Set the list of 'ClassCode' element items. Collection of codes identifying the class of service or accommodations.

Parameters:
list -

sizeTrainSegmentClassCodes

public int sizeTrainSegmentClassCodes()
Get the number of 'ClassCode' element items.

Returns:
count

addTrainSegmentClassCode

public void addTrainSegmentClassCode(CodeListGroup item)
Add a 'ClassCode' element item.

Parameters:
item -

getTrainSegmentClassCode

public CodeListGroup getTrainSegmentClassCode(int index)
Get 'ClassCode' element item by position.

Parameters:
index -
Returns:
item

clearTrainSegmentClassCodes

public void clearTrainSegmentClassCodes()
Remove all 'ClassCode' element items.


getTrainSegmentVendorMessages

public VendorMessages getTrainSegmentVendorMessages()
Get the 'VendorMessages' element value. A collection of special comments on the segment.

Returns:
value

setTrainSegmentVendorMessages

public void setTrainSegmentVendorMessages(VendorMessages trainSegmentVendorMessages)
Set the 'VendorMessages' element value. A collection of special comments on the segment.

Parameters:
trainSegmentVendorMessages -

getTrainSegmentOnTimeRate

public java.lang.Float getTrainSegmentOnTimeRate()
Get the 'OnTimeRate' attribute value. Specifies the Dept. of Transport on time rate of the train.

Returns:
value

setTrainSegmentOnTimeRate

public void setTrainSegmentOnTimeRate(java.lang.Float trainSegmentOnTimeRate)
Set the 'OnTimeRate' attribute value. Specifies the Dept. of Transport on time rate of the train.

Parameters:
trainSegmentOnTimeRate -

ifNonTrainSegment

public boolean ifNonTrainSegment()
Check if NonTrainSegment is current selection for choice.

Returns:
true if selection, false if not

getNonTrainSegmentOrigin

public Location getNonTrainSegmentOrigin()
Get the 'Origin' element value. Represents an origin location code.

Returns:
value

setNonTrainSegmentOrigin

public void setNonTrainSegmentOrigin(Location nonTrainSegmentOrigin)
Set the 'Origin' element value. Represents an origin location code.

Parameters:
nonTrainSegmentOrigin -

getNonTrainSegmentDestination

public Location getNonTrainSegmentDestination()
Get the 'Destination' element value. Represents a destination location code.

Returns:
value

setNonTrainSegmentDestination

public void setNonTrainSegmentDestination(Location nonTrainSegmentDestination)
Set the 'Destination' element value. Represents a destination location code.

Parameters:
nonTrainSegmentDestination -

getNonTrainSegmentLegRef

public java.lang.String getNonTrainSegmentLegRef()
Get the 'LegRef' attribute value.

Returns:
value

setNonTrainSegmentLegRef

public void setNonTrainSegmentLegRef(java.lang.String nonTrainSegmentLegRef)
Set the 'LegRef' attribute value.

Parameters:
nonTrainSegmentLegRef -

getNonTrainSegmentTransportationCode

public java.lang.String getNonTrainSegmentTransportationCode()
Get the 'TransportationCode' attribute value. Specifies the method of getting from the origni to the destination of this segment (e.g. walk, bus). Refer to OpenTravel Code List Transportation Code (TRP).

Returns:
value

setNonTrainSegmentTransportationCode

public void setNonTrainSegmentTransportationCode(java.lang.String nonTrainSegmentTransportationCode)
Set the 'TransportationCode' attribute value. Specifies the method of getting from the origni to the destination of this segment (e.g. walk, bus). Refer to OpenTravel Code List Transportation Code (TRP).

Parameters:
nonTrainSegmentTransportationCode -

getNonTrainSegmentTransitTime

public java.sql.Time getNonTrainSegmentTransitTime()
Get the 'TransitTime' attribute value. The time required to traverse this leg.

Returns:
value

setNonTrainSegmentTransitTime

public void setNonTrainSegmentTransitTime(java.sql.Time nonTrainSegmentTransitTime)
Set the 'TransitTime' attribute value. The time required to traverse this leg.

Parameters:
nonTrainSegmentTransitTime -

getNonTrainSegmentChangeTime

public java.sql.Time getNonTrainSegmentChangeTime()
Get the 'ChangeTime' attribute value. The time to change to and from this leg. When this leg is the first or the last leg of a journey, the time will be half that of the same leg in the middle of another journey.

Returns:
value

setNonTrainSegmentChangeTime

public void setNonTrainSegmentChangeTime(java.sql.Time nonTrainSegmentChangeTime)
Set the 'ChangeTime' attribute value. The time to change to and from this leg. When this leg is the first or the last leg of a journey, the time will be half that of the same leg in the middle of another journey.

Parameters:
nonTrainSegmentChangeTime -