Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
  import java.util.List;
Used to provide miscellaneous structured cruise information (e.g. cruise ship characteristics, embark/debark time for cruise, cruise policy, cruise line contact etc. 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_CruiseInfoRS">
   <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="InformationType" minOccurs="0" maxOccurs="100">
           <!-- Reference to inner class Information -->
         </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 InfoRS
 {
     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 List<InformationinformationList = new ArrayList<Information>();
     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 list of 'InformationType' element items.

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

    
Set the list of 'InformationType' element items.

Parameters:
list
    public void setInformationList(List<Informationlist) {
         = list;
    }

    
Get the number of 'InformationType' element items.

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

    
Add a 'InformationType' element item.

Parameters:
item
    public void addInformation(Information item) {
        .add(item);
    }

    
Get 'InformationType' element item by position.

Parameters:
index
Returns:
item
    public Information getInformation(int index) {
        return .get(index);
    }

    
Remove all 'InformationType' 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. Used to specify if additional details are availaible.

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

    
Set the 'ResponseGroup' attributeGroup value. Used to specify if additional details are availaible.

Parameters:
responseGroup
    public void setResponseGroup(ResponseGroup responseGroup) {
        this. = responseGroup;
    }
    
Details of the requested 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="InformationType" minOccurs="0" maxOccurs="100">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="ns:ReservationID_Type" name="ReservationID" minOccurs="0" maxOccurs="2"/>
       <xs:element type="ns:SailingCategoryInfoType" name="SailingInfo" minOccurs="0"/>
       <xs:element type="ns:ParagraphType" name="PolicyInfo" minOccurs="0" maxOccurs="5"/>
       <xs:element type="ns:ContactPersonType" name="CruiseLineInfo" minOccurs="0"/>
       <xs:element type="ns:ShipInfoType" name="ShipInfo" minOccurs="0"/>
     </xs:sequence>
     <xs:attributeGroup ref="ns:OptionalCodeOptionalNameGroup"/>
     <xs:attribute type="xs:string" use="optional" name="Date"/>
   </xs:complexType>
 </xs:element>
 
    public static class Information
    {
        private List<ReservationIDreservationIDList = new ArrayList<ReservationID>();
        private SailingCategoryInfo sailingInfo;
        private List<ParagraphpolicyInfoList = new ArrayList<Paragraph>();
        private ContactPerson cruiseLineInfo;
        private ShipInfo shipInfo;
        private String date;

        
Get the list of 'ReservationID' element items. Specifies the reservation control information or the guest's booking ID in modification mode (e.g. PNR Record Locator and/or Vendor Confirmation Number).

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

        
Set the list of 'ReservationID' element items. Specifies the reservation control information or the guest's booking ID in modification mode (e.g. PNR Record Locator and/or Vendor Confirmation Number).

Parameters:
list
        public void setReservationIDList(List<ReservationIDlist) {
             = list;
        }

        
Get the number of 'ReservationID' element items.

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

        
Add a 'ReservationID' element item.

Parameters:
item
        public void addReservationID(ReservationID item) {
            .add(item);
        }

        
Get 'ReservationID' element item by position.

Parameters:
index
Returns:
item
        public ReservationID getReservationID(int index) {
            return .get(index);
        }

        
Remove all 'ReservationID' element items.
        public void clearReservationIDList() {
            .clear();
        }

        
Get the 'SailingInfo' element value. Specifies the selected category to book. Contains information related to the selected sailing. Typically the selected sailing is one of the sailings returned in the previous sailing availability response.

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

        
Set the 'SailingInfo' element value. Specifies the selected category to book. Contains information related to the selected sailing. Typically the selected sailing is one of the sailings returned in the previous sailing availability response.

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

        
Get the list of 'PolicyInfo' element items. Used to provide policy information.

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

        
Set the list of 'PolicyInfo' element items. Used to provide policy information.

Parameters:
list
        public void setPolicyInfoList(List<Paragraphlist) {
             = list;
        }

        
Get the number of 'PolicyInfo' element items.

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

        
Add a 'PolicyInfo' element item.

Parameters:
item
        public void addPolicyInfo(Paragraph item) {
            .add(item);
        }

        
Get 'PolicyInfo' element item by position.

Parameters:
index
Returns:
item
        public Paragraph getPolicyInfo(int index) {
            return .get(index);
        }

        
Remove all 'PolicyInfo' element items.
        public void clearPolicyInfoList() {
            .clear();
        }

        
Get the 'CruiseLineInfo' element value. Defines the contact information for the cruise line.

Returns:
value
        public ContactPerson getCruiseLineInfo() {
            return ;
        }

        
Set the 'CruiseLineInfo' element value. Defines the contact information for the cruise line.

Parameters:
cruiseLineInfo
        public void setCruiseLineInfo(ContactPerson cruiseLineInfo) {
            this. = cruiseLineInfo;
        }

        
Get the 'ShipInfo' element value. Defines the ship characteristics.

Returns:
value
        public ShipInfo getShipInfo() {
            return ;
        }

        
Set the 'ShipInfo' element value. Defines the ship characteristics.

Parameters:
shipInfo
        public void setShipInfo(ShipInfo shipInfo) {
            this. = shipInfo;
        }

        
Get the 'OptionalCodeOptionalNameGroup' attributeGroup value. Used to define your information request.

Returns:
value
            return ;
        }

        
Set the 'OptionalCodeOptionalNameGroup' attributeGroup value. Used to define your information request.

Parameters:
optionalCodeOptionalNameGroup
        public void setOptionalCodeOptionalNameGroup(
                OptionalCodeOptionalNameGroup optionalCodeOptionalNameGroup) {
            this. = optionalCodeOptionalNameGroup;
        }

        
Get the 'Date' attribute value. Date associated with the information.

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

        
Set the 'Date' attribute value. Date associated with the information.

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