All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.axis2.schema.template.ADBBeanTemplate-bean.xsl Maven / Gradle / Ivy

There is a newer version: 1.8.2
Show newest version



    

        
        
        
        
          
        
        
        
        

        
        
        
        
        
        
        
        
        
        
        

        

        
/**
 * .java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: #axisVersion# #today#
 */

            
                package ;
            

            /**
            *   bean class
            */
            @SuppressWarnings({"unchecked","unused"})
        
        public static abstract class   extends   extends 
         extends  org.apache.axis2.databinding.types.Union 
        implements org.apache.axis2.databinding.ADBBean{
        
            /* This type was generated from the piece of schema that had
                name = 
                Namespace URI = 
                Namespace Prefix = 
                */
            
            
                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
                "",
                "",
                "");

            
        

        
            /** Whenever a new property is set ensure all others are unset
             *  There can be only one choice and the last one wins
             */
            private void clearAllSettingTrackers() {
            
                
                   localTracker = false;
                
           
            }
        


        
            
            

            
            
            

            
            local
            localTracker


            
               
               
               
               
               
               
               
               
               
            
            


            
                

               /**
               * Auto generated getter method
               * Overridden from 
               *
               * @throws RuntimeException
               */
               public   get(){
                   throw new java.lang.RuntimeException("The property has been removed by restriction");
               }

               /**
               * Auto generated setter method
               * Overridden from 
               *
               * @param param 
               * @throws RuntimeException
               */
               public void set( param){
                   throw new java.lang.RuntimeException("The property has been removed by restriction");
               }

               
                
                   
                       
                            


                         
                         /**
                         * Validate the array for 
                         * Overridden from 
                         */
                         protected void validate( param){
                         
                              if ((param != null) && (param.length > )){
                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                              }
                         
                         
                              if ((param != null) && (param.length < )){
                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                              }
                         
                         }


                         /**
                         * Auto generated setter method
                         * Overridden from 
                         *
                         * @param param 
                         */
                         public void set( param){
                         
                                validate(param);

                         
                              clearAllSettingTrackers();
                         
                         
                            
                               
                               
                                    = true;
                               
                               
                                    = param != null;
                               
                            
                         
                              this.=param;
                         }
                      
                      

                        /**
                        * field for 
                        
                        * This was an Attribute!
                        
                        * This was an Array!
                        
                        * Type of this field is a subtype of its original.
                        
                        * This field was an array in .
                        */

                        
                            
                                
                                    protected   =
                                    org.apache.axis2.databinding.utils.ConverterUtil.convertTo("");
                                
                                
                                    protected   ;
                                
                            

                        
                        
                            private static java.util.HashMap _table_ = new java.util.HashMap();

                            // Constructor
                            
                                protected ( value, boolean isRegisterValue) {
                                     = value;
                                    if (isRegisterValue){
                                        
                                           
                                             _table_.put( + "", this);
                                           
                                           
                                               _table_.put(, this);
                                           
                                        
                                    }

                                }
                            
                            
                                protected ( value, boolean isRegisterValue) {
                                    super(value,false);
                                    if (isRegisterValue){
                                        
                                           
                                             _table_.put( + "", this);
                                           
                                           
                                               _table_.put(, this);
                                           
                                        
                                    }
                                }
                            
                            
                                
                                    public static final  _ =
                                        org.apache.axis2.databinding.utils.ConverterUtil.convertTo("");
                                
                            

                            
                                public static final   =
                                    new (_,true);
                            

                                public  getValue() { return ;}

                                public boolean equals(java.lang.Object obj) {return (obj == this);}
                                public int hashCode() { return toString().hashCode();}
                                public java.lang.String toString() {
                                
                                    
                                        return org.apache.axis2.databinding.utils.ConverterUtil.convertToString();
                                    
                                    
                                        return .toString();
                                    
                                

                                }

                        
                        
                        
                           
                           /*  This tracker boolean wil be used to detect whether the user called the set method
                          *   for this attribute. It will be used to determine whether to include this field
                           *   in the serialized XML
                           */
                           protected boolean  = false ;

                           public boolean isSpecified(){
                               return ;
                           }

                           

                           /**
                           * Auto generated getter method
                           * @return 
                           */
                           public   get(){
                               return ;
                           }

                           
                        
                               
                               


                               
                              /**
                               * validate the array for 
                               */
                              protected void validate( param){
                             
                              if ((param != null) && (param.length > )){
                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                              }
                              
                              
                              if ((param != null) && (param.length < )){
                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                              }
                              
                              }


                             /**
                              * Auto generated setter method
                              * @param param 
                              */
                              public void set( param){
                              
                                   validate(param);

                               
                                   clearAllSettingTrackers();
                               
                               
                                  
                                       
                                      
                                           = true;
                                      
                                      
                                           = param != null;
                                      
                                   

                               
                                      this.=param;
                              }

                               
                             
                             /**
                             * Auto generated add method for the array for convenience
                             * @param param 
                             */
                             public void add( param){
                                   if ( == null){
                                    = new {};
                                   }

                            
                                   clearAllSettingTrackers();
                            
                            
                                 //update the setting tracker
                                 = true;
                            

                               java.util.List list =
                            org.apache.axis2.databinding.utils.ConverterUtil.toList();
                               list.add(param);
                               this. =
                             ()list.toArray(
                            new [list.size()]);

                             }
                             
                             

                               
                            
                            
                            /**
                               * Auto generated setter method
                               * @param param 
                               */
                               public void set( param){
                            
                                clearAllSettingTrackers();
                            
                            
                                
                                   
                                        = true;
                                   
                                   
                                       // setting primitive attribute tracker to true
                                        =
                                       
                                           true
                                           param != java.lang.Integer.MIN_VALUE
                                           param != java.lang.Long.MIN_VALUE
                                           param != java.lang.Byte.MIN_VALUE
                                           !java.lang.Double.isNaN(param)
                                           !java.lang.Float.isNaN(param)
                                           param != java.lang.Short.MIN_VALUE
                                           true
                                       ;
                                   
                                   
                                        = param != null;
                                   
                                
                            

                               
                                    
                                       
                                        
                                            if (  ( <= java.lang.String.valueOf(param).length())
                                                        &&  (java.lang.String.valueOf(param).length() <= ) 
                                                        &&  (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).matches(""))  ) {

                                                this.=param;

                                            }
                                            else {
                                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                            }
                                        
                                        
                                            if (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).matches("")) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                            }
                                        
                                        
                                            if (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).length() ==  ) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                            }
                                        
                                        
                                            if (  ( <= java.lang.String.valueOf(param).length())
                                                &&  (java.lang.String.valueOf(param).length() <= )  ) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                            }
                                        
                                        
                                            java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("").toPlainString();
                                            if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal) < 0){
                                                    this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                            }
                                        
                                        
                                            
                                                 if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") < 0){
                                                        this.=param;
                                                    }
                                                    else {
                                                        throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                                    }
                                            
                                            
                                                 if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") > 0){
                                                    this.=param;
                                                }
                                                else {
                                                    throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                                }
                                            
                                            
                                                if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") <= 0){
                                                    this.=param;
                                                }
                                                else {
                                                    throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                                }
                                            
                                            
                                                if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") >= 0){
                                                    this.=param;
                                                }
                                                else {
                                                    throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                                                }
                                            
                                        
                                        
                                             this.=param;
                                        
                                    
                                    

                                    
                                       
                                            this.=param;
                                       
                                    
                                

                               }
                            
                        
                        

                         
                        

                            public java.lang.String toString(){
                                
                                    
                                        return org.apache.axis2.databinding.utils.ConverterUtil.convertToString();
                                    
                                    
                                        return .toString();
                                    
                                
                            }
                        

                      
                   

                
            

             
            

        

        
        
            

              public void setObject(java.lang.Object object){
                  
                      } else 
                      if (object instanceof ){
                            this.localObject = object;
                  
                      } else {
                          throw new java.lang.RuntimeException("Invalid object type");
                      }
              }

        

        
             
             local
             
             

             protected []  ;

             public [] get(){
                return ;
             }

             public void set([] itemList){
                this. = itemList;
             }

            public java.lang.String toString() {
                java.lang.StringBuffer outString = new java.lang.StringBuffer();
                if ( != null){
                    for(int i = 0; i < .length;i++){
                        
                            
                                outString.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString([i])).append(" ");
                            
                            
                                outString.append([i].toString()).append(" ");
                            
                        

                    }
                }
                return outString.toString().trim();
            }
        

     
     
        /**
        *
        * @param parentQName
        * @param factory
        * @return org.apache.axiom.om.OMElement
        */
       public org.apache.axiom.om.OMElement getOMElement (
               final javax.xml.namespace.QName parentQName,
               final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{


        
            
               return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(this,parentQName));
            
            
               return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME));
            
        
        }

         public void serialize(final javax.xml.namespace.QName parentQName,
                                       javax.xml.stream.XMLStreamWriter xmlWriter)
                                throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
                           serialize(parentQName,xmlWriter,false);
         }

         public void serialize(final javax.xml.namespace.QName parentQName,
                               javax.xml.stream.XMLStreamWriter xmlWriter,
                               boolean serializeType)
            throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
            

            
                writeStartElement(null, parentQName.getNamespaceURI(), parentQName.getLocalPart(), xmlWriter);

                
                      } else 
                      if (localObject instanceof ){
                           java.lang.String namespacePrefix = registerPrefix(xmlWriter,"");
                           if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
                               writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                                   namespacePrefix+":",
                                   xmlWriter);
                           } else {
                               writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                                   "",
                                   xmlWriter);
                           }

                       
                           
                               writeQName((javax.xml.namespace.QName)localObject,xmlWriter);
                           
                           
                               xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(()localObject));
                           
                       
                  
                      } else {
                          throw new org.apache.axis2.databinding.ADBException("Invalid object type");
                      }
                xmlWriter.writeEndElement();
            

            

                 
                 

                writeStartElement(null, parentQName.getNamespaceURI(), parentQName.getLocalPart(), xmlWriter);

                
                   
                        writeQNames(local,xmlWriter);
                   
                   
                       xmlWriter.writeCharacters(.this.toString());
                   
                

                xmlWriter.writeEndElement();
            

            
                


                java.lang.String prefix = null;
                java.lang.String namespace = null;
                

                    prefix = parentQName.getPrefix();
                    namespace = parentQName.getNamespaceURI();
                    writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter);
                


                
               
                  if (serializeType){
               

                   java.lang.String namespacePrefix = registerPrefix(xmlWriter,"");
                   if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                           namespacePrefix+":",
                           xmlWriter);
                   } else {
                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                           "",
                           xmlWriter);
                   }

               
                   }
               
                
                
                    
                    local
                     
                     
                    
                        
                        
                           writeAttribute(.getNamespace().getName(),
                                                     .getLocalName(),
                                                     .getAttributeValue(),
                                                     xmlWriter);
                        
                        
                             if ( != null) {
                                 for (int i=0;i <.length;i++){
                                     writeAttribute([i].getNamespace().getName(),
                                                    [i].getLocalName(),
                                                    [i].getAttributeValue(),xmlWriter);
                                     }
                             }
                        
                        
                            
                                
                                    
                                    if ( != null){
                                        writeAttribute("",
                                           "",
                                           .toString(), xmlWriter);
                                    }
                                    
                                      else {
                                          throw new org.apache.axis2.databinding.ADBException("required attribute  is null");
                                      }
                                    
                                
                                
                                    
                                        
                                            
                                               
                                                  if (true) {
                                               
                                               
                                                   if (!=java.lang.Integer.MIN_VALUE) {
                                               
                                               
                                                   if (!=java.lang.Long.MIN_VALUE) {
                                               
                                               
                                                   if (!=java.lang.Byte.MIN_VALUE) {
                                               
                                               
                                                   if (!java.lang.Double.isNaN()) {
                                               
                                               
                                                   if (!java.lang.Float.isNaN()) {
                                               
                                               
                                                   if (!=java.lang.Short.MIN_VALUE) {
                                               
                                               
                                                   if (true) {
                                               
                                           
                                        
                                        
                                            if ( != null){
                                        
                                    
                                        
                                            
                                                writeQNameAttribute("",
                                                         "",
                                                         , xmlWriter);

                                            
                                            
                                                writeAttribute("",
                                                         "",
                                                         org.apache.axis2.databinding.utils.ConverterUtil.convertToString(), xmlWriter);

                                            
                                        
                                      }
                                    
                                      else {
                                          throw new org.apache.axis2.databinding.ADBException("required attribute  is null");
                                      }
                                    
                                
                            
                        
                    
                

                
                
                    
                    local
                    
                    
                    localTracker

                    
                    
                    

                     if (){
                    
                        
                            
                                
                                    if (==null){

                                        writeStartElement(null, "", "", xmlWriter);

                                       // write the nil attribute
                                      writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                      xmlWriter.writeEndElement();
                                    }else{
                                     .serialize(new javax.xml.namespace.QName("",""),
                                        xmlWriter);
                                    }
                                
                                
                                    
                                        
                                            if (==null){
                                                 throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                            }
                                           .serialize(null,xmlWriter);
                                        
                                        
                                            if (==null){
                                                 throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                            }
                                           .serialize(new javax.xml.namespace.QName("",""),
                                               xmlWriter);
                                        
                                    
                                
                            
                        
                        
                             
                                 
                                     
                                      if (!=null){
                                            for (int i = 0;i < .length;i++){
                                                if ([i] != null){
                                                 [i].serialize(null,xmlWriter);
                                                } else {
                                                   
                                                    
                                                        // we don't have to do any thing since minOccures is zero
                                                    
                                                    
                                                           throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                                    
                                                
                                                }

                                            }
                                     } else {
                                        throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                     }
                                 
                                 
                                       if (!=null){
                                            for (int i = 0;i < .length;i++){
                                                if ([i] != null){
                                                 [i].serialize(new javax.xml.namespace.QName("",""),
                                                           xmlWriter);
                                                } else {
                                                   
                                                    
                                                            writeStartElement(null, "", "", xmlWriter);

                                                           // write the nil attribute
                                                           writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                           xmlWriter.writeEndElement();
                                                    
                                                    
                                                        // we don't have to do any thing since minOccures is zero
                                                    
                                                    
                                                           throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                                    
                                                
                                                }

                                            }
                                     } else {
                                        
                                        
                                                writeStartElement(null, "", "", xmlWriter);

                                               // write the nil attribute
                                               writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                               xmlWriter.writeEndElement();
                                        
                                        
                                               throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                        
                                    
                                    }
                                 
                             

                        

                        
                            
                            if (!=null){
                                 for (int i = 0;i < .length;i++){
                                    if ([i] != null){

                                           if ([i] instanceof org.apache.axis2.databinding.ADBBean){
                                                ((org.apache.axis2.databinding.ADBBean)[i]).serialize(
                                                           new javax.xml.namespace.QName("",""),
                                                           xmlWriter,true);
                                            } else {
                                                writeStartElement(null, "", "", xmlWriter);
                                                org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType([i], xmlWriter);
                                                xmlWriter.writeEndElement();
                                             }

                                    } else {
                                       
                                       
                                            // write null attribute
                                            writeStartElement(null, "", "", xmlWriter);

                                           // write the nil attribute
                                           writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                           xmlWriter.writeEndElement();
                                        
                                        
                                              // we have to do nothing since minOccurs is zero
                                        
                                        
                                             throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                        
                                    
                                    }
                                 }
                            } else {
                                 
                                   
                                        // write null attribute
                                        writeStartElement(null, "", "", xmlWriter);

                                       // write the nil attribute
                                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                       xmlWriter.writeEndElement();
                                    
                                    
                                         throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                    
                                
                            }

                        

                        
                            
                            if (!=null){
                                if ( instanceof org.apache.axis2.databinding.ADBBean){
                                    ((org.apache.axis2.databinding.ADBBean)).serialize(
                                               new javax.xml.namespace.QName("",""),
                                               xmlWriter,true);
                                 } else {
                                    writeStartElement(null, "", "", xmlWriter);
                                    org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(, xmlWriter);
                                    xmlWriter.writeEndElement();
                                 }
                            } else {
                                
                                 
                                        // write null attribute
                                           writeStartElement(null, "", "", xmlWriter);

                                           // write the nil attribute
                                           writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                           xmlWriter.writeEndElement();
                                    
                                    
                                         throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                    
                                 
                            }


                        
                        
                        
                             if (!=null) {
                                   namespace = "";
                                   for (int i = 0;i < .length;i++){
                                        
                                            
                                               
                                                  if (true) {
                                               
                                               
                                                   if ([i]!=java.lang.Integer.MIN_VALUE) {
                                               
                                               
                                                   if ([i]!=java.lang.Long.MIN_VALUE) {
                                               
                                               
                                                   if ([i]!=java.lang.Byte.MIN_VALUE) {
                                               
                                               
                                                   if (!java.lang.Double.isNaN([i])) {
                                               
                                               
                                                   if (!java.lang.Float.isNaN([i])) {
                                               
                                               
                                                   if ([i]!=java.lang.Short.MIN_VALUE) {
                                               
                                               
                                                   if (true) {
                                               
                                           
                                        
                                        
                                            if ([i] != null){
                                        
                                                writeStartElement(null, namespace, "", xmlWriter);

                                            
                                                xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString([i]));
                                                xmlWriter.writeEndElement();
                                            

                                            
                                                
                                                    
                                                        try {
                                                            org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, [i], null, true);
                                                        } catch (java.io.IOException ex) {
                                                            throw new javax.xml.stream.XMLStreamException("Unable to read data handler for [" + i + "]", ex);
                                                        }
                                                    
                                                    
                                                        xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString([i]));
                                                    
                                                
                                                xmlWriter.writeEndElement();
                                              
                                                } else {
                                                   
                                                       
                                                           // write null attribute
                                                            namespace = "";
                                                            writeStartElement(null, namespace, "", xmlWriter);
                                                            writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                            xmlWriter.writeEndElement();
                                                       
                                                       
                                                           // we have to do nothing since minOccurs is zero
                                                       
                                                       
                                                           throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                                       

                                                   
                                                }

                                   }
                             } else {
                                 
                                    
                                         // write the null attribute
                                        // write null attribute
                                           writeStartElement(null, "", "", xmlWriter);

                                           // write the nil attribute
                                           writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                           xmlWriter.writeEndElement();
                                    
                                    
                                         throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                    
                                
                             }

                        

                         
                        
                            
                            if ( != null){
                                for (int i = 0;i < .length;i++){
                                    if ([i] != null){
                                        [i].serialize(xmlWriter);
                                    } else {
                                        
                                            
                                                // we have to do nothing since minOccures zero
                                            
                                            
                                               throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                            
                                        
                                    }
                                }
                            } else {
                                throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                            }
                        
                        
                         
                            
                            if ( != null) {
                                .serialize(xmlWriter);
                            } else {
                               throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                            }
                        
                        
                         
                             
                                    namespace = "";
                                    writeStartElement(null, namespace, "", xmlWriter);
                             
                             
                                 
                                 
                                        
                                    if (!=null)  {
                                       try {
                                           org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, , null, true);
                                       } catch (java.io.IOException ex) {
                                           throw new javax.xml.stream.XMLStreamException("Unable to read data handler for ", ex);
                                       }
                                    } else {
                                         
                                             writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                         
                                    }
                                 
                                 
                                    

                                          if (==null){
                                              // write the nil attribute
                                              
                                                  
                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                  
                                                  
                                                     throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                                  
                                              
                                          }else{

                                        
                                            
                                                writeQName(,xmlWriter);
                                            
                                            
                                                .serialize(xmlWriter);
                                            
                                            
                                                   xmlWriter.writeCharacters();
                                            
                                            
                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                            
                                        
                                          }
                                    
                                    
                                       
                                       
                                           
                                                  if (false) {
                                           
                                           
                                               if (==java.lang.Integer.MIN_VALUE) {
                                           
                                           
                                               if (==java.lang.Long.MIN_VALUE) {
                                           
                                           
                                               if (==java.lang.Byte.MIN_VALUE) {
                                           
                                           
                                               if (java.lang.Double.isNaN()) {
                                           
                                           
                                               if (java.lang.Float.isNaN()) {
                                           
                                           
                                               if (==java.lang.Short.MIN_VALUE) {
                                           
                                           
                                               if (false) {
                                           
                                       
                                                
                                                      
                                                         writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                      
                                                      
                                                         throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                                      
                                                  
                                               } else {
                                                    xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                               }
                                    
                                 
                             
                             
                                   xmlWriter.writeEndElement();
                             
                        
                    
                    }

                
                   
               
                    xmlWriter.writeEndElement();
               
            
            

            
            
                
                //We can safely assume an element has only one type associated with it
                local
                
                
                
                

                
                    
                    
                        
                            
                                      if (==null){
                                        java.lang.String namespace = "";
                                        writeStartElement(null, namespace, "", xmlWriter);

                                        // write the nil attribute
                                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                        xmlWriter.writeEndElement();
                                       }else{
                                         .serialize(MY_QNAME,xmlWriter);
                                       }
                            
                            
                                 if (==null){
                                   throw new org.apache.axis2.databinding.ADBException(" cannot be null!");
                                 }
                                 .serialize(MY_QNAME,xmlWriter);
                            
                        
                    
                    
                    

                        
                            if ( instanceof org.apache.axis2.databinding.ADBBean){
                                    ((org.apache.axis2.databinding.ADBBean)).serialize(MY_QNAME, xmlWriter,true);
                            } else {
                        

                        
                            java.lang.String namespace = "";
                            java.lang.String _localName = "";
                        
                        
                            java.lang.String namespace = parentQName.getNamespaceURI();
                            java.lang.String _localName = parentQName.getLocalPart();
                        
                            writeStartElement(null, namespace, _localName, xmlWriter);

                            // add the type details if this is used in a simple type
                               if (serializeType){
                                   java.lang.String namespacePrefix = registerPrefix(xmlWriter,"");
                                   if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
                                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                                           namespacePrefix+":",
                                           xmlWriter);
                                   } else {
                                       writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                                           "",
                                           xmlWriter);
                                   }
                               }
                            
                                          if (==null){
                                            
                                                
                                                     // write the nil attribute
                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                
                                                
                                                     throw new org.apache.axis2.databinding.ADBException(" cannot be null !!");
                                                
                                            
                                         }else{
                                        
                                            
                                                writeQName(,xmlWriter);
                                            
                                            
                                                .serialize(xmlWriter);
                                            
                                            
                                                       xmlWriter.writeCharacters();
                                            
                                            
                                                 org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(, xmlWriter);
                                            
                                            
                                                    
                                                if (!=null)
                                                {
                                                    try {
                                                        org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, , null, true);
                                                    } catch (java.io.IOException ex) {
                                                        throw new javax.xml.stream.XMLStreamException("Unable to read data handler for ", ex);
                                                    }
                                                }
                                             
                                            
                                                       xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                            
                                        
                                         }
                                    
                            

                               
                                       
                                           
                                                  if (false) {
                                           
                                           
                                               if (==java.lang.Integer.MIN_VALUE) {
                                           
                                           
                                               if (==java.lang.Long.MIN_VALUE) {
                                           
                                           
                                               if (==java.lang.Byte.MIN_VALUE) {
                                           
                                           
                                               if (java.lang.Double.isNaN()) {
                                           
                                           
                                               if (java.lang.Float.isNaN()) {
                                           
                                           
                                               if (==java.lang.Short.MIN_VALUE) {
                                           
                                           
                                               if (false) {
                                           
                                       
                                                
                                                      
                                                         writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
                                                      
                                                      
                                                         throw new org.apache.axis2.databinding.ADBException("property value cannot be null!!");
                                                      
                                                  
                                               } else {
                                                    xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                               }
                            
                            xmlWriter.writeEndElement();
                         
                            }
                         
                    
                
            
        

        }

        private static java.lang.String generatePrefix(java.lang.String namespace) {
            if(namespace.equals("")){
                return "";
            }
            return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
        }

        /**
         * Utility method to write an element start tag.
         */
        private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,
                                       javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
            java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
            if (writerPrefix != null) {
                xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
            } else {
                if (namespace.length() == 0) {
                    prefix = "";
                } else if (prefix == null) {
                    prefix = generatePrefix(namespace);
                }

                xmlWriter.writeStartElement(prefix, localPart, namespace);
                xmlWriter.writeNamespace(prefix, namespace);
                xmlWriter.setPrefix(prefix, namespace);
            }
        }
        
        /**
         * Util method to write an attribute with the ns prefix
         */
        private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
                                    java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
            java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
            if (writerPrefix != null) {
                xmlWriter.writeAttribute(writerPrefix, namespace,attName,attValue);
            } else {
                xmlWriter.writeNamespace(prefix, namespace);
                xmlWriter.setPrefix(prefix, namespace);
                xmlWriter.writeAttribute(prefix, namespace,attName,attValue);
            }
        }

        /**
         * Util method to write an attribute without the ns prefix
         */
        private void writeAttribute(java.lang.String namespace,java.lang.String attName,
                                    java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
            if (namespace.equals("")) {
                xmlWriter.writeAttribute(attName,attValue);
            } else {
                xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace), namespace,attName,attValue);
            }
        }


           /**
             * Util method to write an attribute without the ns prefix
             */
            private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
                                             javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {

                java.lang.String attributeNamespace = qname.getNamespaceURI();
                java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
                if (attributePrefix == null) {
                    attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
                }
                java.lang.String attributeValue;
                if (attributePrefix.trim().length() > 0) {
                    attributeValue = attributePrefix + ":" + qname.getLocalPart();
                } else {
                    attributeValue = qname.getLocalPart();
                }

                if (namespace.equals("")) {
                    xmlWriter.writeAttribute(attName, attributeValue);
                } else {
                    registerPrefix(xmlWriter, namespace);
                    xmlWriter.writeAttribute(attributePrefix, namespace, attName, attributeValue);
                }
            }
        /**
         *  method to handle Qnames
         */

        private void writeQName(javax.xml.namespace.QName qname,
                                javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
            java.lang.String namespaceURI = qname.getNamespaceURI();
            if (namespaceURI != null) {
                java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
                if (prefix == null) {
                    prefix = generatePrefix(namespaceURI);
                    xmlWriter.writeNamespace(prefix, namespaceURI);
                    xmlWriter.setPrefix(prefix,namespaceURI);
                }

                if (prefix.trim().length() > 0){
                    xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
                } else {
                    // i.e this is the default namespace
                    xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
                }

            } else {
                xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
            }
        }

        private void writeQNames(javax.xml.namespace.QName[] qnames,
                                 javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {

            if (qnames != null) {
                // we have to store this data until last moment since it is not possible to write any
                // namespace data after writing the charactor data
                java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
                java.lang.String namespaceURI = null;
                java.lang.String prefix = null;

                for (int i = 0; i < qnames.length; i++) {
                    if (i > 0) {
                        stringToWrite.append(" ");
                    }
                    namespaceURI = qnames[i].getNamespaceURI();
                    if (namespaceURI != null) {
                        prefix = xmlWriter.getPrefix(namespaceURI);
                        if ((prefix == null) || (prefix.length() == 0)) {
                            prefix = generatePrefix(namespaceURI);
                            xmlWriter.writeNamespace(prefix, namespaceURI);
                            xmlWriter.setPrefix(prefix,namespaceURI);
                        }

                        if (prefix.trim().length() > 0){
                            stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
                        } else {
                            stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
                        }
                    } else {
                        stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
                    }
                }
                xmlWriter.writeCharacters(stringToWrite.toString());
            }

        }


        /**
         * Register a namespace prefix
         */
        private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
            java.lang.String prefix = xmlWriter.getPrefix(namespace);
            if (prefix == null) {
                prefix = generatePrefix(namespace);
                javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
                while (true) {
                    java.lang.String uri = nsContext.getNamespaceURI(prefix);
                    if (uri == null || uri.length() == 0) {
                        break;
                    }
                    prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
                }
                xmlWriter.writeNamespace(prefix, namespace);
                xmlWriter.setPrefix(prefix, namespace);
            }
            return prefix;
        }


  

     /**
      *  Factory class that keeps the parse method
      */
    public static class Factory{
        private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);

        
        
            
              public static  fromString(javax.xml.stream.XMLStreamReader xmlStreamReader,
                                                     java.lang.String namespaceURI,
                                                     java.lang.String type) throws org.apache.axis2.databinding.ADBException {

                     object = null;
                    try {
                        if ("http://www.w3.org/2001/XMLSchema".equals(namespaceURI)) {
                            object = new ();
                            object.setObject(xmlStreamReader, namespaceURI, type);
                        } else {
                            object = new ();
                            object.setObject(.getTypeObject(namespaceURI, type, xmlStreamReader));
                        }
                        return object;
                    } catch (java.lang.Exception e) {
                        throw new org.apache.axis2.databinding.ADBException("Error in parsing value");
                    }
               }

               public static  fromString(java.lang.String value,
                                                        java.lang.String namespaceURI){
                     object = new ();
                    boolean isValueSet = false;
                    
                      // we have to set the object with the first matching type.
                      if (!isValueSet) {
                        
                            
                                try {
                                    java.lang.reflect.Method converterMethod =
                                            org.apache.axis2.databinding.utils.ConverterUtil.class.getMethod(
                                                    "convertTo",
                                                    new java.lang.Class[]{java.lang.String.class});
                                    object.setObject(converterMethod.invoke(null, new java.lang.Object[]{value}));
                                    isValueSet = true;
                                } catch (java.lang.Exception e) {
                                }
                            
                            
                                try {
                                   object.setObject(.Factory.fromString(value, namespaceURI));
                                   isValueSet = true;
                                } catch (java.lang.Exception e) {
                                }
                            
                        
                      }
                    
                    return object;
                }

                public static  fromString(javax.xml.stream.XMLStreamReader xmlStreamReader,
                                                                    java.lang.String content) {
                    if (content.indexOf(":") > -1){
                        java.lang.String prefix = content.substring(0,content.indexOf(":"));
                        java.lang.String namespaceUri = xmlStreamReader.getNamespaceContext().getNamespaceURI(prefix);
                        return .Factory.fromString(content,namespaceUri);
                    } else {
                       return .Factory.fromString(content,"");
                    }
                }

        

        

             
             
             
            
            


            public static  fromString(javax.xml.stream.XMLStreamReader xmlStreamReader,
                                                                    java.lang.String content)
                                                                    throws org.apache.axis2.databinding.ADBException {

                 object = new ();
                java.lang.String[] values = content.split(" +");
                [] objectValues = new [values.length];

                
                    java.lang.String prefix = null;
                    java.lang.String namespace = null;
                

               
                    java.lang.String valueContent = null;
                    java.lang.String prefix = null;
                    java.lang.String namespace = null;
                


                try {
                    for (int i = 0; i < values.length; i++) {
                      
                          
                              if (values[i].indexOf(":") > 0){
                                 prefix = values[i].substring(0,values[i].indexOf(":"));
                              } else {
                                 prefix = "";
                              }
                              namespace = xmlStreamReader.getNamespaceURI(prefix);
                              objectValues[i] = org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(values[i],namespace);
                          
                          
                           valueContent = values[i];
                           if (valueContent.indexOf(":") > 0){
                               prefix = valueContent.substring(0,valueContent.indexOf(":"));
                           } else {
                               prefix = "";
                           }
                           namespace = xmlStreamReader.getNamespaceURI(prefix);
                           objectValues[i] = .Factory.fromString(valueContent,namespace);
                          
                          
                           objectValues[i] =
                              org.apache.axis2.databinding.utils.ConverterUtil.convertTo(values[i]);
                          
                      

                    }
                    object.set(objectValues);
                    return object;
                } catch (java.lang.Exception e) {
                    throw new org.apache.axis2.databinding.ADBException();
                }

            }
        

        
            
            
            
            

            
                public static  fromString(java.lang.String value,
                                                    java.lang.String namespaceURI){
                     returnValue = new  ();
                    
                        
                            returnValue.set(
                                org.apache.axis2.databinding.utils.ConverterUtil.convertTo(value,namespaceURI));
                        
                        
                            returnValue.set(
                                org.apache.axis2.databinding.utils.ConverterUtil.convertTo(value));
                        
                    

                    return returnValue;
                }

                public static  fromString(javax.xml.stream.XMLStreamReader xmlStreamReader,
                                                                    java.lang.String content) {
                    if (content.indexOf(":") > -1){
                        java.lang.String prefix = content.substring(0,content.indexOf(":"));
                        java.lang.String namespaceUri = xmlStreamReader.getNamespaceContext().getNamespaceURI(prefix);
                        return .Factory.fromString(content,namespaceUri);
                    } else {
                       return .Factory.fromString(content,"");
                    }
                }

            
            
                public static  fromValue( value)
                      throws java.lang.IllegalArgumentException {
                     enumeration = ()
                       
                           
                             _table_.get(value + "");
                           
                           
                               _table_.get(value);
                           
                       

                    // handle unexpected enumeration values properly
                    if (enumeration == null  && !((value == null) || (value.equals("")))) {
                        
                            
                                log.warn("Unexpected value " + value + " for enumeration ");
                            
                            
                                throw new java.lang.IllegalArgumentException();
                            
                        
                    }
                    return enumeration;
                }
                public static  fromString(java.lang.String value,java.lang.String namespaceURI)
                      throws java.lang.IllegalArgumentException {
                    try {
                       
                           
                             return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertTo(value));
                           
                           
                               
                                   
                                       return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(value,namespaceURI));
                                   
                                   
                                       return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertTo(value));
                                   
                               
                           
                       

                    } catch (java.lang.Exception e) {
                        throw new java.lang.IllegalArgumentException();
                    }
                }

                public static  fromString(javax.xml.stream.XMLStreamReader xmlStreamReader,
                                                                    java.lang.String content) {
                    if (content.indexOf(":") > -1){
                        java.lang.String prefix = content.substring(0,content.indexOf(":"));
                        java.lang.String namespaceUri = xmlStreamReader.getNamespaceContext().getNamespaceURI(prefix);
                        return .Factory.fromString(content,namespaceUri);
                    } else {
                       return .Factory.fromString(content,"");
                    }
                }
            

        

        /**
        * static method to create the object
        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
        * Postcondition: If this object is an element, the reader is positioned at its end element
        *                If this object is a complex type, the reader is positioned at the end element of its outer element
        */
        public static  parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
            
             object =
                null;new ();
            
            
                 object = null;
                // initialize a hash map to keep values
                java.util.Map attributeMap = new java.util.HashMap();
                java.util.List extraAttributeList = new java.util.ArrayList<org.apache.axiom.om.OMAttribute>();
            

            int event;
            javax.xml.namespace.QName currentQName = null;
            java.lang.String nillableValue = null;
            java.lang.String prefix ="";
            java.lang.String namespaceuri ="";
            try {
                
                while (!reader.isStartElement() && !reader.isEndElement())
                    reader.next();

                currentQName = reader.getName();
                
                   nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                   if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                         // Skip the element and report the null value.  It cannot have subelements.
                         while (!reader.isEndElement())
                             reader.next();
                         
                             
                                 return null;
                             
                             
                                 
                                 
                                 
                                  
                                       
                                           object.set(java.lang.Integer.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Long.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Byte.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Double.NaN);
                                       
                                       
                                           object.set(java.lang.Float.NaN);
                                       
                                       
                                           object.set(java.lang.Short.MIN_VALUE);
                                       
                                   
                                 return object;
                             
                         

                   }
                
                
                
                if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
                  java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
                        "type");
                  if (fullTypeName!=null){
                    java.lang.String nsPrefix = null;
                    if (fullTypeName.indexOf(":") > -1){
                        nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
                    }
                    nsPrefix = nsPrefix==null?"":nsPrefix;

                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
                    
                        
                            java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
                            object = .Factory.fromString(reader,nsUri,type);
                        
                        
                            if (!"".equals(type)){
                                //find namespace for the prefix
                                java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
                                return ().getTypeObject(
                                     nsUri,type,reader);
                              }
                        
                    
                    
                        throw new org.apache.axis2.databinding.ADBException("The an abstract class can not be instantiated !!!");
                    

                  }
                
                  } else {
                    // i.e this is an union type with out specific xsi:type
                    java.lang.String content = reader.getElementText();
                    if (content.indexOf(":") > -1){
                        // i.e. this could be a qname
                        prefix = content.substring(0,content.indexOf(":"));
                        namespaceuri = reader.getNamespaceContext().getNamespaceURI(prefix);
                        object = .Factory.fromString(content,namespaceuri);
                    } else {
                        object = .Factory.fromString(content,"");
                    }
                

                }

                

                
                    java.lang.String listContent = reader.getElementText();
                    object = .Factory.fromString(reader,listContent);
                

                
                // Note all attributes that were handled. Used to differ normal attributes
                // from anyAttributes.
                java.util.Vector handledAttributes = new java.util.Vector();
                

                
                    
                    
                    
                    
                    
                    
                    tempAttrib

                    
                    // handle attribute ""
                    java.lang.String  =
                        
                            
                                reader.getAttributeValue("","");
                            
                            
                                reader.getAttributeValue(null,"");
                            
                        
                   if (!=null){
                         java.lang.String content = ;
                        
                            
                                int index = .indexOf(":");
                                if(index > -1){
                                     prefix = .substring(0,index);
                                } else {
                                    // i.e this is in default namesace
                                    prefix = "";
                                }
                                namespaceuri = reader.getNamespaceURI(prefix);
                                 
                                     
                                        attributeMap.put("",
                                            org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(,namespaceuri));
                                     
                                     
                                         object.set(
                                            org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(,namespaceuri));
                                     
                                 

                            
                            
                                
                                    
                                        attributeMap.put("",
                                          org.apache.axis2.databinding.utils.ConverterUtil.convertTo());
                                    
                                    
                                        
                                            
                                                  object.set(
                                                        .Factory.fromString(reader,));
                                            
                                            
                                                 object.set(
                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertTo());
                                            
                                        
                                    
                                
                             
                        
                    } else {
                       
                           
                               
                                  
                                       
                                           object.set(java.lang.Integer.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Long.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Byte.MIN_VALUE);
                                       
                                       
                                           object.set(java.lang.Double.NaN);
                                       
                                       
                                           object.set(java.lang.Float.NaN);
                                       
                                       
                                           object.set(java.lang.Short.MIN_VALUE);
                                       
                                   
                               
                           
                           
                               throw new org.apache.axis2.databinding.ADBException("Required attribute  is missing");
                           
                       
                    }
                    handledAttributes.add("");
                    

                    
                    
                        // now run through all any or extra attributes
                        // which were not reflected until now
                        for (int i=0; i < reader.getAttributeCount(); i++) {
                            if (!handledAttributes.contains(reader.getAttributeLocalName(i))) {
                                // this is an anyAttribute and we create
                                // an OMAttribute for this
                                org.apache.axiom.om.OMFactory factory = org.apache.axiom.om.OMAbstractFactory.getOMFactory();
                                org.apache.axiom.om.OMAttribute attr =
                                    factory.createOMAttribute(
                                            reader.getAttributeLocalName(i),
                                            factory.createOMNamespace(
                                                reader.getAttributeNamespace(i), reader.getAttributePrefix(i)),
                                            reader.getAttributeValue(i));

                                // and add it to the extra attributes
                                
                                    
                                         extraAttributeList.add(attr);
                                    
                                    
                                         object.addExtraAttributes(attr);
                                    
                                

                            }
                        }
                    

                

                
                    
                    reader.next();
                
                      
                      
                
                
                    
                        java.util.ArrayList list = new java.util.ArrayList();
                    
                

                
                   
                while(!reader.isEndElement()) {
                    if (reader.isStartElement()  || reader.hasText()){
                
                

                        
                        
                            
                            
                            
                            
                            
                            list
                            loopDone
                            startQname
                            stateMachine
                            
                            
                            
                            

                            new javax.xml.namespace.QName("","")

                           
                                  
                                    
                                        else
                                    
                                
                                
                                    
                                    while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
                                
                            

                            
                            
                                
                                   if (reader.isStartElement()){
                                
                                
                                    
                                        
                                         try{
                                    
                                    if (reader.isStartElement()  || reader.hasText() && .equals(reader.getName())){
                                
                            

                            
                            
                                
                                    
                                    
                                    // Process the array and step past its final element's end.
                                    
                                    
                                        
                                             
                                                 
                                                        .add(.Factory.parse(reader));
                                                        //loop until we find a start element that is not part of this array
                                                        boolean  = false;
                                                        while(!){

                                                            // Step to next element event.
                                                            while (!reader.isStartElement() && !reader.isEndElement())
                                                                reader.next();
                                                            if (reader.isEndElement()){
                                                                //two continuous end elements means we are exiting the xml structure
                                                                 = true;
                                                            } else {
                                                                .add(.Factory.parse(reader));
                                                            }
                                                        }
                                                        // call the converter utility  to convert and set the array
                                                        object.set(()
                                                            org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                                .class,
                                                                ));

                                                 
                                                 
                                                      
                                                          nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                          if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                              .add(null);
                                                              reader.next();
                                                          } else {
                                                        
                                                            
                                                                
                                                                
                                                                    .add(.Factory.parse(reader,
                                                                                    .class));
                                                                
                                                                
                                                                    .add(.Factory.parse(reader));
                                                                
                                                            

                                                        }
                                                        //loop until we find a start element that is not part of this array
                                                        boolean  = false;
                                                        while(!){
                                                            // We should be at the end element, but make sure
                                                            while (!reader.isEndElement())
                                                                reader.next();
                                                            // Step out of this element
                                                            reader.next();
                                                            // Step to next element event.
                                                            while (!reader.isStartElement() && !reader.isEndElement())
                                                                reader.next();
                                                            if (reader.isEndElement()){
                                                                //two continuous end elements means we are exiting the xml structure
                                                                 = true;
                                                            } else {
                                                                if (.equals(reader.getName())){
                                                                    
                                                                      nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                                      if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                                          .add(null);
                                                                          reader.next();
                                                                      } else {
                                                                    
                                                                    
                                                                        
                                                                        
                                                                            .add(.Factory.parse(reader,
                                                                                            .class));
                                                                        
                                                                        
                                                                            .add(.Factory.parse(reader));
                                                                        
                                                                    
                                                                    }
                                                                }else{
                                                                     = true;
                                                                }
                                                            }
                                                        }
                                                        // call the converter utility  to convert and set the array
                                                        
                                                            
                                                                object.set(()
                                                                    .toArray(new [.size()]));
                                                            
                                                            
                                                        object.set(()
                                                            org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                                .class,
                                                                ));
                                                            
                                                        
                                                 
                                             
                                        
                                        

                                        
                                        
                                           boolean =false;

                                             while (!){
                                                 event = reader.getEventType();
                                                 if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event){
                                                       .add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, true));
                                                        if (reader.isEndElement()) {
                                                            // we have two countinuos end elements
                                                            = true;
                                                        }

                                                 }else if (javax.xml.stream.XMLStreamConstants.END_ELEMENT == event){
                                                      = true;
                                                 }else{
                                                     reader.next();
                                                 }

                                             }

                                            
                                                
                                                    object.set(()
                                                        .toArray(new [.size()]));
                                                
                                                
                                             object.set(()
                                                 org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                     .class,));
                                                
                                            
                                        

                                        
                                        

                                             boolean =false;
                                             javax.xml.namespace.QName  = new javax.xml.namespace.QName(
                                                    "",
                                                    "");

                                             while (!){
                                                 event = reader.getEventType();
                                                 if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event
                                                         && .equals(reader.getName())){

                                                      
                                                      
                                                          nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                          if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                              .add(null);
                                                              reader.next();
                                                          }else{
                                                      
                                                           .add(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
                                                                            .class));
                                                       }
                                                 } else if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event &&
                                                            !.equals(reader.getName())){
                                                      = true;
                                                 }else if (javax.xml.stream.XMLStreamConstants.END_ELEMENT == event &&
                                                           !.equals(reader.getName())){
                                                      = true;
                                                 }else if (javax.xml.stream.XMLStreamConstants.END_DOCUMENT == event){
                                                      = true;
                                                 }else{
                                                     reader.next();
                                                 }

                                             }

                                            
                                                
                                                    object.set(()
                                                        .toArray(new [.size()]));
                                                
                                                
                                                    object.set(.toArray());
                                                
                                            
                                        

                                        
                                        
                                               
                                                  nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                  if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                      .add(null);
                                                      reader.next();
                                                  } else {
                                                

                                                    .add(org.apache.axiom.util.stax.XMLStreamReaderUtils.getDataHandlerFromElement(reader));

                                                }
                                                //loop until we find a start element that is not part of this array
                                                boolean  = false;
                                                while(!){
                                                    // Ensure we are at the EndElement
                                                    while (!reader.isEndElement()){
                                                        reader.next();
                                                    }
                                                    // Step out of this element
                                                    reader.next();
                                                    // Step to next element event.
                                                    while (!reader.isStartElement() && !reader.isEndElement())
                                                        reader.next();
                                                    if (reader.isEndElement()){
                                                        //two continuous end elements means we are exiting the xml structure
                                                         = true;
                                                    } else {
                                                        if (.equals(reader.getName())){
                                                             
                                                              nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                              if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                                  .add(null);
                                                                  reader.next();
                                                              } else {
                                                            

                                                                .add(org.apache.axiom.util.stax.XMLStreamReaderUtils.getDataHandlerFromElement(reader));

                                                            }
                                                        }else{
                                                             = true;
                                                        }
                                                    }
                                                }
                                                // call the converter utility  to convert and set the array
                                            
                                                
                                                    object.set(()
                                                        .toArray(new [.size()]));
                                                
                                                
                                                object.set(()
                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                            .class,));
                                                
                                            
                                        

                                        
                                            
                                             
                                             boolean =false;
                                             javax.xml.namespace.QName  = new javax.xml.namespace.QName(
                                                    "",
                                                    "");

                                             while (!){
                                                 event = reader.getEventType();
                                                 if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event
                                                         && .equals(reader.getName())){

                                                      
                                                      
                                                          nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                          if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                              .add(null);
                                                          }else{
                                                      

                                                       .add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
                                                       }
                                                 } else if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event &&
                                                            !.equals(reader.getName())){
                                                      = true;
                                                 }else if (javax.xml.stream.XMLStreamConstants.END_ELEMENT == event &&
                                                           !.equals(reader.getName())){
                                                      = true;
                                                 }else if (javax.xml.stream.XMLStreamConstants.END_DOCUMENT == event){
                                                      = true;
                                                 }else{
                                                     reader.next();
                                                 }

                                             }

                                                 
                                                     
                                                         object.set(()
                                                             .toArray(new [.size()]));
                                                     
                                                     
                                             object.set(()
                                                 org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                     .class,));
                                                     
                                                 

                                        
                                        
                                        
                                             
                                              nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                              if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                  
                                                       
                                                           .add(String.valueOf(java.lang.Integer.MIN_VALUE));
                                                       
                                                       
                                                           .add(String.valueOf(java.lang.Long.MIN_VALUE));
                                                       
                                                       
                                                           .add(String.valueOf(java.lang.Byte.MIN_VALUE));
                                                       
                                                       
                                                           .add(String.valueOf(java.lang.Double.NaN));
                                                       
                                                       
                                                           .add(String.valueOf(java.lang.Float.NaN));
                                                       
                                                       
                                                           .add(String.valueOf(java.lang.Short.MIN_VALUE));
                                                       
                                                       
                                                           .add(null);
                                                       
                                                  
                                                  reader.next();
                                              } else {
                                            
                                            .add(reader.getElementText());
                                            }
                                            //loop until we find a start element that is not part of this array
                                            boolean  = false;
                                            while(!){
                                                // Ensure we are at the EndElement
                                                while (!reader.isEndElement()){
                                                    reader.next();
                                                }
                                                // Step out of this element
                                                reader.next();
                                                // Step to next element event.
                                                while (!reader.isStartElement() && !reader.isEndElement())
                                                    reader.next();
                                                if (reader.isEndElement()){
                                                    //two continuous end elements means we are exiting the xml structure
                                                     = true;
                                                } else {
                                                    if (.equals(reader.getName())){
                                                         
                                                          nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                                          if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                              
                                                                   
                                                                       .add(String.valueOf(java.lang.Integer.MIN_VALUE));
                                                                   
                                                                   
                                                                       .add(String.valueOf(java.lang.Long.MIN_VALUE));
                                                                   
                                                                   
                                                                       .add(String.valueOf(java.lang.Byte.MIN_VALUE));
                                                                   
                                                                   
                                                                       .add(String.valueOf(java.lang.Double.NaN));
                                                                   
                                                                   
                                                                       .add(String.valueOf(java.lang.Float.NaN));
                                                                   
                                                                   
                                                                       .add(String.valueOf(java.lang.Short.MIN_VALUE));
                                                                   
                                                                   
                                                                       .add(null);
                                                                   
                                                              
                                                              reader.next();
                                                          } else {
                                                        
                                                        .add(reader.getElementText());
                                                        }
                                                    }else{
                                                         = true;
                                                    }
                                                }
                                            }
                                            // call the converter utility  to convert and set the array
                                            
                                                
                                                    object.set(()
                                                        .toArray(new [.size()]));
                                                
                                                
                                            object.set(()
                                                org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                                                            .class,));
                                                
                                            
                                        
                                        
                                        
                                    
                                
                                
                                    
                                      nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                      if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                          object.set(null);
                                          reader.next();
                                            
                                            reader.next();
                                          
                                      }else{
                                    
                                        
                                            
                                            
                                                object.set(.Factory.parse(reader,
                                                                .class));
                                            
                                            
                                                object.set(.Factory.parse(reader));
                                            
                                        

                                      
                                        reader.next();
                                    
                                    }
                                
                                
                                
                                    

                                     object.set(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false));
                                       
                                         reader.next();
                                     
                                
                                
                                
                                 
                                     object.set(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
                                                .class));
                                       
                                         reader.next();
                                     
                                
                                
                                
                                

                                    
                                        nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                        if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                             object.set(null);
                                             reader.next();
                                        } else {
                                    
                                            object.set(org.apache.axiom.util.stax.XMLStreamReaderUtils.getDataHandlerFromElement(reader));
                                    
                                        }
                                    

                                      
                                        reader.next();
                                    
                                
                                
                                
                                    
                                       nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                       if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){
                                    

                                    
                                    
                                    nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                    if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                        throw new org.apache.axis2.databinding.ADBException("The element: "+"" +"  cannot be null");
                                    }
                                    

                                    java.lang.String content = reader.getElementText();
                                    
                                        
                                            
                                            int index = content.indexOf(":");
                                            if(index > 0){
                                                prefix = content.substring(0,index);
                                             } else {
                                                prefix = "";
                                             }
                                             namespaceuri = reader.getNamespaceURI(prefix);
                                             object.set(
                                                  org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(content,namespaceuri));
                                            
                                            
                                                org.apache.axiom.om.OMFactory fac = org.apache.axiom.om.OMAbstractFactory.getOMFactory();
                                                org.apache.axiom.om.OMNamespace omNs = fac.createOMNamespace("", "");
                                                org.apache.axiom.om.OMElement _value = fac.createOMElement("", omNs);
                                                _value.addChild(fac.createOMText(_value, content));
                                                object.set(_value);
                                            
                                            
                                              object.set(
                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertTo(content));
                                            
                                        
                                    
                                    
                                        if (content.indexOf(":") > 0) {
                                            // this seems to be a Qname so find the namespace and send
                                            prefix = content.substring(0, content.indexOf(":"));
                                            namespaceuri = reader.getNamespaceURI(prefix);
                                            object = .Factory.fromString(content,namespaceuri);
                                        } else {
                                            // this seems to be not a qname send and empty namespace incase of it is
                                            // check is done in fromString method
                                            object = .Factory.fromString(content,"");
                                        }
                                        
                                        
                                            tempObjectAttrib

                                            
                                                // handle attribute ""
                                                java.lang.Object  =
                                                                attributeMap.get("");
                                               if (!=null){
                                                    
                                                        
                                                           object.set((javax.xml.namespace.QName));
                                                        
                                                        
                                                            object.set(());
                                                        
                                                    
                                                }
                                            

                                            
                                            
                                                for(org.apache.axiom.om.OMAttribute att : extraAttributeList){
                                                    object.addExtraAttributes(att);
                                                }
                                            

                                        

                                    
                                    
                                       } else {
                                           
                                           
                                               
                                                   object.set(java.lang.Integer.MIN_VALUE);
                                               
                                               
                                                   object.set(java.lang.Long.MIN_VALUE);
                                               
                                               
                                                   object.set(java.lang.Byte.MIN_VALUE);
                                               
                                               
                                                   object.set(java.lang.Double.NaN);
                                               
                                               
                                                   object.set(java.lang.Float.NaN);
                                               
                                               
                                                   object.set(java.lang.Short.MIN_VALUE);
                                               
                                           
                                           reader.getElementText(); // throw away text nodes if any.
                                       }
                                    
                                      
                                        reader.next();
                                    
                                
                            
                            
                              }  // End of if for expected property start element
                                
                                    else {
                                        
                                           
                                               object.set(java.lang.Integer.MIN_VALUE);
                                           
                                           
                                               object.set(java.lang.Long.MIN_VALUE);
                                           
                                           
                                               object.set(java.lang.Byte.MIN_VALUE);
                                           
                                           
                                               object.set(java.lang.Double.NaN);
                                           
                                           
                                               object.set(java.lang.Float.NaN);
                                           
                                           
                                               object.set(java.lang.Short.MIN_VALUE);
                                           
                                       
                                    }
                                
                            
                            
                            
                                else{
                                    // 1 - A start element we are not expecting indicates an invalid parameter was passed
                                    throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName());
                                }
                            
                            
                                
                                 } catch (java.lang.Exception e) {}
                            
                        

                          
                            while (!reader.isStartElement() && !reader.isEndElement())
                                reader.next();
                            
                                if (reader.isStartElement())
                                // 2 - A start element we are not expecting indicates a trailing invalid property
                                
                                {
                                    log.warn("Unexpected subelement " + reader.getLocalName());
                                    // consume everything, ending on the current element's endtag
                                    while (!(reader.isEndElement() && reader.getName().equals(currentQName))) {
                                        reader.next();
                                    }
                                }
                                
                                
                                    throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName());
                                
                            
                        

                          
                        
                          
                             else{
                                        // 3 - A start element we are not expecting indicates an invalid parameter was passed
                                        
                                            log.warn("Unexpected subelement " + reader.getLocalName());
                                            // consume everything, ending on the unexpected subelement's endtag
                                            javax.xml.namespace.QName subQName = reader.getName();
                                            while (!(reader.isEndElement() && reader.getName().equals(subQName))) {
                                                reader.next();
                                            }
                                            // skip past this extra element completely
                                            reader.next();
                                        
                                        
                                            throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName());
                                        
                             }
                          
                             } else {
                                reader.next();
                             }  
                           }  // end of while loop
                        
                        



            } catch (javax.xml.stream.XMLStreamException e) {
                throw new java.lang.Exception(e);
            }

            return object;
        }

        }//end of factory class

        

        }
           
    





© 2015 - 2024 Weber Informatics LLC | Privacy Policy