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 specify the data requirements. Schema fragment(s) for this class:
 <xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="CruiseProfileType">
   <xs:sequence>
     <xs:element name="CruiseProfile" maxOccurs="99">
       <!-- Reference to inner class CruiseProfileInner -->
     </xs:element>
   </xs:sequence>
   <xs:attribute use="required" name="ProfileTypeIdentifier">
     <xs:simpleType>
       <!-- Reference to inner class ProfileTypeIdentifier -->
     </xs:simpleType>
   </xs:attribute>
 </xs:complexType>
 
 
 public class CruiseProfile
 {
     private ProfileTypeIdentifier profileTypeIdentifier;

    
Get the list of 'CruiseProfile' element items.

Returns:
list
 
         return ;
     }

    
Set the list of 'CruiseProfile' element items.

Parameters:
list
 
     public void setCruiseProfileList(List<CruiseProfileInnerlist) {
          = list;
     }

    
Get the number of 'CruiseProfile' element items.

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

    
Add a 'CruiseProfile' element item.

Parameters:
item
 
     public void addCruiseProfile(CruiseProfileInner item) {
         .add(item);
     }

    
Get 'CruiseProfile' element item by position.

Parameters:
index
Returns:
item
 
     public CruiseProfileInner getCruiseProfile(int index) {
         return .get(index);
     }

    
Remove all 'CruiseProfile' element items.
 
     public void clearCruiseProfileList() {
         .clear();
     }

    
Get the 'ProfileTypeIdentifier' attribute value. Specifies the Profile Type such as MOD, MAX or MAN. Profile information, e.g.: MOD for Modification, MAX for Maximum units allowed, MAN for Mandatory.

Returns:
value
 
         return ;
     }

    
Set the 'ProfileTypeIdentifier' attribute value. Specifies the Profile Type such as MOD, MAX or MAN. Profile information, e.g.: MOD for Modification, MAX for Maximum units allowed, MAN for Mandatory.

Parameters:
profileTypeIdentifier
 
     public void setProfileTypeIdentifier(
             ProfileTypeIdentifier profileTypeIdentifier) {
         this. = profileTypeIdentifier;
     }
    
Contains the cruise attribute information, identifying those items which are mandatory, modifiable, or have required maximums. 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="CruiseProfile" maxOccurs="99">
   <xs:complexType>
     <xs:attribute type="xs:string" use="optional" name="Code"/>
     <xs:attribute type="xs:string" use="optional" name="MaxQuantity"/>
   </xs:complexType>
 </xs:element>
 
    public static class CruiseProfileInner
    {
        private String code;
        private String maxQuantity;

        
Get the 'Code' attribute value. Identifies the cruise options for which parameters are being set. Refer to OpenTravel Code table Cruise Profile Type (CPT).

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

        
Set the 'Code' attribute value. Identifies the cruise options for which parameters are being set. Refer to OpenTravel Code table Cruise Profile Type (CPT).

Parameters:
code
        public void setCode(String code) {
            this. = code;
        }

        
Get the 'MaxQuantity' attribute value. Specifies the maximum quantity allowed for the option identified by the CruiseOption attribute. Typically only used when the ApplicationProfileTypeIndentifier contains the value "MAX".

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

        
Set the 'MaxQuantity' attribute value. Specifies the maximum quantity allowed for the option identified by the CruiseOption attribute. Typically only used when the ApplicationProfileTypeIndentifier contains the value "MAX".

Parameters:
maxQuantity
        public void setMaxQuantity(String maxQuantity) {
            this. = maxQuantity;
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="Modifiable"/>
     <xs:enumeration value="NotModifiable"/>
     <xs:enumeration value="Maximums"/>
     <xs:enumeration value="Mandatory"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum ProfileTypeIdentifier {
        
Indicates that the components are modifiable.
        MODIFIABLE("Modifiable"), 
Indicates the CruiseProfileCode may not be modified.
        NOT_MODIFIABLE("NotModifiable"), 
Indicates there is a maximum limitation on the CruiseOption, this should be specified in the MaxQuantity.
        MAXIMUMS("Maximums"), 
Indicates the CruiseOption is mandatory (e.g., passport).
        MANDATORY("Mandatory");
        private final String value;
        private ProfileTypeIdentifier(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static ProfileTypeIdentifier convert(String value) {
            for (ProfileTypeIdentifier inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X