Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2011B.pkg;
  
  import java.util.List;
Provides dates and times of availability together with duration and prices. The Duration attribite defines the period for which a charge applies, e.g. P1D = per day, P1N = per night, P7D = per week etc. If this attribute is not present, the period is assumed to be the duration of the booking. 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="PeriodPriceType">
   <xs:complexContent>
     <xs:extension base="ns:OperationScheduleType">
       <xs:sequence>
         <xs:element type="ns:PkgPriceType" name="Price" minOccurs="0" maxOccurs="5"/>
       </xs:sequence>
       <xs:attribute type="xs:string" use="optional" name="RPH"/>
       <xs:attribute use="optional" name="Category">
         <xs:simpleType>
           <!-- Reference to inner class Category -->
         </xs:simpleType>
       </xs:attribute>
       <xs:attribute use="optional" name="Type">
         <xs:simpleType>
           <!-- Reference to inner class Type -->
         </xs:simpleType>
       </xs:attribute>
       <xs:attribute type="xs:string" use="optional" name="DurationPeriod"/>
       <xs:attribute type="ns:PricingType" use="optional" name="PriceBasis"/>
       <xs:attribute type="ns:ListOfRPH" use="optional" name="BasePeriodRPHs"/>
       <xs:attribute type="xs:boolean" use="optional" name="GuidePriceIndicator"/>
       <xs:attribute type="xs:string" use="optional" name="MaximumPeriod"/>
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>
 
 <xs:simpleType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ListOfRPH">
   <xs:list itemType="xs:string"/>
 </xs:simpleType>
 
 
 public class PeriodPrice extends OperationSchedule
 {
     private List<PkgPricepriceList = new ArrayList<PkgPrice>();
     private String RPH;
     private Category category;
     private Type type;
     private String durationPeriod;
     private Pricing priceBasis;
     private List<StringbasePeriodRPHs = new ArrayList<String>();
     private Boolean guidePriceIndicator;
     private String maximumPeriod;

    
Get the list of 'Price' element items. Provides a price for an extra by booking/rental period whihch may also be at passenger type/age-level.

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

    
Set the list of 'Price' element items. Provides a price for an extra by booking/rental period whihch may also be at passenger type/age-level.

Parameters:
list
 
     public void setPriceList(List<PkgPricelist) {
          = list;
     }

    
Get the number of 'Price' element items.

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

    
Add a 'Price' element item.

Parameters:
item
 
     public void addPrice(PkgPrice item) {
         .add(item);
     }

    
Get 'Price' element item by position.

Parameters:
index
Returns:
item
 
     public PkgPrice getPrice(int index) {
         return .get(index);
     }

    
Remove all 'Price' element items.
    public void clearPriceList() {
        .clear();
    }

    
Get the 'RPH' attribute value. (Reference Place Holder) - an index code to identify an instance in a collection of like items.. For example, used to assign individual passengers or clients to particular itinerary items.

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

    
Set the 'RPH' attribute value. (Reference Place Holder) - an index code to identify an instance in a collection of like items.. For example, used to assign individual passengers or clients to particular itinerary items.

Parameters:
RPH
    public void setRPH(String RPH) {
        this. = RPH;
    }

    
Get the 'Category' attribute value. Identifies the unit on which on Extra is charged, e.g. per person, room, adult etc.

Returns:
value
    public Category getCategory() {
        return ;
    }

    
Set the 'Category' attribute value. Identifies the unit on which on Extra is charged, e.g. per person, room, adult etc.

Parameters:
category
    public void setCategory(Category category) {
        this. = category;
    }

    
Get the 'Type' attribute value. Indicates whether the DurationPeriod is a 'Base' (i.e.. a charge for one of a tier of durations like 3days, 7days etc.) or 'AddOn' (i.e. for periods extending a base period like extra day, extra week etc.)

Returns:
value
    public Type getType() {
        return ;
    }

    
Set the 'Type' attribute value. Indicates whether the DurationPeriod is a 'Base' (i.e.. a charge for one of a tier of durations like 3days, 7days etc.) or 'AddOn' (i.e. for periods extending a base period like extra day, extra week etc.)

Parameters:
type
    public void setType(Type type) {
        this. = type;
    }

    
Get the 'DurationPeriod' attribute value. Defines the period for which a charge applies, e.g. P1D = per day, P1N = per night, P7D = per week etc. If this attribute is not present, the period is assumed to be the duration of the booking.

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

    
Set the 'DurationPeriod' attribute value. Defines the period for which a charge applies, e.g. P1D = per day, P1N = per night, P7D = per week etc. If this attribute is not present, the period is assumed to be the duration of the booking.

Parameters:
durationPeriod
    public void setDurationPeriod(String durationPeriod) {
        this. = durationPeriod;
    }

    
Get the 'PriceBasis' attribute value. An enumerated type that defines how a service is priced. Values: Per stay, Per person, Per night, Per person per night, Per use.

Returns:
value
    public Pricing getPriceBasis() {
        return ;
    }

    
Set the 'PriceBasis' attribute value. An enumerated type that defines how a service is priced. Values: Per stay, Per person, Per night, Per person per night, Per use.

Parameters:
priceBasis
    public void setPriceBasis(Pricing priceBasis) {
        this. = priceBasis;
    }

    
Get the list of 'BasePeriodRPHs' attribute items. Use with an 'AddOn' DurationPeriod to point to the 'Base' DurationPeriod(s) which it extends.

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

    
Set the list of 'BasePeriodRPHs' attribute items. Use with an 'AddOn' DurationPeriod to point to the 'Base' DurationPeriod(s) which it extends.

Parameters:
list
    public void setBasePeriodRPHs(List<Stringlist) {
         = list;
    }

    
Serializer for 'BasePeriodRPHs' attribute list.

Parameters:
values
Returns:
text
    public static String serializeBasePeriodRPHs(List<Stringvalues) {
        if (values == null) {
            return null;
        } else {
            java.lang.StringBuffer buff = new java.lang.StringBuffer();
            for (java.util.Iterator<Stringiter = values.iterator(); iter
                    .hasNext();) {
                if (buff.length() > 0) {
                    buff.append(' ');
                }
                String value = iter.next();
                buff.append(value);
            }
            return buff.toString();
        }
    }

    
Deserializer for 'BasePeriodRPHs' attribute list.

Parameters:
text
Returns:
values
Throws:
org.jibx.runtime.JiBXException on conversion error
    public static List<StringdeserializeBasePeriodRPHs(String text)
            throws org.jibx.runtime.JiBXException {
            public java.lang.Object deserialize(String text) {
                return text;
            }
        };
        return (List<String>) org.jibx.runtime.Utility.deserializeList(text,
                ldser);
    }

    
