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 package availability response message contains information about which packages are available for the given sailing. 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_CruisePkgAvailRS">
   <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="GuestCounts" minOccurs="0">
           <!-- Reference to inner class GuestCounts -->
         </xs:element>
         <xs:element type="ns:SailingCategoryInfoType" name="SailingInfo" minOccurs="0"/>
         <xs:element name="CruisePackages" minOccurs="0">
           <!-- Reference to inner class CruisePackages -->
         </xs:element>
       </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 PkgAvailRS
 {
     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 GuestCounts guestCounts;
     private SailingCategoryInfo sailingInfo;
     private CruisePackages cruisePackages;
     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 'GuestCounts' element value.

Returns:
value
    public GuestCounts getGuestCounts() {
        return ;
    }

    
Set the 'GuestCounts' element value.

Parameters:
guestCounts
    public void setGuestCounts(GuestCounts guestCounts) {
        this. = guestCounts;
    }

    
Get the 'SailingInfo' element value. Contains information related to the selected sailing.

Returns:
value
        return ;
    }

    
Set the 'SailingInfo' element value. Contains information related to the selected sailing.

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

    
Get the 'CruisePackages' element value.

Returns:
value
    public CruisePackages getCruisePackages() {
        return ;
    }

    
Set the 'CruisePackages' element value.

Parameters:
cruisePackages
    public void setCruisePackages(CruisePackages cruisePackages) {
        this. = cruisePackages;
    }

    
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.

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

    
Set the 'ResponseGroup' attributeGroup value.

Parameters:
responseGroup
    public void setResponseGroup(ResponseGroup responseGroup) {
        this. = responseGroup;
    }
    
Specifies guest quantity and guest types. 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="GuestCounts" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="GuestCount" maxOccurs="9">
         <xs:complexType>
           <xs:attributeGroup ref="ns:TravelerCountGroup"/>
         </xs:complexType>
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class GuestCounts
    {
        private List<TravelerCountGroupguestCountList = new ArrayList<TravelerCountGroup>();

        
Get the list of 'GuestCount' element items. Categorization of all guests in the request. The sum of the Quantity attribute will provide you with the total number of guests.

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

        
Set the list of 'GuestCount' element items. Categorization of all guests in the request. The sum of the Quantity attribute will provide you with the total number of guests.

Parameters:
list
        public void setGuestCountList(List<TravelerCountGrouplist) {
             = list;
        }

        
Get the number of 'GuestCount' element items.

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

        
Add a 'GuestCount' element item.

Parameters:
item
        public void addGuestCount(TravelerCountGroup item) {
            .add(item);
        }

        
Get 'GuestCount' element item by position.

Parameters:
index
Returns:
item
        public TravelerCountGroup getGuestCount(int index) {
            return .get(index);
        }

        
Remove all 'GuestCount' element items.
        public void clearGuestCountList() {
            .clear();
        }
    }
    
