Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
  import java.util.List;
The Cabin Availability Response message contains a list of cabins available for a given sailing with a specific Mode of Transportation/GatewayCity pair and currency and for a selected fare/category pair. For each cabin the following information may be returned: Cabin number; Position in ship; Ship side; Category location; Remark; Deck name; Bed options; Max cabin occupancy; Cabin size; Berthed Category Code; Priced Category Code; Status code; Category indicator; Cruise package information; Group Code; Fare Code; Currency Code; and Marketing message. 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_CruiseCabinAvailRS">
   <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:SailingCategoryInfoType" name="SailingInfo"/>
         <xs:element name="SelectedFare">
           <xs:complexType>
             <xs:attributeGroup ref="ns:FareGroup"/>
           </xs:complexType>
         </xs:element>
         <xs:element name="CabinOptions">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="CabinOption" maxOccurs="99">
                 <!-- Reference to inner class CabinOption -->
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element type="ns:ParagraphType" name="Information" minOccurs="0" maxOccurs="5"/>
         <xs:element name="Dining" minOccurs="0" maxOccurs="8">
           <!-- Reference to inner class Dining -->
         </xs:element>
         <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
     <xs:attributeGroup ref="ns:ResponseGroup"/>
   </xs:complexType>
 </xs:element>
 
 
 public class CabinAvailRS
 {
     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 SailingCategoryInfo sailingInfo;
     private FareGroup selectedFare;
     private List<CabinOptioncabinOptionList = new ArrayList<CabinOption>();
     private List<ParagraphinformationList = new ArrayList<Paragraph>();
     private List<DiningdiningList = new ArrayList<Dining>();
     private TPAExtensions TPAExtensions;
     private Errors errors;
     private ResponseGroup responseGroup;
 
     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. Standard way to indicate successful processing of an OpenTravel message. Returning an empty element of this type indicates success.

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

    
Set the 'Success' element value. Standard way to indicate successful processing of an OpenTravel message. Returning an empty element of this type indicates success.

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

    
Get the 'Warnings' element value. Standard way to indicate successful processing of an OpenTravel message, but one in which warnings are generated.

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

    
Set the 'Warnings' element value. Standard way to indicate successful processing of an OpenTravel message, but one in which warnings are generated.

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

    
Get the 'SailingInfo' element value. Requested sailing information. Specifies the selected category that the cabins belong to. It is the category that has been selected in the previous category availability response.

Returns:
value
        return ;
    }

    
Set the 'SailingInfo' element value. Requested sailing information. Specifies the selected category that the cabins belong to. It is the category that has been selected in the previous category availability response.

Parameters:
sailingInfo
    public void setSailingInfo(SailingCategoryInfo sailingInfo) {
        this. = sailingInfo;
    }

    
Get the 'FareGroup' attributeGroup value. Contains the information about the fare that has been selected from the previous fare availability response.

Returns:
value
    public FareGroup getSelectedFare() {
        return ;
    }

    
Set the 'FareGroup' attributeGroup value. Contains the information about the fare that has been selected from the previous fare availability response.

Parameters:
selectedFare
    public void setSelectedFare(FareGroup selectedFare) {
        this. = selectedFare;
    }

    
Get the list of 'CabinOption' element items. Contains the list of proposed cabin options.

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

    
Set the list of 'CabinOption' element items. Contains the list of proposed cabin options.

Parameters:
list
    public void setCabinOptionList(List<CabinOptionlist) {
         = list;
    }

    
Get the number of 'CabinOption' element items.

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

    
Add a 'CabinOption' element item.

Parameters:
item
    public void addCabinOption(CabinOption item) {
        .add(item);
    }

    
Get 'CabinOption' element item by position.

Parameters:
index
Returns:
item
    public CabinOption getCabinOption(int index) {
        return .get(index);
    }

    
Remove all 'CabinOption' element items.
    public void clearCabinOptionList() {
        .clear();
    }

    
Get the list of 'Information' element items. Contains information such as advisories or marketing messages returned by the cruise line.

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

    
Set the list of 'Information' element items. Contains information such as advisories or marketing messages returned by the cruise line.

Parameters:
list
    public void setInformationList(List<Paragraphlist) {
         = list;
    }

    
Get the number of 'Information' element items.

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

    
Add a 'Information' element item.

Parameters:
item
    public void addInformation(Paragraph item) {
        .add(item);
    }

    
Get 'Information' element item by position.

Parameters:
index
Returns:
item
    public Paragraph getInformation(int index) {
        return .get(index);
    }

    
Remove all 'Information' element items.
    public void clearInformationList() {
        .clear();
    }

    
Get the list of 'Dining' element items.

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

    
Set the list of 'Dining' element items.

Parameters:
list
    public void setDiningList(List<Dininglist) {
         = list;
    }

    
Get the number of 'Dining' element items.

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

    
Add a 'Dining' element item.

