Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012A.cruise;
  
  import java.util.List;
Specifies cabin option info. 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="CabinOptionType">
   <xs:sequence>
     <xs:element name="CabinConfiguration" minOccurs="0" maxOccurs="9">
       <!-- Reference to inner class CabinConfiguration -->
     </xs:element>
     <xs:element name="MeasurementInfo" minOccurs="0" maxOccurs="9">
       <!-- Reference to inner class MeasurementInfo -->
     </xs:element>
     <xs:element type="ns:FreeTextType" name="Remark" minOccurs="0"/>
   </xs:sequence>
   <xs:attribute type="xs:string" use="required" name="Status"/>
   <xs:attribute type="ns:CategoryLocationType" use="optional" name="CategoryLocation"/>
   <xs:attribute use="optional" name="ShipSide">
     <xs:simpleType>
       <!-- Reference to inner class ShipSide -->
     </xs:simpleType>
   </xs:attribute>
   <xs:attribute use="optional" name="PositionInShip">
     <xs:simpleType>
       <!-- Reference to inner class PositionInShip -->
     </xs:simpleType>
   </xs:attribute>
   <xs:attribute type="xs:string" use="optional" name="BedType"/>
   <xs:attributeGroup ref="ns:CruiseCabinGroup"/>
   <xs:attribute type="xs:dateTime" use="optional" name="ReleaseDateTime"/>
   <xs:attributeGroup ref="ns:DeckGroup"/>
   <xs:attribute type="xs:string" use="optional" name="CabinCategoryStatusCode"/>
   <xs:attribute type="xs:string" use="optional" name="CabinCategoryCode"/>
   <xs:attribute type="xs:int" use="optional" name="CabinRanking"/>
   <xs:attribute type="xs:boolean" use="optional" name="ConnectingCabinIndicator"/>
   <xs:attribute type="xs:string" use="optional" name="ConnectingCabinNumber"/>
 </xs:complexType>
 
 
 public class CabinOption
 {
     private FreeText remark;
     private String status;
     private ShipSide shipSide;
     private PositionInShip positionInShip;
     private String bed;
     private DateTime releaseDateTime;
     private DeckGroup deckGroup;
     private String cabinCategoryStatusCode;
     private String cabinCategoryCode;
     private Integer cabinRanking;
     private Boolean connectingCabinIndicator;
     private String connectingCabinNumber;

    
Get the list of 'CabinConfiguration' element items.

Returns:
list
 
         return ;
     }

    
Set the list of 'CabinConfiguration' element items.

Parameters:
list
 
     public void setCabinConfigurationList(List<CabinConfigurationlist) {
          = list;
     }

    
Get the number of 'CabinConfiguration' element items.

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

    
Add a 'CabinConfiguration' element item.

Parameters:
item
 
     public void addCabinConfiguration(CabinConfiguration item) {
        .add(item);
    }

    
Get 'CabinConfiguration' element item by position.

Parameters:
index
Returns:
item
    public CabinConfiguration getCabinConfiguration(int index) {
        return .get(index);
    }

    
Remove all 'CabinConfiguration' element items.
    public void clearCabinConfigurationList() {
        .clear();
    }

    
Get the list of 'MeasurementInfo' element items.

Returns:
list
        return ;
    }

    
Set the list of 'MeasurementInfo' element items.

Parameters:
list
    public void setMeasurementInfoList(List<MeasurementInfolist) {
         = list;
    }

    
Get the number of 'MeasurementInfo' element items.

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

    
Add a 'MeasurementInfo' element item.

Parameters:
item
    public void addMeasurementInfo(MeasurementInfo item) {
        .add(item);
    }

    
Get 'MeasurementInfo' element item by position.

Parameters:
index
Returns:
item
    public MeasurementInfo getMeasurementInfo(int index) {
        return .get(index);
    }

    
Remove all 'MeasurementInfo' element items.
    public void clearMeasurementInfoList() {
        .clear();
    }

    
Get the 'Remark' element value. Remark information related to the cabin option.

Returns:
value
    public FreeText getRemark() {
        return ;
    }

    
Set the 'Remark' element value. Remark information related to the cabin option.

