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 Category Availability Response message contains category availability for a given sailing with a specific Mode of Transportation/GatewayCity pair and currency for 1 to multiple fares (depending on the cruise line). For each category the following information may be returned: Berthed category code; Priced category code; Status code; Category indicator; Cruise package information; Group code; Fare code; and Currency code. This message returns the fare amounts available in the different categories. At this point in the process the customer has selected the fare code and has queried the different category offerings for that fare code. 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_CruiseCategoryAvailRS">
   <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:SailingInfoType" name="SailingInfo"/>
         <xs:element name="FareOption" minOccurs="0" maxOccurs="5">
           <!-- Reference to inner class FareOption -->
         </xs:element>
         <xs:element type="ns:TaxesType" name="Taxes" minOccurs="0"/>
         <xs:element type="ns:FeeType" name="Fee" minOccurs="0" maxOccurs="3"/>
         <xs:element type="ns:ParagraphType" name="Information" minOccurs="0" maxOccurs="5"/>
       </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 CategoryAvailRS
 {
     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 SailingInfo sailingInfo;
     private List<FareOptionfareOptionList = new ArrayList<FareOption>();
     private Taxes taxes;
     private List<FeefeeList = new ArrayList<Fee>();
     private List<ParagraphinformationList = new ArrayList<Paragraph>();
     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) {
         setChoiceSelect();
         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. Currency in which the fares are being returned. Specifies the available inclusive package.

Returns:
value
    public SailingInfo getSailingInfo() {
        return ;
    }

    
Set the 'SailingInfo' element value. Requested sailing information. Currency in which the fares are being returned. Specifies the available inclusive package.

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

    
Get the list of 'FareOption' element items.

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

    
Set the list of 'FareOption' element items.

Parameters:
list
    public void setFareOptionList(List<FareOptionlist) {
         = list;
    }

    
Get the number of 'FareOption' element items.

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

    
Add a 'FareOption' element item.

Parameters:
item
    public void addFareOption(FareOption item) {
        .add(item);
    }

    
Get 'FareOption' element item by position.

Parameters:
index
Returns:
item
    public FareOption getFareOption(int index) {
        return .get(index);
    }

    
Remove all 'FareOption' element items.
    public void clearFareOptionList() {
        .clear();
    }

    
Get the 'Taxes' element value. Collection of cruise taxes.

Returns:
value
    public Taxes getTaxes() {
        return ;
    }

    
Set the 'Taxes' element value. Collection of cruise taxes.

Parameters:
taxes
    public void setTaxes(Taxes taxes) {
        this. = taxes;
    }

    
Get the list of 'Fee' element items. Specifies additional charges. (e.g., port charges, port services fee).

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

    
Set the list of 'Fee' element items. Specifies additional charges. (e.g., port charges, port services fee).

Parameters:
list
    public void setFeeList(List<Feelist) {
         = list;
    }

    
Get the number of 'Fee' element items.

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

    
Add a 'Fee' element item.

Parameters:
item
    public void addFee(Fee item) {
        .add(item);
    }

    
Get 'Fee' element item by position.

Parameters:
index
Returns:
item
    public Fee getFee(int index) {
        return .get(index);
    }

    
Remove all 'Fee' element items.
    public void clearFeeList() {
        .clear();
    }

    
Get the list of 'Information' element items. Advisory information returned by the cruise line.

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

    
Set the list of 'Information' element items. Advisory information 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();
    }

    
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;
    }
    
Fare and associated categories information. 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="FareOption" minOccurs="0" maxOccurs="5">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="CategoryOptions">
         <xs:complexType>
           <xs:sequence>
             <xs:element type="ns:CategoryOptionType" name="CategoryOption" maxOccurs="40"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
     </xs:sequence>
     <xs:attributeGroup ref="ns:FareGroup"/>
   </xs:complexType>
 </xs:element>
 
    public static class FareOption
    {
        private List<CategoryOptioncategoryOptionList = new ArrayList<CategoryOption>();
        private FareGroup fareGroup;

        
Get the list of 'CategoryOption' element items. Contains the different categories associated to the fare code which is part of the fare option.

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

        
Set the list of 'CategoryOption' element items. Contains the different categories associated to the fare code which is part of the fare option.

Parameters:
list
        public void setCategoryOptionList(List<CategoryOptionlist) {
             = list;
        }

        
Get the number of 'CategoryOption' element items.

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

        
Add a 'CategoryOption' element item.

Parameters:
item
        public void addCategoryOption(CategoryOption item) {
            .add(item);
        }

        
Get 'CategoryOption' element item by position.

Parameters:
index
Returns:
item
        public CategoryOption getCategoryOption(int index) {
            return .get(index);
        }

        
Remove all 'CategoryOption' element items.
        public void clearCategoryOptionList() {
            .clear();
        }

        
Get the 'FareGroup' attributeGroup value.

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

        
Set the 'FareGroup' attributeGroup value.

Parameters:
fareGroup
        public void setFareGroup(FareGroup fareGroup) {
            this. = fareGroup;
        }
    }
New to GrepCode? Check out our FAQ X