Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.rail;
  
  import java.util.List;
The OpenTravel Rail Price response message may return: - A success indicator with rail price details - A business warning with or without rail price details - An error response (indicating why the message could not be processed) with no rail price details as the request has not been processed If successfully processed, the Rail Price response information includes a priced itinerary with some or all of the following information: - Pricing information for a rail itinerary, including the total price for the rail itinerary and pricing details, e.g. summary or detailed basic fare, discounts, service charges, fare adjustments, fees and taxes. - Journey information from one specific origin to one specific destination, including train segment and pricing details - Passenger information, including occupation, age qualifier, disability, loyalty program, personal identification and contact information - Notes associated with the priced itinerary 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="OTA_RailPriceRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence>
         <xs:element type="ns:SuccessType" name="Success"/>
         <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         <xs:element name="PricedItinerary">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="RailItineraryPrice" minOccurs="0">
                 <!-- Reference to inner class RailItineraryPrice -->
               </xs:element>
               <xs:element name="OriginDestination" maxOccurs="9">
                 <!-- Reference to inner class OriginDestination -->
               </xs:element>
               <xs:element type="ns:RailPassengerCategoryDetailType" name="PassengerInfo" maxOccurs="99"/>
               <xs:element type="ns:FreeTextType" name="Note" minOccurs="0" maxOccurs="5"/>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class PriceRS
 {
     private int choiceSelect = -1;
     private static final int SUCCESS_CHOICE = 0;
     private static final int ERRORS_CHOICE = 1;
     private Success success;
     private Warnings warnings;
     private List<FreeTextpricedItineraryNoteList = new ArrayList<FreeText>();
     private Errors errors;
 
     private void setChoiceSelect(int choice) {
         if ( == -1) {
              = choice;
         } else if ( != choice) {
             throw new IllegalStateException(
                     "Need to call clearChoiceSelect() before changing existing choice");
         }
     }

    
Clear the choice selection.
 
     public void clearChoiceSelect() {
          = -1;
     }

    
Check if Success is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifSuccess() {
         return  == ;
     }

    
Get the 'Success' element value. An element that is not intended to contain any data. The mere presence of a success element within the response message indicates that the incoming request message was processed successfully.

Returns:
value
    public Success getSuccess() {
        return ;
    }

    
Set the 'Success' element value. An element that is not intended to contain any data. The mere presence of a success element within the response message indicates that the incoming request message was processed successfully.

Parameters:
success
    public void setSuccess(Success success) {
        this. = success;
    }

    
Get the 'Warnings' element value. Indicates that the recipient of the request message identified one or more business-level warnings/errors, but the message itself was successfully processed.

Returns:
value
    public Warnings getWarnings() {
        return ;
    }

    
Set the 'Warnings' element value. Indicates that the recipient of the request message identified one or more business-level warnings/errors, but the message itself was successfully processed.

Parameters:
warnings
    public void setWarnings(Warnings warnings) {
        this. = warnings;
    }

    
Get the 'RailItineraryPrice' element value. Summary fare information applicable to the total journey, including total fare, basic fare, discounts applied, etc.

Returns:
value
        return ;
    }

    
Set the 'RailItineraryPrice' element value. Summary fare information applicable to the total journey, including total fare, basic fare, discounts applied, etc.

Parameters:
railItineraryPrice
    public void setRailItineraryPrice(RailItineraryPrice railItineraryPrice) {
        this. = railItineraryPrice;
    }

    
Get the list of 'OriginDestination' element items. Summary fare information applicable to the total journey, including total fare, basic fare, discounts applied, etc.

Returns:
list
        return ;
    }

    
Set the list of 'OriginDestination' element items. Summary fare information applicable to the total journey, including total fare, basic fare, discounts applied, etc.

Parameters:
list
    public void setOriginDestinationList(List<OriginDestinationlist) {
         = list;
    }

    
Get the number of 'OriginDestination' element items.

Returns:
count
    public int sizeOriginDestinationList() {
        return .size();
    }

    
Add a 'OriginDestination' element item.

Parameters:
item
    public void addOriginDestination(OriginDestination item) {
        .add(item);
    }

    
Get 'OriginDestination' element item by position.

Parameters:
index
Returns:
item
    public OriginDestination getOriginDestination(int index) {
        return .get(index);
    }

    
