Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.golf;
  
  import java.util.List;
Applied rule information, including category, rule identifier and rule descriptions. 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="GolfAppliedRuleType">
   <xs:sequence>
     <xs:choice>
       <xs:element type="xs:boolean" name="DefaultUsedInd"/>
       <xs:element name="RuleInfo">
         <xs:complexType>
           <xs:attribute type="xs:string" use="required" name="Name"/>
           <xs:attribute type="xs:int" use="optional" name="Version"/>
         </xs:complexType>
       </xs:element>
     </xs:choice>
     <xs:element name="Description" minOccurs="0" maxOccurs="unbounded">
       <!-- Reference to inner class Description -->
     </xs:element>
   </xs:sequence>
   <xs:attribute type="xs:string" use="required" name="Category"/>
 </xs:complexType>
 
 
 public class GolfAppliedRule
 {
     private int choiceSelect = -1;
     private static final int DEFAULT_USED_IND_CHOICE = 0;
     private static final int RULE_INFO_CHOICE = 1;
     private boolean defaultUsedInd;
     private String ruleInfoName;
     private Integer ruleInfoVersion;
     private List<DescriptiondescriptionList = new ArrayList<Description>();
     private String category;
 
     private void setChoiceSelect(int choice) {
         if ( == -1) {
              = choice;
         } else if ( != choice) {
             throw new IllegalStateException(
                     "Need to call clearChoiceSelect() before changing existing choice");
         }
     }

    
Clear the choice selection.
 
     public void clearChoiceSelect() {
          = -1;
     }

    
Check if DefaultUsedInd is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifDefaultUsedInd() {
         return  == ;
     }

    
Get the 'DefaultUsedInd' element value. If true, a system default rule was used.

Returns:
value
 
     public boolean isDefaultUsedInd() {
         return ;
     }

    
Set the 'DefaultUsedInd' element value. If true, a system default rule was used.

Parameters:
defaultUsedInd
 
     public void setDefaultUsedInd(boolean defaultUsedInd) {
         this. = defaultUsedInd;
     }

    
Check if RuleInfo is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifRuleInfo() {
         return  == ;
     }

    
Get the 'Name' attribute value. The name of the applied rule.

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

    
Set the 'Name' attribute value. The name of the applied rule.

Parameters:
ruleInfoName
    public void setRuleInfoName(String ruleInfoName) {
        this. = ruleInfoName;
    }

    
Get the 'Version' attribute value. The version of the rule.

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

    
Set the 'Version' attribute value. The version of the rule.

Parameters:
ruleInfoVersion
    public void setRuleInfoVersion(Integer ruleInfoVersion) {
        this. = ruleInfoVersion;
    }

    
Get the list of 'Description' element items.

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

    
Set the list of 'Description' element items.

Parameters:
list
    public void setDescriptionList(List<Descriptionlist) {
         = list;
    }

    
Get the number of 'Description' element items.

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

    
Add a 'Description' element item.

Parameters:
item
    public void addDescription(Description item) {
        .add(item);
    }

    
Get 'Description' element item by position.

Parameters:
index
Returns:
item
    public Description getDescription(int index) {
        return .get(index);
    }

    
Remove all 'Description' element items.
    public void clearDescriptionList() {
        .clear();
    }

    
Get the 'Category' attribute value. The applied rule category.Advanced Purchase | Weekend Tee Time

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

    
Set the 'Category' attribute value. The applied rule category.Advanced Purchase | Weekend Tee Time

Parameters:
category
    public void setCategory(String category) {
        this. = category;
    }
    
Rule description(s).Repeated descriptions may be used to accommodate information categories. 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="Description" minOccurs="0" maxOccurs="unbounded">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="ns:FreeTextType" name="ShortDescription" minOccurs="0"/>
       <xs:element type="ns:FreeTextType" name="LongDescription" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
 
    public static class Description
    {
        private FreeText shortDescription;
        private FreeText longDescription;

        
Get the 'ShortDescription' element value. A short description of the rule text with a language identifier.

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

        
Set the 'ShortDescription' element value. A short description of the rule text with a language identifier.

Parameters:
shortDescription
        public void setShortDescription(FreeText shortDescription) {
            this. = shortDescription;
        }

        
Get the 'LongDescription' element value. A long description of the rule text with a language identifier.

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

        
Set the 'LongDescription' element value. A long description of the rule text with a language identifier.

Parameters:
longDescription
        public void setLongDescription(FreeText longDescription) {
            this. = longDescription;
        }
    }
New to GrepCode? Check out our FAQ X