Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.golf;
  
  import java.util.List;
Amentities and services available at the golf course (either included in the price of the tee time or available for an extra fee), such as power carts. Note, includes pricing. Schema fragment(s) for this class:
 <xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="GolfAmenityType">
   <xs:sequence>
     <xs:element type="ns:FeesType" name="Fees" minOccurs="0" maxOccurs="99"/>
     <xs:element name="Policy" minOccurs="0" maxOccurs="9">
       <!-- Reference to inner class Policy -->
     </xs:element>
     <xs:element type="ns:PaymentFormType" name="PaymentGuarantee" minOccurs="0"/>
   </xs:sequence>
   <xs:attribute type="xs:string" use="optional" name="ID"/>
   <xs:attribute type="xs:string" use="optional" name="AmenityCode"/>
   <xs:attribute type="xs:string" use="optional" name="Name"/>
   <xs:attribute type="xs:string" use="optional" name="Description"/>
   <xs:attribute use="optional" name="PricingType">
     <xs:simpleType>
       <!-- Reference to inner class Pricing -->
     </xs:simpleType>
   </xs:attribute>
   <xs:attribute type="xs:boolean" use="optional" name="IncludedInTeeTimePriceInd"/>
   <xs:attribute type="xs:boolean" use="optional" name="ReservableInd"/>
   <xs:attribute type="xs:string" use="optional" name="PolicyInfo"/>
   <xs:attribute type="xs:string" name="SequentialMask"/>
 </xs:complexType>
 
 
 public class GolfAmenity
 {
     private List<FeesfeeList = new ArrayList<Fees>();
     private List<PolicypolicyList = new ArrayList<Policy>();
     private PaymentForm paymentGuarantee;
     private String ID;
     private String amenityCode;
     private String name;
     private String description;
     private Pricing pricing;
     private Boolean reservableInd;
     private String policyInfo;
     private String sequentialMask;

    
Get the list of 'Fees' element items. The price associated with tee time amenities.

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

    
Set the list of 'Fees' element items. The price associated with tee time amenities.

Parameters:
list
 
     public void setFeeList(List<Feeslist) {
          = list;
     }

    
Get the number of 'Fees' element items.

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

    
Add a 'Fees' element item.

Parameters:
item
 
     public void addFee(Fees item) {
         .add(item);
     }

    
Get 'Fees' element item by position.

Parameters:
index
Returns:
item
 
     public Fees getFee(int index) {
         return .get(index);
     }

    
Remove all 'Fees' element items.
 
     public void clearFeeList() {
        .clear();
    }

    
Get the list of 'Policy' element items.

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

    
Set the list of 'Policy' element items.

Parameters:
list
    public void setPolicyList(List<Policylist) {
         = list;
    }

    
Get the number of 'Policy' element items.

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

    
Add a 'Policy' element item.

Parameters:
item
    public void addPolicy(Policy item) {
        .add(item);
    }

    
Get 'Policy' element item by position.

Parameters:
index
Returns:
item
    public Policy getPolicy(int index) {
        return .get(index);
    }

    
Remove all 'Policy' element items.
    public void clearPolicyList() {
        .clear();
    }

    
Get the 'PaymentGuarantee' element value. Guarantee payment information (if required) for golf amenity reservation.

Returns:
value
    public PaymentForm getPaymentGuarantee() {
        return ;
    }

    
Set the 'PaymentGuarantee' element value. Guarantee payment information (if required) for golf amenity reservation.

Parameters:
paymentGuarantee
    public void setPaymentGuarantee(PaymentForm paymentGuarantee) {
        this. = paymentGuarantee;
    }

    
Get the 'ID' attribute value. A unique ID for this amenity.

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

    
Set the 'ID' attribute value. A unique ID for this amenity.

Parameters:
ID
    public void setID(String ID) {
        this. = ID;
    }

    
Get the 'AmenityCode' attribute value. A code for the amenity.

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

    
Set the 'AmenityCode' attribute value. A code for the amenity.

Parameters:
amenityCode
    public void setAmenityCode(String amenityCode) {
        this. = amenityCode;
    }

    
Get the 'Name' attribute value. The name of the amenity.

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

    
Set the 'Name' attribute value. The name of the amenity.

Parameters:
name
    public void setName(String name) {
        this. = name;
    }

    
Get the 'Description' attribute value. The amenity description.

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

    
Set the 'Description' attribute value. The amenity description.

Parameters:
description
    public void setDescription(String description) {
        this. = description;
    }

    
Get the 'PricingType' attribute value. How the amenity is priced, such as per person or per amenity.

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

    
Set the 'PricingType' attribute value. How the amenity is priced, such as per person or per amenity.

Parameters:
pricing
    public void setPricing(Pricing pricing) {
        this. = pricing;
    }

    
Get the 'IncludedInTeeTimePriceInd' attribute value. If TRUE, this amenity is included with the tee time purchase.

Returns:
value
        return ;
    }

    
