Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.air;
  
  import java.util.List;
Provides the capability to respond to a demand ticket request, returning minimal information about the ticket that was issued. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OTA_AirDemandTicketRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence>
         <xs:element type="ns:SuccessType" name="Success"/>
         <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         <xs:element type="ns:UniqueID_Type" name="BookingReferenceID" minOccurs="0"/>
         <xs:element name="TicketItemInfo" minOccurs="0" maxOccurs="99">
           <!-- Reference to inner class TicketItemInfo -->
         </xs:element>
         <xs:element name="QueuePNR" minOccurs="0">
           <!-- Reference to inner class QueuePNR -->
         </xs:element>
         <xs:element type="ns:FreeTextType" name="Comment" minOccurs="0"/>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class DemandTicketRS
 {
     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 UniqueID bookingReferenceID;
     private QueuePNR queuePNR;
     private FreeText comment;
     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. The presence of the empty Success element explicitly indicates that the OpenTravel message succeeded.

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

    
Set the 'Success' element value. The presence of the empty Success element explicitly indicates that the OpenTravel message succeeded.

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

    
Get the 'Warnings' element value. Used in conjunction with the Success element to define one or more business errors.

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

    
Set the 'Warnings' element value. Used in conjunction with the Success element to define one or more business errors.

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

    
Get the 'BookingReferenceID' element value. The PNR record locator for which a ticket was issued.

Returns:
value
    public UniqueID getBookingReferenceID() {
        return ;
    }

    
Set the 'BookingReferenceID' element value. The PNR record locator for which a ticket was issued.

Parameters:
bookingReferenceID
    public void setBookingReferenceID(UniqueID bookingReferenceID) {
        this. = bookingReferenceID;
    }

    
Get the list of 'TicketItemInfo' element items.

Returns:
list
        return ;
    }

    
Set the list of 'TicketItemInfo' element items.

Parameters:
list
    public void setTicketItemInfoList(List<TicketItemInfolist) {
         = list;
    }

    
Get the number of 'TicketItemInfo' element items.

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

    
Add a 'TicketItemInfo' element item.

Parameters:
item
    public void addTicketItemInfo(TicketItemInfo item) {
        .add(item);
    }

    
Get 'TicketItemInfo' element item by position.

Parameters:
index
Returns:
item
    public TicketItemInfo getTicketItemInfo(int index) {
        return .get(index);
    }

    
Remove all 'TicketItemInfo' element items.
    public void clearTicketItemInfoList() {
        .clear();
    }

    
Get the 'QueuePNR' element value.

Returns:
value
    public QueuePNR getQueuePNR() {
        return ;
    }

    
Set the 'QueuePNR' element value.

Parameters:
queuePNR
    public void setQueuePNR(QueuePNR queuePNR) {
        this. = queuePNR;
    }

    
Get the 'Comment' element value. A comment associated with the ticket.

Returns:
value
    public FreeText getComment() {
        return ;
    }

    
Set the 'Comment' element value. A comment associated with the ticket.

Parameters:
comment
    public void setComment(FreeText comment) {
        this. = comment;
    }

    
Check if Errors is current selection for choice.

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

    
Get the 'Errors' element value. Errors are returned if the request was unable to be processed.

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

    
Set the 'Errors' element value. Errors are returned if the request was unable to be processed.

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

    
Get the 'OTA_PayloadStdAttributes' attributeGroup value. The standard attributes that appear on the root element for all OpenTravel messages.

Returns:
value
        return ;
    }

    
Set the 'OTA_PayloadStdAttributes' attributeGroup value. The standard attributes that appear on the root element for all OpenTravel messages.

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }
    