Remove all 'OriginDestination' element items.
    public void clearOriginDestinationList() {
        .clear();
    }

    
Get the list of 'PassengerInfo' element items. Passenger information, including occupation, age qualifier, disability, loyalty program, personal identification and contact information.

Returns:
list
        return ;
    }

    
Set the list of 'PassengerInfo' element items. Passenger information, including occupation, age qualifier, disability, loyalty program, personal identification and contact information.

Parameters:
list
            List<RailPassengerCategoryDetaillist) {
         = list;
    }

    
Get the number of 'PassengerInfo' element items.

Returns:
count
    public int sizePricedItineraryPassengerInfoList() {
        return .size();
    }

    
Add a 'PassengerInfo' element item.

Parameters:
item
    }

    
Get 'PassengerInfo' element item by position.

Parameters:
index
Returns:
item
        return .get(index);
    }

    
Remove all 'PassengerInfo' element items.
    public void clearPricedItineraryPassengerInfoList() {
    }

    
Get the list of 'Note' element items. A description of the priced itinerary.

Returns:
list
        return ;
    }

    
Set the list of 'Note' element items. A description of the priced itinerary.

Parameters:
list
    public void setPricedItineraryNoteList(List<FreeTextlist) {
         = list;
    }

    
Get the number of 'Note' element items.

Returns:
count
    public int sizePricedItineraryNoteList() {
        return .size();
    }

    
Add a 'Note' element item.

Parameters:
item
    public void addPricedItineraryNote(FreeText item) {
        .add(item);
    }

    
Get 'Note' element item by position.

Parameters:
index
Returns:
item
    public FreeText getPricedItineraryNote(int index) {
        return .get(index);
    }

    
Remove all 'Note' element items.
    public void clearPricedItineraryNoteList() {
    }

    
Check if Errors is current selection for choice.

Returns:
true if selection, false if not
    public boolean ifErrors() {
        return  == ;
    }

    
Get the 'Errors' element value. Indicates that an error occurred in the processing of the incoming request message. An error is defined as a malformed XML message that could not be processed.

Returns:
value
    public Errors getErrors() {
        return ;
    }

    
Set the 'Errors' element value. Indicates that an error occurred in the processing of the incoming request message. An error is defined as a malformed XML message that could not be processed.

Parameters:
errors
    public void setErrors(Errors errors) {
        this. = errors;
    }

    
Get the 'OTA_PayloadStdAttributes' attributeGroup value.

Returns:
value
        return ;
    }

    
Set the 'OTA_PayloadStdAttributes' attributeGroup value.

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }
    
Pricing information for a rail itinerary. 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="RailItineraryPrice" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="TotalPrice" minOccurs="0">
         <xs:complexType>
           <xs:attributeGroup ref="ns:CurrencyAmountGroup"/>
         </xs:complexType>
       </xs:element>
       <xs:element name="PriceDetail" maxOccurs="99">
         <!-- Reference to inner class PriceDetail -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class RailItineraryPrice
    {
        private CurrencyAmountGroup totalPrice;
        private List<PriceDetailpriceDetailList = new ArrayList<PriceDetail>();

        
Get the 'CurrencyAmountGroup' attributeGroup value. The total price for the rail itinerary.

Returns:
value
        public CurrencyAmountGroup getTotalPrice() {
            return ;
        }

        
Set the 'CurrencyAmountGroup' attributeGroup value. The total price for the rail itinerary.

Parameters:
totalPrice
        public void setTotalPrice(CurrencyAmountGroup totalPrice) {
            this. = totalPrice;
        }

        
Get the list of 'PriceDetail' element items.

Returns:
list
        public List<PriceDetailgetPriceDetailList() {
            return ;
        }

        
Set the list of 'PriceDetail' element items.

Parameters:
list
        public void setPriceDetailList(List<PriceDetaillist) {
             = list;
        }

        
Get the number of 'PriceDetail' element items.

Returns:
count
        public int sizePriceDetailList() {
            return .size();
        }

        
Add a 'PriceDetail' element item.

Parameters:
item
        public void addPriceDetail(PriceDetail item) {
            .add(item);
        }

        
Get 'PriceDetail' element item by position.

Parameters:
index
Returns:
item
        public PriceDetail getPriceDetail(int index) {
            return .get(index);
        }

        
Remove all 'PriceDetail' element items.
        public void clearPriceDetailList() {
            .clear();
        }
        
Pricing details for a rail itinerary, including summary or detailed basic fare, discounts, service charges, fare adjustments, fees and taxes. 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="PriceDetail" maxOccurs="99">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:RailPriceType">
         <xs:attribute type="xs:anySimpleType" name="PassengerCategoryRPH"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class PriceDetail extends RailPrice
        {
            private String passengerCategoryRPH;

            
Get the 'PassengerCategoryRPH' attribute value. Reference to a passenger category within the same xml data instance.

Returns:
value
            public String getPassengerCategoryRPH() {
                return ;
            }

            
Set the 'PassengerCategoryRPH' attribute value. Reference to a passenger category within the same xml data instance.

Parameters:
passengerCategoryRPH
            public void setPassengerCategoryRPH(String passengerCategoryRPH) {
                this. = passengerCategoryRPH;
            }
        }
    }
    
