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 Dining Availability Response message contains a list of dinings available for a given sailing and for a selected fare. For each dining the following information may be returned: Dining Code; Dining status; Sittiing; Meal name; Meal times; 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_CruiseDiningAvailRS">
   <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="DiningOptions">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="DiningOption" maxOccurs="99">
                 <!-- Reference to inner class DiningOption -->
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element type="ns:ParagraphType" name="Information" minOccurs="0" maxOccurs="5"/>
         <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:complexType>
 </xs:element>
 
 
 public class DiningAvailRS
 {
     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 List<DiningOptiondiningOptionList = new ArrayList<DiningOption>();
     private List<ParagraphinformationList = new ArrayList<Paragraph>();
     private TPAExtensions TPAExtensions;
     private Errors errors;
 
     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 list of 'DiningOption' element items. Contains the list of proposed dining options.

Returns:
list
        return ;
    }

    
Set the list of 'DiningOption' element items. Contains the list of proposed dining options.

Parameters:
list
    public void setDiningOptionList(List<DiningOptionlist) {
         = list;
    }

    
Get the number of 'DiningOption' element items.

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

    
Add a 'DiningOption' element item.

Parameters:
item
    public void addDiningOption(DiningOption item) {
        .add(item);
    }

    
Get 'DiningOption' element item by position.

Parameters:
index
Returns:
item
    public DiningOption getDiningOption(int index) {
        return .get(index);
    }

    
Remove all 'DiningOption' element items.
    public void clearDiningOptionList() {
        .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 '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;
    }
    