Information for the ticket that was issued. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="TicketItemInfo" minOccurs="0" maxOccurs="99">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="PassengerName" minOccurs="0">
         <!-- Reference to inner class PassengerName -->
       </xs:element>
       <xs:element name="ConjunctiveTicket" minOccurs="0" maxOccurs="3">
         <!-- Reference to inner class ConjunctiveTicket -->
       </xs:element>
     </xs:sequence>
     <xs:attribute type="xs:string" use="optional" name="TicketNumber"/>
     <xs:attribute type="ns:TicketType" use="optional" name="Type"/>
     <xs:attribute type="xs:string" use="optional" name="ItemNumber"/>
     <xs:attribute type="xs:string" use="optional" name="InvoiceNumber"/>
     <xs:attribute type="xs:float" use="optional" name="TotalAmount"/>
     <xs:attribute type="xs:float" use="optional" name="CommissionAmount"/>
     <xs:attribute type="xs:string" use="optional" name="PaymentType"/>
     <xs:attribute type="xs:float" use="optional" name="NetAmount"/>
     <xs:attribute type="xs:string" use="optional" name="TicketingStatus"/>
   </xs:complexType>
 </xs:element>
 
    public static class TicketItemInfo
    {
        private PassengerName passengerName;
        private String ticketNumber;
        private Ticket type;
        private String itemNumber;
        private String invoiceNumber;
        private Float totalAmount;
        private Float commissionAmount;
        private String payment;
        private Float netAmount;
        private String ticketingStatus;

        
Get the 'PassengerName' element value.

Returns:
value
        public PassengerName getPassengerName() {
            return ;
        }

        
Set the 'PassengerName' element value.

Parameters:
passengerName
        public void setPassengerName(PassengerName passengerName) {
            this. = passengerName;
        }

        
Get the list of 'ConjunctiveTicket' element items.

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

        
Set the list of 'ConjunctiveTicket' element items.

Parameters:
list
        public void setConjunctiveTicketList(List<ConjunctiveTicketlist) {
             = list;
        }

        
Get the number of 'ConjunctiveTicket' element items.

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

        
Add a 'ConjunctiveTicket' element item.

Parameters:
item
        public void addConjunctiveTicket(ConjunctiveTicket item) {
            .add(item);
        }

        
Get 'ConjunctiveTicket' element item by position.

Parameters:
index
Returns:
item
        public ConjunctiveTicket getConjunctiveTicket(int index) {
            return .get(index);
        }

        
Remove all 'ConjunctiveTicket' element items.
        public void clearConjunctiveTicketList() {
            .clear();
        }

        
Get the 'TicketNumber' attribute value. The number of the document that was issued.

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

        
Set the 'TicketNumber' attribute value. The number of the document that was issued.

Parameters:
ticketNumber
        public void setTicketNumber(String ticketNumber) {
            this. = ticketNumber;
        }

        
Get the 'Type' attribute value. The type of document that was issued (e.g., electronic ticket, MCO).

Returns:
value
        public Ticket getType() {
            return ;
        }

        
Set the 'Type' attribute value. The type of document that was issued (e.g., electronic ticket, MCO).

Parameters:
type
        public void setType(Ticket type) {
            this. = type;
        }

        
Get the 'ItemNumber' attribute value. The number associated with the document for back office accounting purposes.

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

        
Set the 'ItemNumber' attribute value. The number associated with the document for back office accounting purposes.

Parameters:
itemNumber
        public void setItemNumber(String itemNumber) {
            this. = itemNumber;
        }

        
Get the 'InvoiceNumber' attribute value. The invoice number associated with the document that was issued.

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

        
Set the 'InvoiceNumber' attribute value. The invoice number associated with the document that was issued.

Parameters:
invoiceNumber
        public void setInvoiceNumber(String invoiceNumber) {
            this. = invoiceNumber;
        }

        
Get the 'TotalAmount' attribute value. The gross total amount of the ticket.

Returns:
value
        public Float getTotalAmount() {
            return ;
        }

        
Set the 'TotalAmount' attribute value. The gross total amount of the ticket.

Parameters:
totalAmount
        public void setTotalAmount(Float totalAmount) {
            this. = totalAmount;
        }

        
Get the 'CommissionAmount' attribute value. The amount of commission that will be paid.

Returns:
value
        public Float getCommissionAmount() {
            return ;
        }

        
Set the 'CommissionAmount' attribute value. The amount of commission that will be paid.

Parameters:
commissionAmount
        public void setCommissionAmount(Float commissionAmount) {
            this. = commissionAmount;
        }

        
Get the 'PaymentType' attribute value. The form of payment for the ticket. Refer to OpenTravel Code list Payment Type (PMT).

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

        
Set the 'PaymentType' attribute value. The form of payment for the ticket. Refer to OpenTravel Code list Payment Type (PMT).

Parameters:
payment
        public void setPayment(String payment) {
            this. = payment;
        }

        
Get the 'NetAmount' attribute value. The monetary value of the ticket after any applicable deductions have been made to the total (i.e., gross) amount.

Returns:
value
        public Float getNetAmount() {
            return ;
        }

        
Set the 'NetAmount' attribute value. The monetary value of the ticket after any applicable deductions have been made to the total (i.e., gross) amount.

Parameters:
netAmount
        public void setNetAmount(Float netAmount) {
            this. = netAmount;
        }

        
Get the 'TicketingStatus' attribute value. The status of the ticket. Refer to OpenTravel Code List Ticketing Status (TST).

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

        
Set the 'TicketingStatus' attribute value. The status of the ticket. Refer to OpenTravel Code List Ticketing Status (TST).

Parameters:
ticketingStatus
        public void setTicketingStatus(String ticketingStatus) {
            this. = ticketingStatus;
        }
        
The name of the person for whom the ticket was issued. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="PassengerName" minOccurs="0">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:PersonNameType">
         <xs:attribute type="xs:string" use="optional" name="PassengerTypeCode"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class PassengerName extends PersonName
        {
            private String passengerTypeCode;

            
Get the 'PassengerTypeCode' attribute value. Used to identify the PTC code (passenger type code) for the passenger (e.g. infant).

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

            
Set the 'PassengerTypeCode' attribute value. Used to identify the PTC code (passenger type code) for the passenger (e.g. infant).

Parameters:
passengerTypeCode
            public void setPassengerTypeCode(String passengerTypeCode) {
                this. = passengerTypeCode;
            }
        }
        
Used to specify conjunctive ticket/document numbers. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ConjunctiveTicket" minOccurs="0" maxOccurs="3">
   <xs:complexType>
     <xs:attribute type="xs:string" use="required" name="TicketNumber"/>
   </xs:complexType>
 </xs:element>
 
        public static class ConjunctiveTicket
        {
            private String ticketNumber;

            
Get the 'TicketNumber' attribute value. The number of the conjunctive ticket/document that was issued.

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

            
Set the 'TicketNumber' attribute value. The number of the conjunctive ticket/document that was issued.

Parameters:
ticketNumber
            public void setTicketNumber(String ticketNumber) {
                this. = ticketNumber;
            }
        }
    }
    