Journey information from one specific origin to one specific destination, including train segment and pricing details. 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="OriginDestination" maxOccurs="9">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="ns:LocationType" name="OriginLocation"/>
       <xs:element type="ns:LocationType" name="DestinationLocation"/>
       <xs:element name="TrainSegment" minOccurs="0" maxOccurs="9">
         <!-- Reference to inner class TrainSegment -->
       </xs:element>
       <xs:element name="PriceDetail" maxOccurs="99">
         <!-- Reference to inner class PriceDetail -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class OriginDestination
    {
        private Location originLocation;
        private Location destinationLocation;
        private List<TrainSegmenttrainSegmentList = new ArrayList<TrainSegment>();
        private List<PriceDetailpriceDetailList = new ArrayList<PriceDetail>();

        
Get the 'OriginLocation' element value. Travel origin location.

Returns:
value
        public Location getOriginLocation() {
            return ;
        }

        
Set the 'OriginLocation' element value. Travel origin location.

Parameters:
originLocation
        public void setOriginLocation(Location originLocation) {
            this. = originLocation;
        }

        
Get the 'DestinationLocation' element value. Travel destinationlocation.

Returns:
value
        public Location getDestinationLocation() {
            return ;
        }

        
Set the 'DestinationLocation' element value. Travel destinationlocation.

Parameters:
destinationLocation
        public void setDestinationLocation(Location destinationLocation) {
            this. = destinationLocation;
        }

        
Get the list of 'TrainSegment' element items.

Returns:
list
        public List<TrainSegmentgetTrainSegmentList() {
            return ;
        }

        
Set the list of 'TrainSegment' element items.

Parameters:
list
        public void setTrainSegmentList(List<TrainSegmentlist) {
             = list;
        }

        
Get the number of 'TrainSegment' element items.

Returns:
count
        public int sizeTrainSegmentList() {
            return .size();
        }

        
Add a 'TrainSegment' element item.

Parameters:
item
        public void addTrainSegment(TrainSegment item) {
            .add(item);
        }

        
Get 'TrainSegment' element item by position.

Parameters:
index
Returns:
item
        public TrainSegment getTrainSegment(int index) {
            return .get(index);
        }

        
Remove all 'TrainSegment' element items.
        public void clearTrainSegmentList() {
            .clear();
        }

        
Get the list of 'PriceDetail' element items.

Returns:
list
        public List<PriceDetailgetPriceDetailList() {
            return ;
        }

        
Set the list of 'PriceDetail' element items.

Parameters:
list
        public void setPriceDetailList(List<PriceDetaillist) {
             = list;
        }

        
Get the number of 'PriceDetail' element items.

Returns:
count
        public int sizePriceDetailList() {
            return .size();
        }

        
Add a 'PriceDetail' element item.

Parameters:
item
        public void addPriceDetail(PriceDetail item) {
            .add(item);
        }

        
Get 'PriceDetail' element item by position.

Parameters:
index
Returns:
item
        public PriceDetail getPriceDetail(int index) {
            return .get(index);
        }

        
Remove all 'PriceDetail' element items.
        public void clearPriceDetailList() {
            .clear();
        }
        
A collection of one or more train segments. 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="TrainSegment" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:TrainSegmentSummaryType">
         <xs:sequence>
           <xs:element name="PriceDetail" minOccurs="0" maxOccurs="99">
             <!-- Reference to inner class PriceDetail -->
           </xs:element>
         </xs:sequence>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class TrainSegment extends TrainSegmentSummary
        {
            private List<PriceDetailpriceDetailList = new ArrayList<PriceDetail>();

            
Get the list of 'PriceDetail' element items.

Returns:
list
            public List<PriceDetailgetPriceDetailList() {
                return ;
            }

            
Set the list of 'PriceDetail' element items.

Parameters:
list
            public void setPriceDetailList(List<PriceDetaillist) {
                 = list;
            }

            
Get the number of 'PriceDetail' element items.

Returns:
count
            public int sizePriceDetailList() {
                return .size();
            }

            
Add a 'PriceDetail' element item.

Parameters:
item
            public void addPriceDetail(PriceDetail item) {
                .add(item);
            }

            
Get 'PriceDetail' element item by position.

Parameters:
index
Returns:
item
            public PriceDetail getPriceDetail(int index) {
                return .get(index);
            }

            
Remove all 'PriceDetail' element items.
            public void clearPriceDetailList() {
                .clear();
            }
            
Price information, including breakdown calculated at the train segment level. Each PriceDetail element contains the fare quote corresponding to the traveler's rail accommodation and ancillary service(s). 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="PriceDetail" minOccurs="0" maxOccurs="99">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:RailPriceType">
         <xs:sequence>
           <xs:element ref="ns:AccommodationService" minOccurs="0"/>
           <xs:element name="ClassCode" minOccurs="0" maxOccurs="99">
             <xs:complexType>
               <xs:attributeGroup ref="ns:CodeGroup"/>
             </xs:complexType>
           </xs:element>
         </xs:sequence>
         <xs:attribute type="xs:string" name="PassengerCategoryRPH"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
            public static class PriceDetail extends RailPrice
            {
                private AccommodationService accommodationService;
                private List<CodeGroupclassCodeList = new ArrayList<CodeGroup>();
                private String passengerCategoryRPH;

                
Get the 'AccommodationService' element value.

Returns:
value
                public AccommodationService getAccommodationService() {
                    return ;
                }

                
Set the 'AccommodationService' element value.

Parameters:
accommodationService
                public void setAccommodationService(
                        AccommodationService accommodationService) {
                    this. = accommodationService;
                }

                
Get the list of 'ClassCode' element items. The class of inventory controlled services available.

Returns:
list
                public List<CodeGroupgetClassCodeList() {
                    return ;
                }

                
Set the list of 'ClassCode' element items. The class of inventory controlled services available.

Parameters:
list
                public void setClassCodeList(List<CodeGrouplist) {
                     = list;
                }

                
Get the number of 'ClassCode' element items.

Returns:
count
                public int sizeClassCodeList() {
                    return .size();
                }

                
Add a 'ClassCode' element item.

Parameters:
item
                public void addClassCode(CodeGroup item) {
                    .add(item);
                }

                
Get 'ClassCode' element item by position.

Parameters:
index
Returns:
item
                public CodeGroup getClassCode(int index) {
                    return .get(index);
                }

                
Remove all 'ClassCode' element items.
                public void clearClassCodeList() {
                    .clear();
                }

                
Get the 'PassengerCategoryRPH' attribute value. Reference to the passenger category.

Returns:
value
                public String getPassengerCategoryRPH() {
                    return ;
                }

                
Set the 'PassengerCategoryRPH' attribute value. Reference to the passenger category.

Parameters:
passengerCategoryRPH
                public void setPassengerCategoryRPH(String passengerCategoryRPH) {
                    this. = passengerCategoryRPH;
                }
            }
        }
        
Pricing details calculated at the origin/destination level. 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="PriceDetail" maxOccurs="99">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:RailPriceType">
         <xs:attribute type="xs:string" use="optional" name="PassengerCategoryType"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class PriceDetail extends RailPrice
        {
            private String passengerCategory;

            
Get the 'PassengerCategoryType' attribute value. Reference to passenger category within the same xml data instance.

Returns:
value
            public String getPassengerCategory() {
                return ;
            }

            
Set the 'PassengerCategoryType' attribute value. Reference to passenger category within the same xml data instance.

Parameters:
passengerCategory
            public void setPassengerCategory(String passengerCategory) {
                this. = passengerCategory;
            }
        }
    }
New to GrepCode? Check out our FAQ X