Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
Defines the amenity/gift and its form of delivery. 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="AmenityOptionType">
   <xs:sequence minOccurs="0">
     <!-- Reference to inner class Sequence -->
   </xs:sequence>
   <xs:attribute type="xs:string" use="required" name="OptionCode"/>
   <xs:attribute type="xs:int" use="optional" name="Quantity"/>
   <xs:attribute type="xs:string" use="optional" name="DeliveryDate"/>
   <xs:attribute use="optional" name="DeliveryLocation">
     <xs:simpleType>
       <!-- Reference to inner class DeliveryLocation -->
     </xs:simpleType>
   </xs:attribute>
   <xs:attribute type="xs:boolean" use="optional" name="ModifiableIndicator"/>
 </xs:complexType>
 
 
 public class AmenityOption
 {
     private Sequence sequence;
     private String optionCode;
     private Integer quantity;
     private String deliveryDate;
     private Boolean modifiableIndicator;

    
Get the sequence value.

Returns:
value
 
     public Sequence getSequence() {
         return ;
     }

    
Set the sequence value.

Parameters:
sequence
 
     public void setSequence(Sequence sequence) {
         this. = sequence;
     }

    
Get the 'OptionCode' attribute value. Specifies the amenity, gift or option code as defined by the cruise line.

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

    
Set the 'OptionCode' attribute value. Specifies the amenity, gift or option code as defined by the cruise line.

Parameters:
optionCode
 
     public void setOptionCode(String optionCode) {
         this. = optionCode;
     }

    
Get the 'Quantity' attribute value. Specifies the quantity of the Amenity order.

Returns:
value
 
     public Integer getQuantity() {
         return ;
     }

    
Set the 'Quantity' attribute value. Specifies the quantity of the Amenity order.

Parameters:
quantity
 
     public void setQuantity(Integer quantity) {
         this. = quantity;
     }

    
Get the 'DeliveryDate' attribute value. Specifies the delivery date of the Amenity/ Gift.

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

    
Set the 'DeliveryDate' attribute value. Specifies the delivery date of the Amenity/ Gift.

Parameters:
deliveryDate
    public void setDeliveryDate(String deliveryDate) {
        this. = deliveryDate;
    }

    
Get the 'DeliveryLocation' attribute value. Specifies the delivery location (e.g., cabin, dining room).

Returns:
value
        return ;
    }

    
Set the 'DeliveryLocation' attribute value. Specifies the delivery location (e.g., cabin, dining room).

Parameters:
deliveryLocation
    public void setDeliveryLocation(DeliveryLocation deliveryLocation) {
        this. = deliveryLocation;
    }

    
Get the 'ModifiableIndicator' attribute value. When true, the existing option is modifiable.

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

    
Set the 'ModifiableIndicator' attribute value. When true, the existing option is modifiable.

Parameters:
modifiableIndicator
    public void setModifiableIndicator(Boolean modifiableIndicator) {
        this. = modifiableIndicator;
    }
    
Schema fragment(s) for this class:
 <xs:sequence xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" minOccurs="0">
   <xs:element type="ns:PersonNameType" name="Originator" minOccurs="0"/>
   <xs:element type="ns:ParagraphType" name="Message" minOccurs="0"/>
 </xs:sequence>
 
    public static class Sequence
    {
        private PersonName originator;
        private Paragraph message;

        
Get the 'Originator' element value. The person requesting the amenity.

Returns:
value
        public PersonName getOriginator() {
            return ;
        }

        
Set the 'Originator' element value. The person requesting the amenity.

Parameters:
originator
        public void setOriginator(PersonName originator) {
            this. = originator;
        }

        
Get the 'Message' element value. Specifies the additional comments or message.

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

        
Set the 'Message' element value. Specifies the additional comments or message.

Parameters:
message
        public void setMessage(Paragraph message) {
            this. = message;
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="diningroom"/>
     <xs:enumeration value="cabin"/>
     <xs:enumeration value="person"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum DeliveryLocation {
        DININGROOM("diningroom"), CABIN("cabin"), 
The option is to be delivered directly to a person.
        PERSON("person");
        private final String value;
        private DeliveryLocation(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static DeliveryLocation convert(String value) {
            for (DeliveryLocation inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X