Parameters:
remark
    public void setRemark(FreeText remark) {
        this. = remark;
    }

    
Get the 'Status' attribute value. Specifies the status of the cabin. Refer to OpenTravel Code table Status (STS).

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

    
Set the 'Status' attribute value. Specifies the status of the cabin. Refer to OpenTravel Code table Status (STS).

Parameters:
status
    public void setStatus(String status) {
        this. = status;
    }

    
Get the 'CategoryLocation' attribute value. Specifies the category location.

Returns:
value
        return ;
    }

    
Set the 'CategoryLocation' attribute value. Specifies the category location.

Parameters:
categoryLocation
    public void setCategoryLocation(CategoryLocation categoryLocation) {
        this. = categoryLocation;
    }

    
Get the 'ShipSide' attribute value. Identifies the ship side location of the cabin.

Returns:
value
    public ShipSide getShipSide() {
        return ;
    }

    
Set the 'ShipSide' attribute value. Identifies the ship side location of the cabin.

Parameters:
shipSide
    public void setShipSide(ShipSide shipSide) {
        this. = shipSide;
    }

    
Get the 'PositionInShip' attribute value. Position of the cabin in ship (e.g., aft).

Returns:
value
    public PositionInShip getPositionInShip() {
        return ;
    }

    
Set the 'PositionInShip' attribute value. Position of the cabin in ship (e.g., aft).

Parameters:
positionInShip
    public void setPositionInShip(PositionInShip positionInShip) {
        this. = positionInShip;
    }

    
Get the 'BedType' attribute value. Specifies the bed type for this cabin. Refer to OpenTravel Codelist Bed Type (BED).

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

    
Set the 'BedType' attribute value. Specifies the bed type for this cabin. Refer to OpenTravel Codelist Bed Type (BED).

Parameters:
bed
    public void setBed(String bed) {
        this. = bed;
    }

    
Get the 'CruiseCabinGroup' attributeGroup value.

Returns:
value
        return ;
    }

    
Set the 'CruiseCabinGroup' attributeGroup value.

Parameters:
cruiseCabinGroup
    public void setCruiseCabinGroup(CruiseCabinGroup cruiseCabinGroup) {
        this. = cruiseCabinGroup;
    }

    
Get the 'ReleaseDateTime' attribute value. The date and time the held cabin will be released back to inventory if not booked. Typically, this is the same ReleaseDateTime that was provided in the CabinHoldRS.

Returns:
value
    public DateTime getReleaseDateTime() {
        return ;
    }

    
Set the 'ReleaseDateTime' attribute value. The date and time the held cabin will be released back to inventory if not booked. Typically, this is the same ReleaseDateTime that was provided in the CabinHoldRS.

Parameters:
releaseDateTime
    public void setReleaseDateTime(DateTime releaseDateTime) {
        this. = releaseDateTime;
    }

    
Get the 'DeckGroup' attributeGroup value. Provides the deck name and number.

Returns:
value
    public DeckGroup getDeckGroup() {
        return ;
    }

    
Set the 'DeckGroup' attributeGroup value. Provides the deck name and number.

Parameters:
deckGroup
    public void setDeckGroup(DeckGroup deckGroup) {
        this. = deckGroup;
    }

    
Get the 'CabinCategoryStatusCode' attribute value. The status of the berth category of the cabin. Refer to OpenTravel Code Table STS (Status).

Returns:
value
        return ;
    }

    
Set the 'CabinCategoryStatusCode' attribute value. The status of the berth category of the cabin. Refer to OpenTravel Code Table STS (Status).

Parameters:
cabinCategoryStatusCode
    public void setCabinCategoryStatusCode(String cabinCategoryStatusCode) {
        this. = cabinCategoryStatusCode;
    }

    
Get the 'CabinCategoryCode' attribute value. The berth category of the cabin.

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

    
Set the 'CabinCategoryCode' attribute value. The berth category of the cabin.

Parameters:
cabinCategoryCode
    public void setCabinCategoryCode(String cabinCategoryCode) {
        this. = cabinCategoryCode;
    }

    
Get the 'CabinRanking' attribute value. The relative ranking of the cabin based on location preference, a better view, etc.

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

    
Set the 'CabinRanking' attribute value. The relative ranking of the cabin based on location preference, a better view, etc.

