Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.fastrez;
  
  import java.util.List;
The cancel request is used to request the cancellation of a reservation. The confirmation number of the reservation as well as the guest's last name MUST be provided in order to process the request. 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_CancelRQ">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="POS">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="Source">
               <xs:complexType>
                 <xs:sequence>
                   <xs:element name="RequestorID">
                     <xs:complexType>
                       <xs:attribute type="xs:string" use="required" name="Type"/>
                       <xs:attribute type="xs:string" use="required" name="ID"/>
                       <xs:attribute type="xs:string" use="required" name="ID_Context"/>
                     </xs:complexType>
                   </xs:element>
                 </xs:sequence>
                 <xs:attribute type="xs:string" use="required" name="ISOCountry"/>
                 <xs:attribute type="xs:string" use="required" name="ISOCurrency"/>
               </xs:complexType>
             </xs:element>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="UniqueID">
         <xs:complexType>
           <xs:attribute type="xs:string" use="required" name="Type"/>
           <xs:attribute type="xs:string" use="required" name="ID"/>
           <xs:attribute type="xs:string" use="required" name="ID_Context"/>
         </xs:complexType>
       </xs:element>
       <xs:element name="Verification">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="PersonName">
               <xs:complexType>
                 <xs:sequence>
                   <xs:element type="xs:string" name="Surname"/>
                 </xs:sequence>
               </xs:complexType>
             </xs:element>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element name="Reasons" minOccurs="0">
         <!-- Reference to inner class Reasons -->
       </xs:element>
     </xs:sequence>
     <xs:attribute type="xs:string" use="optional" name="EchoToken"/>
     <xs:attribute type="xs:dateTime" use="required" name="TimeStamp"/>
     <xs:attribute type="xs:float" use="required" name="Version"/>
     <xs:attribute type="xs:string" use="required" name="PrimaryLangID"/>
     <xs:attribute use="required" name="CancelType">
       <xs:simpleType>
         <!-- Reference to inner class Cancel -->
       </xs:simpleType>
     </xs:attribute>
   </xs:complexType>
 </xs:element>
 
 
 public class CancelRQ
 {
     private String POSSourceRequestorID;
     private String POSSourceRequestorIDID;
     private String POSSourceISOCountry;
     private String POSSourceISOCurrency;
     private String uniqueID;
     private String uniqueIDID;
     private String uniqueIDIDContext;
     private String verification;
     private Reasons reasons;
     private String echoToken;
     private DateTime timeStamp;
     private Float version;
     private String primaryLangID;
     private Cancel cancel;

    
Get the 'Type' attribute value. The Type identifies the ID and MUST refer to OpenTravel Code List Unique ID Type (UIT).

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

    
Set the 'Type' attribute value. The Type identifies the ID and MUST refer to OpenTravel Code List Unique ID Type (UIT).

Parameters:
POSSourceRequestorIDType
    public void setPOSSourceRequestorIDType(String POSSourceRequestorIDType) {
         = POSSourceRequestorIDType;
    }

    
Get the 'ID' attribute value. ID MUST contain a unique identifying value for the requestor within the scope of the ID_Context.

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

    
Set the 'ID' attribute value. ID MUST contain a unique identifying value for the requestor within the scope of the ID_Context.

Parameters:
POSSourceRequestorIDID
    public void setPOSSourceRequestorIDID(String POSSourceRequestorIDID) {
        this. = POSSourceRequestorIDID;
    }

    
Get the 'ID_Context' attribute value. ID_Context MUST identify the authoritative source of the ID (e.g., IATA, ABTA).

Returns:
value
        return ;
    }

    
Set the 'ID_Context' attribute value. ID_Context MUST identify the authoritative source of the ID (e.g., IATA, ABTA).

Parameters:
POSSourceRequestorIDIDContext
            String POSSourceRequestorIDIDContext) {
        this. = POSSourceRequestorIDIDContext;
    }

    
Get the 'ISOCountry' attribute value. ISOCountry identifies the country code of the requesting party and MUST conform to ISO-3166. The country code of the requesting party MAY be used to refine responses therefore it SHOULD reflect the origin of the Guest.

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

    
Set the 'ISOCountry' attribute value. ISOCountry identifies the country code of the requesting party and MUST conform to ISO-3166. The country code of the requesting party MAY be used to refine responses therefore it SHOULD reflect the origin of the Guest.

Parameters:
POSSourceISOCountry
    public void setPOSSourceISOCountry(String POSSourceISOCountry) {
        this. = POSSourceISOCountry;
    }

    
Get the 'ISOCurrency' attribute value. ISOCurrency MUST conform to ISO 4217, 3 character codes. OpenTravel RECOMMENDS that the same currency code be used in the response, but responses MAY be returned in any valid currency.

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

    
Set the 'ISOCurrency' attribute value. ISOCurrency MUST conform to ISO 4217, 3 character codes. OpenTravel RECOMMENDS that the same currency code be used in the response, but responses MAY be returned in any valid currency.

Parameters:
POSSourceISOCurrency
    public void setPOSSourceISOCurrency(String POSSourceISOCurrency) {
        this. = POSSourceISOCurrency;
    }

    
Get the 'Type' attribute value. The Type specifies the type of ID and MUST refer to OpenTravel Code List Unique ID Type (UIT). FastRez RECOMMENDS restricting the use of the code table to code 14 - Reservation.

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

    
Set the 'Type' attribute value. The Type specifies the type of ID and MUST refer to OpenTravel Code List Unique ID Type (UIT). FastRez RECOMMENDS restricting the use of the code table to code 14 - Reservation.