Contains the list of packages available for the sailing, which meet the supplied query criteria. 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="CruisePackages" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="CruisePackage" maxOccurs="99">
         <!-- Reference to inner class CruisePackage -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class CruisePackages
    {
        private List<CruisePackagecruisePackageList = new ArrayList<CruisePackage>();

        
Get the list of 'CruisePackage' element items.

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

        
Set the list of 'CruisePackage' element items.

Parameters:
list
        public void setCruisePackageList(List<CruisePackagelist) {
             = list;
        }

        
Get the number of 'CruisePackage' element items.

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

        
Add a 'CruisePackage' element item.

Parameters:
item
        public void addCruisePackage(CruisePackage item) {
            .add(item);
        }

        
Get 'CruisePackage' element item by position.

Parameters:
index
Returns:
item
        public CruisePackage getCruisePackage(int index) {
            return .get(index);
        }

        
Remove all 'CruisePackage' element items.
        public void clearCruisePackageList() {
            .clear();
        }
        
Specifies the type of package options to query for, that the cruise might offer with the sailing. 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="CruisePackage" maxOccurs="99">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:CruisePackageType">
         <xs:sequence>
           <xs:element name="PriceInfo" minOccurs="0" maxOccurs="10">
             <!-- Reference to inner class PriceInfo -->
           </xs:element>
         </xs:sequence>
         <xs:attribute type="xs:string" use="optional" name="Description"/>
         <xs:attribute type="xs:boolean" use="optional" name="TransferIncludedIndicator"/>
         <xs:attribute type="xs:boolean" use="optional" name="SelectionAllowedIndicator"/>
         <xs:attribute type="xs:boolean" use="optional" name="FlightInfoRequiredInd"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class CruisePackage
                extends
                    org.jibx.schema.org.opentravel._2012A.cruise.CruisePackage
        {
            private List<PriceInfopriceInfoList = new ArrayList<PriceInfo>();
            private String description;
            private Boolean transferIncludedIndicator;
            private Boolean selectionAllowedIndicator;
            private Boolean flightInfoRequiredInd;

            
Get the list of 'PriceInfo' element items.

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

            
Set the list of 'PriceInfo' element items.

Parameters:
list
            public void setPriceInfoList(List<PriceInfolist) {
                 = list;
            }

            
Get the number of 'PriceInfo' element items.

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

            
Add a 'PriceInfo' element item.

Parameters:
item
            public void addPriceInfo(PriceInfo item) {
                .add(item);
            }

            
Get 'PriceInfo' element item by position.

Parameters:
index
Returns:
item
            public PriceInfo getPriceInfo(int index) {
                return .get(index);
            }

            
Remove all 'PriceInfo' element items.
            public void clearPriceInfoList() {
                .clear();
            }

            
Get the 'Description' attribute value. Short text description of the package.

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

            
Set the 'Description' attribute value. Short text description of the package.

Parameters:
description
            public void setDescription(String description) {
                this. = description;
            }

            
Get the 'TransferIncludedIndicator' attribute value. When true, a transfer is included in the package. When false, a transfer is not included in the package.

Returns:
value
            public Boolean getTransferIncludedIndicator() {
                return ;
            }

            
Set the 'TransferIncludedIndicator' attribute value. When true, a transfer is included in the package. When false, a transfer is not included in the package.

Parameters:
transferIncludedIndicator
            public void setTransferIncludedIndicator(
                    Boolean transferIncludedIndicator) {
                this. = transferIncludedIndicator;
            }

            
Get the 'SelectionAllowedIndicator' attribute value. When true, this option may be selected. When false, the option may not be selected. <LegacyDefaultValue xmlns="http://www.opentravel.org/OTA/2003/05">true</LegacyDefaultValue>

Returns:
value
            public Boolean getSelectionAllowedIndicator() {
                return ;
            }

            
Set the 'SelectionAllowedIndicator' attribute value. When true, this option may be selected. When false, the option may not be selected. <LegacyDefaultValue xmlns="http://www.opentravel.org/OTA/2003/05">true</LegacyDefaultValue>

Parameters:
selectionAllowedIndicator
            public void setSelectionAllowedIndicator(
                    Boolean selectionAllowedIndicator) {
                this. = selectionAllowedIndicator;
            }

            
Get the 'FlightInfoRequiredInd' attribute value. When true, indicates that a flight is required.

Returns:
value
            public Boolean getFlightInfoRequiredInd() {
                return ;
            }

            
Set the 'FlightInfoRequiredInd' attribute value. When true, indicates that a flight is required.

Parameters:
flightInfoRequiredInd
            public void setFlightInfoRequiredInd(Boolean flightInfoRequiredInd) {
                this. = flightInfoRequiredInd;
            }
            
Provides price information regarding a package. 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="PriceInfo" minOccurs="0" maxOccurs="10">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:PriceInfoType">
         <xs:attribute type="xs:string" use="optional" name="Status"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
            public static class PriceInfo
                    extends
                        org.jibx.schema.org.opentravel._2012A.cruise.PriceInfo
            {
                private String status;

                
Get the 'Status' attribute value. Specifies the booking status. Refer to OpenTravel Code list Status (STS).

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

                
Set the 'Status' attribute value. Specifies the booking status. Refer to OpenTravel Code list Status (STS).

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