Contains information about the proposed dining. 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="DiningOption" maxOccurs="99">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="DiningRoom" maxOccurs="20">
         <!-- Reference to inner class DiningRoom -->
       </xs:element>
     </xs:sequence>
     <xs:attribute type="xs:boolean" use="optional" name="SelectionAllowedIndicator"/>
     <xs:attribute type="xs:string" use="optional" name="Sitting"/>
     <xs:attribute type="xs:string" use="optional" name="SittingDescription"/>
     <xs:attribute type="ns:InventoryStatusType" use="optional" name="SittingStatus"/>
     <xs:attributeGroup ref="ns:SmokingIndicatorGroup"/>
   </xs:complexType>
 </xs:element>
 
 <xs:attributeGroup xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="SmokingIndicatorGroup">
   <xs:attribute type="xs:boolean" use="optional" name="SmokingAllowed"/>
 </xs:attributeGroup>
 
    public static class DiningOption
    {
        private List<DiningRoomdiningRoomList = new ArrayList<DiningRoom>();
        private Boolean selectionAllowedIndicator;
        private String sitting;
        private String sittingDescription;
        private InventoryStatus sittingStatus;
        private Boolean smokingAllowed;

        
Get the list of 'DiningRoom' element items.

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

        
Set the list of 'DiningRoom' element items.

Parameters:
list
        public void setDiningRoomList(List<DiningRoomlist) {
             = list;
        }

        
Get the number of 'DiningRoom' element items.

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

        
Add a 'DiningRoom' element item.

Parameters:
item
        public void addDiningRoom(DiningRoom item) {
            .add(item);
        }

        
Get 'DiningRoom' element item by position.

Parameters:
index
Returns:
item
        public DiningRoom getDiningRoom(int index) {
            return .get(index);
        }

        
Remove all 'DiningRoom' element items.
        public void clearDiningRoomList() {
            .clear();
        }

        
Get the 'SelectionAllowedIndicator' attribute value. When true, this dining option may be selected. When false, the dining 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 dining option may be selected. When false, the dining 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 '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 'SittingDescription' attribute value. Describes the sitting information.

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

        
Set the 'SittingDescription' attribute value. Describes the sitting information.

Parameters:
sittingDescription
        public void setSittingDescription(String sittingDescription) {
            this. = sittingDescription;
        }

        
Get the 'SittingStatus' attribute value. Specifies the status of the sitting.

Returns:
value
        public InventoryStatus getSittingStatus() {
            return ;
        }

        
Set the 'SittingStatus' attribute value. Specifies the status of the sitting.

Parameters:
sittingStatus
        public void setSittingStatus(InventoryStatus sittingStatus) {
            this. = sittingStatus;
        }

        
Get the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. <LegacyDefaultValue>false</LegacyDefaultValue>

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

        
Set the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. <LegacyDefaultValue>false</LegacyDefaultValue>

Parameters:
smokingAllowed
        public void setSmokingAllowed(Boolean smokingAllowed) {
            this. = smokingAllowed;
        }
        
Specifies the dining room 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="DiningRoom" maxOccurs="20">
   <xs:complexType>
     <xs:complexContent>
       <xs:extension base="ns:RestaurantType">
         <xs:sequence>
           <xs:element name="SittingDetails" minOccurs="0">
             <!-- Reference to inner class SittingDetails -->
           </xs:element>
           <xs:element type="ns:FeeType" name="Fee" minOccurs="0"/>
         </xs:sequence>
         <xs:attributeGroup ref="ns:SmokingIndicatorGroup"/>
         <xs:attribute type="xs:string" use="optional" name="DeckName"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
 </xs:element>
 
 <xs:attributeGroup xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="SmokingIndicatorGroup">
   <xs:attribute type="xs:boolean" use="optional" name="SmokingAllowed"/>
 </xs:attributeGroup>
 
        public static class DiningRoom extends Restaurant
        {
            private SittingDetails sittingDetails;
            private Fee fee;
            private Boolean smokingAllowed;
            private String deckName;

            
Get the 'SittingDetails' element value.

Returns:
value
            public SittingDetails getSittingDetails() {
                return ;
            }

            
Set the 'SittingDetails' element value.

Parameters:
sittingDetails
            public void setSittingDetails(SittingDetails sittingDetails) {
                this. = sittingDetails;
            }

            
Get the 'Fee' element value. Used to provide charge information for dining rooms that have additional fees.

Returns:
value
            public Fee getFee() {
                return ;
            }

            
Set the 'Fee' element value. Used to provide charge information for dining rooms that have additional fees.

Parameters:
fee
            public void setFee(Fee fee) {
                this. = fee;
            }

            
Get the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. <LegacyDefaultValue>false</LegacyDefaultValue>

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

            
Set the 'SmokingAllowed' attribute value. Indicates smoking is allowed when true and is not allowed when false. <LegacyDefaultValue>false</LegacyDefaultValue>

Parameters:
smokingAllowed
            public void setSmokingAllowed(Boolean smokingAllowed) {
                this. = smokingAllowed;
            }

            
Get the 'DeckName' attribute value. Name of the deck on the ship where the dining room is located.

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

            
Set the 'DeckName' attribute value. Name of the deck on the ship where the dining room is located.

Parameters:
deckName
            public void setDeckName(String deckName) {
                this. = deckName;
            }
            
Contains the list of sitting details. 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="SittingDetails" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="SittingDetail" maxOccurs="99">
         <!-- Reference to inner class SittingDetail -->
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
            public static class SittingDetails
            {
                private List<SittingDetailsittingDetailList = new ArrayList<SittingDetail>();

                
Get the list of 'SittingDetail' element items.

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

                
Set the list of 'SittingDetail' element items.

Parameters:
list
                public void setSittingDetailList(List<SittingDetaillist) {
                     = list;
                }

                
Get the number of 'SittingDetail' element items.

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

                
Add a 'SittingDetail' element item.

Parameters:
item
                public void addSittingDetail(SittingDetail item) {
                    .add(item);
                }

                
Get 'SittingDetail' element item by position.

Parameters:
index
Returns:
item
                public SittingDetail getSittingDetail(int index) {
                    return .get(index);
                }

                
Remove all 'SittingDetail' element items.
                public void clearSittingDetailList() {
                    .clear();
                }
                
Contains information about the meal sitting. 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="SittingDetail" maxOccurs="99">
   <xs:complexType>
     <xs:attribute type="xs:string" use="required" name="MealName"/>
     <xs:attribute type="xs:time" use="required" name="MealStartTime"/>
     <xs:attribute type="xs:time" use="required" name="MealEndTime"/>
   </xs:complexType>
 </xs:element>
 
                public static class SittingDetail
                {
                    private String mealName;
                    private LocalTime mealStartTime;
                    private LocalTime mealEndTime;

                    
Get the 'MealName' attribute value. Meal name such as: Breakfast, lunch or dinner.

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

                    
Set the 'MealName' attribute value. Meal name such as: Breakfast, lunch or dinner.

Parameters:
mealName
                    public void setMealName(String mealName) {
                        this. = mealName;
                    }

                    
Get the 'MealStartTime' attribute value. Time on the ship the meal seating begins.

Returns:
value
                    public LocalTime getMealStartTime() {
                        return ;
                    }

                    
Set the 'MealStartTime' attribute value. Time on the ship the meal seating begins.

Parameters:
mealStartTime
                    public void setMealStartTime(LocalTime mealStartTime) {
                        this. = mealStartTime;
                    }

                    
Get the 'MealEndTime' attribute value. Time on the ship the meal seating ends.

Returns:
value
                    public LocalTime getMealEndTime() {
                        return ;
                    }

                    
Set the 'MealEndTime' attribute value. Time on the ship the meal seating ends.

Parameters:
mealEndTime
                    public void setMealEndTime(LocalTime mealEndTime) {
                        this. = mealEndTime;
                    }
                }
            }
        }
    }
New to GrepCode? Check out our FAQ X