Parameters:
cabinRanking
    public void setCabinRanking(Integer cabinRanking) {
        this. = cabinRanking;
    }

    
Get the 'ConnectingCabinIndicator' attribute value. If true, the cabin is connected to another cabin.

Returns:
value
        return ;
    }

    
Set the 'ConnectingCabinIndicator' attribute value. If true, the cabin is connected to another cabin.

Parameters:
connectingCabinIndicator
    public void setConnectingCabinIndicator(Boolean connectingCabinIndicator) {
        this. = connectingCabinIndicator;
    }

    
Get the 'ConnectingCabinNumber' attribute value. The number of the connecting cabin.

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

    
Set the 'ConnectingCabinNumber' attribute value. The number of the connecting cabin.

Parameters:
connectingCabinNumber
    public void setConnectingCabinNumber(String connectingCabinNumber) {
        this. = connectingCabinNumber;
    }
    
Specifies cabin bed configuration. 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="CabinConfiguration" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:attribute type="xs:string" use="optional" name="BedConfigurationCode"/>
   </xs:complexType>
 </xs:element>
 
    public static class CabinConfiguration
    {
        private String bedConfigurationCode;

        
Get the 'BedConfigurationCode' attribute value. Contains a code defining the bed configuration in the cabin.

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

        
Set the 'BedConfigurationCode' attribute value. Contains a code defining the bed configuration in the cabin.

Parameters:
bedConfigurationCode
        public void setBedConfigurationCode(String bedConfigurationCode) {
            this. = bedConfigurationCode;
        }
    }
    
Provides area information related to the cabin. 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="MeasurementInfo" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:attributeGroup ref="ns:UnitsOfMeasureGroup"/>
     <xs:attributeGroup ref="ns:OptionalCodeOptionalNameGroup"/>
     <xs:attribute type="xs:string" use="optional" name="DimensionInfo"/>
   </xs:complexType>
 </xs:element>
 
    public static class MeasurementInfo
    {
        private UnitsOfMeasureGroup unitsOfMeasureGroup;
        private String dimensionInfo;

        
Get the 'UnitsOfMeasureGroup' attributeGroup value. Provides the unit of measure information for the item identified by the Code.

Returns:
value
        public UnitsOfMeasureGroup getUnitsOfMeasureGroup() {
            return ;
        }

        
Set the 'UnitsOfMeasureGroup' attributeGroup value. Provides the unit of measure information for the item identified by the Code.

Parameters:
unitsOfMeasureGroup
        public void setUnitsOfMeasureGroup(
                UnitsOfMeasureGroup unitsOfMeasureGroup) {
            this. = unitsOfMeasureGroup;
        }

        
Get the 'OptionalCodeOptionalNameGroup' attributeGroup value. This will provide the item for which measurements are being provided (e.g., balcony, cabin).

Returns:
value
            return ;
        }

        
Set the 'OptionalCodeOptionalNameGroup' attributeGroup value. This will provide the item for which measurements are being provided (e.g., balcony, cabin).

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

        
Get the 'DimensionInfo' attribute value. The dimensions associated with the cabin, balcony, or window (e.g., 10x12).

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

        
Set the 'DimensionInfo' attribute value. The dimensions associated with the cabin, balcony, or window (e.g., 10x12).

Parameters:
dimensionInfo
        public void setDimensionInfo(String dimensionInfo) {
            this. = dimensionInfo;
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="Starboard"/>
     <xs:enumeration value="Port"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum ShipSide {
        
Right side.
        STARBOARD("Starboard"), 
Left side.
        PORT("Port");
        private final String value;
        private ShipSide(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static ShipSide convert(String value) {
            for (ShipSide inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="Aft"/>
     <xs:enumeration value="Forward"/>
     <xs:enumeration value="Midship"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum PositionInShip {
        
This is the back of the ship.
        AFT("Aft"), 
This is the front of the ship.
        FORWARD("Forward"), 
This is the middle of the ship.
        MIDSHIP("Midship");
        private final String value;
        private PositionInShip(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static PositionInShip convert(String value) {
            for (PositionInShip inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X