Set the 'IncludedInTeeTimePriceInd' attribute value. If TRUE, this amenity is included with the tee time purchase.

Parameters:
includedInTeeTimePriceInd
    public void setIncludedInTeeTimePriceInd(Boolean includedInTeeTimePriceInd) {
        this. = includedInTeeTimePriceInd;
    }

    
Get the 'ReservableInd' attribute value. If TRUE, this amenity may be reserved.

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

    
Set the 'ReservableInd' attribute value. If TRUE, this amenity may be reserved.

Parameters:
reservableInd
    public void setReservableInd(Boolean reservableInd) {
        this. = reservableInd;
    }

    
Get the 'PolicyInfo' attribute value. Optional policy information regarding the amenity, for example Power Cart rental policy.

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

    
Set the 'PolicyInfo' attribute value. Optional policy information regarding the amenity, for example Power Cart rental policy.

Parameters:
policyInfo
    public void setPolicyInfo(String policyInfo) {
        this. = policyInfo;
    }

    
Get the 'SequentialMask' attribute value. A string of numeric values that represent requested and/or available amenities.(Developer Notes) An amenity mask may be used for systems that exchange amenity information in a sequential string format. For example, in a 20 character amenity string, if the fourth position represents free lunch and the tenth position represents a golf cart, the string would look like this: 00010000010000000000

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

    
Set the 'SequentialMask' attribute value. A string of numeric values that represent requested and/or available amenities.(Developer Notes) An amenity mask may be used for systems that exchange amenity information in a sequential string format. For example, in a 20 character amenity string, if the fourth position represents free lunch and the tenth position represents a golf cart, the string would look like this: 00010000010000000000

Parameters:
sequentialMask
    public void setSequentialMask(String sequentialMask) {
        this. = sequentialMask;
    }
    
Summary amenity policies. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Policy" minOccurs="0" maxOccurs="9">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension base="xs:string">
         <xs:attribute type="xs:string" use="optional" name="Type"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>
 
    public static class Policy
    {
        private String string;
        private String type;

        
Get the extension value.

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

        
Set the extension value.

Parameters:
string
        public void setString(String string) {
            this. = string;
        }

        
Get the 'Type' attribute value. The type of the policy, such as "Tee Time" or "Cart Rental".

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

        
Set the 'Type' attribute value. The type of the policy, such as "Tee Time" or "Cart Rental".

Parameters:
type
        public void setType(String type) {
            this. = type;
        }
    }
    
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="PerPerson"/>
     <xs:enumeration value="PerAmenity"/>
   </xs:restriction>
 </xs:simpleType>
 
    public static enum Pricing {
        PER_PERSON("PerPerson"), PER_AMENITY("PerAmenity");
        private final String value;
        private Pricing(String value) {
            this. = value;
        }
        public String xmlValue() {
            return ;
        }
        public static Pricing convert(String value) {
            for (Pricing inst : values()) {
                if (inst.xmlValue().equals(value)) {
                    return inst;
                }
            }
            return null;
        }
    }
New to GrepCode? Check out our FAQ X