Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.cruise;
  
  import java.util.List;
The cruise itinerary description response lists the entire itinerary of a specific sailing and returns detailed information about each location on the itinerary. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OTA_CruiseItineraryDescRS">
   <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="SelectedSailing">
           <xs:complexType>
             <xs:attributeGroup ref="ns:SelectedSailingGroup"/>
           </xs:complexType>
         </xs:element>
         <xs:element name="CruiseItinInfos">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="CruiseItinInfo" maxOccurs="99">
                 <!-- Reference to inner class CruiseItinInfo -->
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class ItineraryDescRS
 {
     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 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) {
         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 'SelectedSailingGroup' attributeGroup value. This element specifies the sailing information.

Returns:
value
        return ;
    }

    
Set the 'SelectedSailingGroup' attributeGroup value. This element specifies the sailing information.

Parameters:
selectedSailing
    public void setSelectedSailing(SelectedSailingGroup selectedSailing) {
        this. = selectedSailing;
    }

    
Get the list of 'CruiseItinInfo' element items. A collection of cruise itinerary infos.

Returns:
list
        return ;
    }

    
Set the list of 'CruiseItinInfo' element items. A collection of cruise itinerary infos.

Parameters:
list
    public void setCruiseItinInfoList(List<CruiseItinInfolist) {
         = list;
    }

    
Get the number of 'CruiseItinInfo' element items.

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

    
Add a 'CruiseItinInfo' element item.

Parameters:
item
    public void addCruiseItinInfo(CruiseItinInfo item) {
        .add(item);
    }

    
Get 'CruiseItinInfo' element item by position.

Parameters:
index
Returns:
item
    public CruiseItinInfo getCruiseItinInfo(int index) {
        return .get(index);
    }

    
Remove all 'CruiseItinInfo' element items.
    public void clearCruiseItinInfoList() {
        .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;
    }
    
Identifies a specific location in the itinerary as well as the docking information. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="CruiseItinInfo" maxOccurs="99">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="DateTimeDescription" maxOccurs="9">
         <!-- Reference to inner class DateTimeDescription -->
       </xs:element>
       <xs:element type="ns:ParagraphType" name="Information" minOccurs="0"/>
     </xs:sequence>
     <xs:attributeGroup ref="ns:LocationInfoGroup"/>
   </xs:complexType>
 </xs:element>
 
    public static class CruiseItinInfo
    {
        private Paragraph information;
        private LocationInfoGroup locationInfoGroup;

        
Get the list of 'DateTimeDescription' element items.

Returns:
list
            return ;
        }

        
Set the list of 'DateTimeDescription' element items.

Parameters:
list
        public void setDateTimeDescriptionList(List<DateTimeDescriptionlist) {
             = list;
        }

        
Get the number of 'DateTimeDescription' element items.

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

        
Add a 'DateTimeDescription' element item.

Parameters:
item
        public void addDateTimeDescription(DateTimeDescription item) {
            .add(item);
        }

        
Get 'DateTimeDescription' element item by position.

Parameters:
index
Returns:
item
        public DateTimeDescription getDateTimeDescription(int index) {
            return .get(index);
        }

        
Remove all 'DateTimeDescription' element items.
        public void clearDateTimeDescriptionList() {
            .clear();
        }

        
Get the 'Information' element value. Additional information about the itinerary.

Returns:
value
        public Paragraph getInformation() {
            return ;
        }

        
Set the 'Information' element value. Additional information about the itinerary.

Parameters:
information
        public void setInformation(Paragraph information) {
            this. = information;
        }

        
Get the 'LocationInfoGroup' attributeGroup value.

Returns:
value
        public LocationInfoGroup getLocationInfoGroup() {
            return ;
        }

        
Set the 'LocationInfoGroup' attributeGroup value.

Parameters:
locationInfoGroup
        public void setLocationInfoGroup(LocationInfoGroup locationInfoGroup) {
            this. = locationInfoGroup;
        }
        
Specifies the event date and time. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DateTimeDescription" maxOccurs="9">
   <xs:complexType>
     <xs:attribute use="required" name="DateTimeQualifier">
       <xs:simpleType>
         <!-- Reference to inner class DateTimeQualifier -->
       </xs:simpleType>
     </xs:attribute>
     <xs:attribute type="xs:string" use="required" name="DateTimeDetails"/>
     <xs:attribute type="ns:DayOfWeekType" use="optional" name="DayOfWeek"/>
   </xs:complexType>
 </xs:element>
 
        public static class DateTimeDescription
        {
            private DateTimeQualifier dateTimeQualifier;
            private String dateTimeDetails;
            private DayOfWeek dayOfWeek;

            
Get the 'DateTimeQualifier' attribute value. This is an enumerated field specifying a code indicating the type of activity. The enumerated codes are: A - Arrival Qualifier; D - Departure Qualifier; S - Stay Qualifier; and B - Boarding Qualifier.

Returns:
value
            public DateTimeQualifier getDateTimeQualifier() {
                return ;
            }

            
Set the 'DateTimeQualifier' attribute value. This is an enumerated field specifying a code indicating the type of activity. The enumerated codes are: A - Arrival Qualifier; D - Departure Qualifier; S - Stay Qualifier; and B - Boarding Qualifier.

Parameters:
dateTimeQualifier
            public void setDateTimeQualifier(DateTimeQualifier dateTimeQualifier) {
                this. = dateTimeQualifier;
            }

            
Get the 'DateTimeDetails' attribute value. This field contains the actual date/time of the above activity.

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

            
Set the 'DateTimeDetails' attribute value. This field contains the actual date/time of the above activity.

Parameters:
dateTimeDetails
            public void setDateTimeDetails(String dateTimeDetails) {
                this. = dateTimeDetails;
            }

            
Get the 'DayOfWeek' attribute value. Provides the day of the week for the itinerary event.

Returns:
value
            public DayOfWeek getDayOfWeek() {
                return ;
            }

            
Set the 'DayOfWeek' attribute value. Provides the day of the week for the itinerary event.

Parameters:
dayOfWeek
            public void setDayOfWeek(DayOfWeek dayOfWeek) {
                this. = dayOfWeek;
            }
            
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="arrival"/>
     <xs:enumeration value="departure"/>
     <xs:enumeration value="stay"/>
     <xs:enumeration value="boarding"/>
   </xs:restriction>
 </xs:simpleType>
 
            public static enum DateTimeQualifier {
                ARRIVAL("arrival"), DEPARTURE("departure"), STAY("stay"), BOARDING(
                        "boarding");
                private final String value;
                private DateTimeQualifier(String value) {
                    this. = value;
                }
                public String xmlValue() {
                    return ;
                }
                public static DateTimeQualifier convert(String value) {
                    for (DateTimeQualifier inst : values()) {
                        if (inst.xmlValue().equals(value)) {
                            return inst;
                        }
                    }
                    return null;
                }
            }
        }
    }
New to GrepCode? Check out our FAQ X