Information to specify which queue a PNR was placed on after the ticket was isssued. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="QueuePNR" minOccurs="0">
   <xs:complexType>
     <xs:attributeGroup ref="ns:QueueGroup"/>
     <xs:attribute type="xs:string" use="optional" name="Date"/>
     <xs:attribute type="xs:int" use="optional" name="DateRangeNumber"/>
   </xs:complexType>
 </xs:element>
 
    public static class QueuePNR
    {
        private QueueGroup queueGroup;
        private String date;
        private Integer dateRangeNumber;

        
Get the 'QueueGroup' attributeGroup value. Information to identify a queue.

Returns:
value
        public QueueGroup getQueueGroup() {
            return ;
        }

        
Set the 'QueueGroup' attributeGroup value. Information to identify a queue.

Parameters:
queueGroup
        public void setQueueGroup(QueueGroup queueGroup) {
            this. = queueGroup;
        }

        
Get the 'Date' attribute value. The month and day of the queue on which the PNR is to be placed.

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

        
Set the 'Date' attribute value. The month and day of the queue on which the PNR is to be placed.

Parameters:
date
        public void setDate(String date) {
            this. = date;
        }

        
Get the 'DateRangeNumber' attribute value. A number specifying a range of days (e.g., today plus 3, today plus 6) for the queue on which the PNR is to be placed.

Returns:
value
        public Integer getDateRangeNumber() {
            return ;
        }

        
Set the 'DateRangeNumber' attribute value. A number specifying a range of days (e.g., today plus 3, today plus 6) for the queue on which the PNR is to be placed.

Parameters:
dateRangeNumber
        public void setDateRangeNumber(Integer dateRangeNumber) {
            this. = dateRangeNumber;
        }
    }
New to GrepCode? Check out our FAQ X