Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.w3.TR._2002.REC_xmldsig_core_20020212.xmldsig_core_schema;
  
Schema fragment(s) for this class:
 <xs:complexType xmlns:ns="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" mixed="true" name="KeyValueType">
   <xs:choice>
     <xs:element ref="ns:DSAKeyValue"/>
     <xs:element ref="ns:RSAKeyValue"/>
     <xs:any processContents="lax" namespace="##other"/>
   </xs:choice>
 </xs:complexType>
 
 
 public class KeyValueType
 {
     private int choiceSelect = -1;
     private static final int DSA_KEY_VALUE_CHOICE = 0;
     private static final int RSA_KEY_VALUE_CHOICE = 1;
     private static final int ANY_CHOICE = 2;
     private DSAKeyValueType DSAKeyValue;
     private RSAKeyValueType RSAKeyValue;
     private Element any;
 
     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 DSAKeyValue is current selection for choice.

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

    
Get the 'DSAKeyValue' element value.

Returns:
value
 
     public DSAKeyValueType getDSAKeyValue() {
         return ;
     }

    
Set the 'DSAKeyValue' element value.

Parameters:
DSAKeyValue
 
     public void setDSAKeyValue(DSAKeyValueType DSAKeyValue) {
         this. = DSAKeyValue;
     }

    
Check if RSAKeyValue is current selection for choice.

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

    
Get the 'RSAKeyValue' element value.

Returns:
value
 
     public RSAKeyValueType getRSAKeyValue() {
         return ;
     }

    
Set the 'RSAKeyValue' element value.

Parameters:
RSAKeyValue
 
     public void setRSAKeyValue(RSAKeyValueType RSAKeyValue) {
         this. = RSAKeyValue;
     }

    
Check if Any is current selection for choice.

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

    
Get the any value.

Returns:
value
    public Element getAny() {
        return ;
    }

    
Set the any value.

Parameters:
any
    public void setAny(Element any) {
        setChoiceSelect();
        this. = any;
    }
New to GrepCode? Check out our FAQ X