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 Sailing Availability Response message contains sailing availability for 1 to many cruise lines for a given region or ship on a date and duration range. For each sailing the following information may be returned: Cruise line code; Ship code; Region code; Departure date; Duration; Voyage number; Number of ports visited; Departure port code; Arrival port code; Status code; Max cabin occupancy; Category location; First and second dining services status; Sailing indicators; Free flow text; Available modes of transportation; Available currencies; Cruise package information; and Registration information. This message contains similar information to a standard airline CRS or GDS sailing availability response 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_CruiseSailAvailRS">
   <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="SailingOptions" minOccurs="0">
           <!-- Reference to inner class SailingOptions -->
         </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 SailAvailRS
 {
     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 SailingOptions sailingOptions;
     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 'SailingOptions' element value.

Returns:
value
    public SailingOptions getSailingOptions() {
        return ;
    }

    
Set the 'SailingOptions' element value.

Parameters:
sailingOptions
    public void setSailingOptions(SailingOptions sailingOptions) {
        this. = sailingOptions;
    }

    
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 prevented the processing of a message.

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

    
Set the 'Errors' element value. A collection of errors that prevented 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. Used to identify requirements regarding the maximum data results sent.

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

    
Set the 'ResponseGroup' attributeGroup value. Used to identify requirements regarding the maximum data results sent.

Parameters:
responseGroup
    public void setResponseGroup(ResponseGroup responseGroup) {
        this. = responseGroup;
    }
    
Contains the different sailing availability options that customers can choose from. 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="SailingOptions" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="SailingOption" maxOccurs="unbounded">
         <!-- Reference to inner class SailingOption -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class SailingOptions
    {
        private List<SailingOptionsailingOptionList = new ArrayList<SailingOption>();

        
Get the list of 'SailingOption' element items.

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

        
Set the list of 'SailingOption' element items.

Parameters:
list
        public void setSailingOptionList(List<SailingOptionlist) {
             = list;
        }

        
Get the number of 'SailingOption' element items.

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

        
Add a 'SailingOption' element item.

Parameters:
item
        public void addSailingOption(SailingOption item) {
            .add(item);
        }

        
Get 'SailingOption' element item by position.

Parameters:
index
Returns:
item
        public SailingOption getSailingOption(int index) {
            return .get(index);
        }

        
Remove all 'SailingOption' element items.
        public void clearSailingOptionList() {
            .clear();
        }
        
Specifies a sailing availability option per cruise line and per ship. 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="SailingOption" maxOccurs="unbounded">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:SailingType">
         <xs:sequence>
           <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
         </xs:sequence>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
        public static class SailingOption extends Sailing
        {
            private TPAExtensions TPAExtensions;

            
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;
            }
        }
    }
New to GrepCode? Check out our FAQ X