Parameters:
item
    public void addDining(Dining item) {
        .add(item);
    }

    
Get 'Dining' element item by position.

Parameters:
index
Returns:
item
    public Dining getDining(int index) {
        return .get(index);
    }

    
Remove all 'Dining' element items.
    public void clearDiningList() {
        .clear();
    }

    
Get the 'TPA_Extensions' element value.

Returns:
value
    public TPAExtensions getTPAExtensions() {
        return ;
    }

    
Set the 'TPA_Extensions' element value.

Parameters:
TPAExtensions
    public void setTPAExtensions(TPAExtensions TPAExtensions) {
        this. = TPAExtensions;
    }

    
Check if Errors is current selection for choice.

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

    
Get the 'Errors' element value. A collection of errors that occurred during the processing of a message.

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

    
Set the 'Errors' element value. A collection of errors that occurred during the processing of a message.

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;
    }

    
Get the 'ResponseGroup' attributeGroup value. Indicates that additional records are available and provides the echo token to be used to retrieve those records.

Returns:
value
    public ResponseGroup getResponseGroup() {
        return ;
    }

    
Set the 'ResponseGroup' attributeGroup value. Indicates that additional records are available and provides the echo token to be used to retrieve those records.

Parameters:
responseGroup
    public void setResponseGroup(ResponseGroup responseGroup) {
        this. = responseGroup;
    }
    
Contains information about the proposed cabin, It locates the cabin on the ship and gives the cabin bed configuration. 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="CabinOption" maxOccurs="99">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:CabinOptionType">
         <xs:sequence>
           <xs:element name="CabinFilters" minOccurs="0">
             <!-- Reference to inner class CabinFilters -->
           </xs:element>
         </xs:sequence>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
    public static class CabinOption
            extends
                org.jibx.schema.org.opentravel._2012A.cruise.CabinOption
    {
        private CabinFilters cabinFilters;

        
Get the 'CabinFilters' element value.

Returns:
value
        public CabinFilters getCabinFilters() {
            return ;
        }

        
Set the 'CabinFilters' element value.

Parameters:
cabinFilters
        public void setCabinFilters(CabinFilters cabinFilters) {
            this. = cabinFilters;
        }
        
Collection of cabin filters. 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="CabinFilters" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="CabinFilter" maxOccurs="99">
         <!-- Reference to inner class CabinFilter -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
        public static class CabinFilters
        {
            private List<CabinFiltercabinFilterList = new ArrayList<CabinFilter>();

            
Get the list of 'CabinFilter' element items.

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

            
Set the list of 'CabinFilter' element items.

Parameters:
list
            public void setCabinFilterList(List<CabinFilterlist) {
                 = list;
            }

            
Get the number of 'CabinFilter' element items.

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

            
Add a 'CabinFilter' element item.

Parameters:
item
            public void addCabinFilter(CabinFilter item) {
                .add(item);
            }

            
Get 'CabinFilter' element item by position.

Parameters:
index
Returns:
item
            public CabinFilter getCabinFilter(int index) {
                return .get(index);
            }

            
Remove all 'CabinFilter' element items.
            public void clearCabinFilterList() {
                .clear();
            }
            
Used to describe the features of the cabin. 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="CabinFilter" maxOccurs="99">
   <xs:complexType>
     <xs:attribute type="xs:string" use="optional" name="CabinFilterCode"/>
   </xs:complexType>
 </xs:element>
 
            public static class CabinFilter
            {
                private String cabinFilterCode;

                
Get the 'CabinFilterCode' attribute value. Code values representing attributes that are valid for this cabin. Refer to OpenTravel Code List Cabin Filters (CBF).

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

                
Set the 'CabinFilterCode' attribute value. Code values representing attributes that are valid for this cabin. Refer to OpenTravel Code List Cabin Filters (CBF).

Parameters:
cabinFilterCode
                public void setCabinFilterCode(String cabinFilterCode) {
                    this. = cabinFilterCode;
                }
            }
        }
    }
    
Dining services including sittings and the status of sittings. 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="Dining" minOccurs="0" maxOccurs="8">
   <xs:complexType>
     <xs:attribute type="xs:string" use="optional" name="Sitting"/>
     <xs:attribute type="xs:string" use="optional" name="Status"/>
   </xs:complexType>
 </xs:element>
 
    public static class Dining
    {
        private String sitting;
        private String status;

        
Get the 'Sitting' attribute value. Dining service. Typical values are: first, second, third, open.

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

        
Set the 'Sitting' attribute value. Dining service. Typical values are: first, second, third, open.

Parameters:
sitting
        public void setSitting(String sitting) {
            this. = sitting;
        }

        
Get the 'Status' attribute value. Provides status of the sitting. Refer to OpenTravel Code table Status (STS).

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

        
Set the 'Status' attribute value. Provides status of the sitting. Refer to OpenTravel Code table Status (STS).

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