Parameters:
uniqueIDType
    public void setUniqueIDType(String uniqueIDType) {
         = uniqueIDType;
    }

    
Get the 'ID' attribute value. ID MUST contain a unique identifying value for the reservation within the scope of the ID_Context.

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

    
Set the 'ID' attribute value. ID MUST contain a unique identifying value for the reservation within the scope of the ID_Context.

Parameters:
uniqueIDID
    public void setUniqueIDID(String uniqueIDID) {
        this. = uniqueIDID;
    }

    
Get the 'ID_Context' attribute value. ID Context MUST identify the authoritative source of the ID (e.g., IATA, ABTA).

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

    
Set the 'ID_Context' attribute value. ID Context MUST identify the authoritative source of the ID (e.g., IATA, ABTA).

Parameters:
uniqueIDIDContext
    public void setUniqueIDIDContext(String uniqueIDIDContext) {
        this. = uniqueIDIDContext;
    }

    
Get the 'Surname' element value. Surname MUST contain the family name (last name) of the guest as found on the reservation.

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

    
Set the 'Surname' element value. Surname MUST contain the family name (last name) of the guest as found on the reservation.

Parameters:
verification
    public void setVerification(String verification) {
        this. = verification;
    }

    
Get the 'Reasons' element value.

Returns:
value
    public Reasons getReasons() {
        return ;
    }

    
Set the 'Reasons' element value.

Parameters:
reasons
    public void setReasons(Reasons reasons) {
        this. = reasons;
    }

    
Get the 'EchoToken' attribute value. EchoToken MAY provide a reference for additional message identification, assigned by the requesting host system. This attribute SHOULD NOT be used to maintain state, but SHOULD only be used for diagnostic purposes. When a request message includes an echo token the corresponding response message MUST include an echo token with an identical value.

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

    
Set the 'EchoToken' attribute value. EchoToken MAY provide a reference for additional message identification, assigned by the requesting host system. This attribute SHOULD NOT be used to maintain state, but SHOULD only be used for diagnostic purposes. When a request message includes an echo token the corresponding response message MUST include an echo token with an identical value.

Parameters:
echoToken
    public void setEchoToken(String echoToken) {
        this. = echoToken;
    }

    
Get the 'TimeStamp' attribute value. TimeStamp MUST indicate the creation date and time of the message in UTC using the following format specified by ISO 8601; YYYY-MM-DDThh:mm:ssZ with time values using the 24 hour clock (e.g. 20 November 2003, 1:59:38 pm UTC becomes 2003-11-20T13:59:38Z).

Returns:
value
    public DateTime getTimeStamp() {
        return ;
    }

    
Set the 'TimeStamp' attribute value. TimeStamp MUST indicate the creation date and time of the message in UTC using the following format specified by ISO 8601; YYYY-MM-DDThh:mm:ssZ with time values using the 24 hour clock (e.g. 20 November 2003, 1:59:38 pm UTC becomes 2003-11-20T13:59:38Z).

Parameters:
timeStamp
    public void setTimeStamp(DateTime timeStamp) {
        this. = timeStamp;
    }

    
Get the 'Version' attribute value. Version MUST be consistent with the underlying schema baseline.

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

    
Set the 'Version' attribute value. Version MUST be consistent with the underlying schema baseline.

Parameters:
version
    public void setVersion(Float version) {
        this. = version;
    }

    
Get the 'PrimaryLangID' attribute value. PrimaryLangID code MUST conform to ISO 639 language codes. The code MUST define the language of the request. FastRez RECOMMENDS that the response SHOULD match the request, but a response MAY use any language recognized by ISO 639.

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

    
Set the 'PrimaryLangID' attribute value. PrimaryLangID code MUST conform to ISO 639 language codes. The code MUST define the language of the request. FastRez RECOMMENDS that the response SHOULD match the request, but a response MAY use any language recognized by ISO 639.

Parameters:
primaryLangID
    public void setPrimaryLangID(String primaryLangID) {
        this. = primaryLangID;
    }

    
Get the 'CancelType' attribute value. CancelType identifies the type of cancellation. The FastRez CancelType MUST be Cancel.

Returns:
value
    public Cancel getCancel() {
        return ;
    }

    
Set the 'CancelType' attribute value. CancelType identifies the type of cancellation. The FastRez CancelType MUST be Cancel.

Parameters:
cancel
    public void setCancel(Cancel cancel) {
        this. = cancel;
    }
    
For reference purposes the Cancel request MAY contain a collection of reasons for this cancellation. 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="Reasons" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="xs:string" name="Reason" maxOccurs="5"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class Reasons
    {
        private List<StringreasonList = new ArrayList<String>();

        
Get the list of 'Reason' element items. Reason MUST contain the reason for the cancellation.

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

        
Set the list of 'Reason' element items. Reason MUST contain the reason for the cancellation.

Parameters:
list
        public void setReasonList(List<Stringlist) {
             = list;
        }

        
Get the number of 'Reason' element items.

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

        
Add a 'Reason' element item.

Parameters:
item
        public void addReason(String item) {
            .add(item);
        }

        
Get 'Reason' element item by position.

Parameters:
index
Returns:
item
        public String getReason(int index) {
            return .get(index);
        }

        
Remove all 'Reason' element items.
        public void clearReasonList() {
            .clear();
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="Cancel"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum Cancel {
        
Cancellation
        CANCEL("Cancel");
        private final String value;
        private Cancel(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static Cancel convert(String value) {
            for (Cancel inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X