Get the number of 'BasePeriodRPHs' attribute items.

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

    
Add a 'BasePeriodRPHs' attribute item.

Parameters:
item
    public void addBasePeriodRPH(String item) {
        .add(item);
    }

    
Get 'BasePeriodRPHs' attribute item by position.

Parameters:
index
Returns:
item
    public String getBasePeriodRPH(int index) {
        return .get(index);
    }

    
Remove all 'BasePeriodRPHs' attribute items.
    public void clearBasePeriodRPHs() {
        .clear();
    }

    
Get the 'GuidePriceIndicator' attribute value. When 'true', the accompanying price(s) are guidelines; full pricing will be returned when the Extra is selected in a Quick Cost message. When 'false', an accurate costing can be calculated from the price(s) given. When this attribute is absent, accurate prices will be assumed.

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

    
Set the 'GuidePriceIndicator' attribute value. When 'true', the accompanying price(s) are guidelines; full pricing will be returned when the Extra is selected in a Quick Cost message. When 'false', an accurate costing can be calculated from the price(s) given. When this attribute is absent, accurate prices will be assumed.

Parameters:
guidePriceIndicator
    public void setGuidePriceIndicator(Boolean guidePriceIndicator) {
        this. = guidePriceIndicator;
    }

    
Get the 'MaximumPeriod' attribute value. The maximum period for which the associated service is bookable.

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

    
Set the 'MaximumPeriod' attribute value. The maximum period for which the associated service is bookable.

Parameters:
maximumPeriod
    public void setMaximumPeriod(String maximumPeriod) {
        this. = maximumPeriod;
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="Room"/>
     <xs:enumeration value="Booking"/>
     <xs:enumeration value="Person"/>
     <xs:enumeration value="Adult"/>
     <xs:enumeration value="Child"/>
     <xs:enumeration value="Car"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum Category {
        ROOM("Room"), BOOKING("Booking"), PERSON("Person"), ADULT("Adult"), CHILD(
                "Child"), CAR("Car");
        private final String value;
        private Category(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static Category convert(String value) {
            for (Category 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="Base"/>
     <xs:enumeration value="AddOn"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum Type {
        BASE("Base"), ADD_ON("AddOn");
        private final String value;
        private Type(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static Type convert(String value) {
            for (Type inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X