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

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

There is a newer version: 1.8.2
Show newest version



    

        
        
        
        
          
        
        

        
        
        
        
        
        
        
        
        
        Helper

        

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

            package ;

            /**
            *   bean class
            */
        


    
    

    public static class   extends 
        {
        
            /* 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();
                              }
                         
                         
                              if ((param != null) && (param.length < )){
                                throw new java.lang.RuntimeException();
                              }
                         
                         }


                         /**
                         * 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   ;
                        
                        private static java.util.HashMap _table_ = new java.util.HashMap();

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

                        }

                        
                            public static final  _ =
                                org.apache.axis2.databinding.utils.ConverterUtil.convertTo("");
                        
                        
                            public static final   =
                                new (_);
                        

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

                                if (enumeration==null) throw new java.lang.IllegalArgumentException();
                                return enumeration;
                            }
                            public static  fromString(java.lang.String value)
                                  throws java.lang.IllegalArgumentException {
                                try {
                                   
                                       
                                         return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertTo(value));
                                       
                                       
                                           return fromValue(new (value));
                                       
                                   

                                } catch (java.lang.Exception e) {
                                    throw new java.lang.IllegalArgumentException();
                                }
                            }
                            public boolean equals(java.lang.Object obj) {return (obj == this);}
                            public int hashCode() { return toString().hashCode();}
                            public java.lang.String toString() {
                            
                                
                                    return  + "";
                                
                                
                                    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 ;
                           

                           /**
                           * 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();
                              }
                              
                              
                              if ((param != null) && (param.length < )){
                                throw new java.lang.RuntimeException();
                              }
                              
                              }


                             /**
                              * 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();
                                            }
                                        
                                        
                                            if ( param.matches( "" )) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException();
                                            }
                                        
                                        
                                            if ( param.length() ==  ) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException();
                                            }
                                        
                                        
                                            if (  ( < param.length()) 
                                                &&  (param.length() >= )  ) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException();
                                            }
                                        
                                        
                                            if (   <    <=  param  >    >=   ) {
                                                this.=param;
                                            }
                                            else {
                                                throw new java.lang.RuntimeException();
                                            }
                                        
                                        
                                             this.=param;
                                        
                                    
                                    

                                    
                                            this.=param;
                                    
                                

                               }
                            
                        
                        

                      
                   

                
            

             
            

        

   }
    
    
    
public static class 
        implements org.apache.axis2.databinding.ADBHelper<> {

     
     .
     .

    public static final  INSTANCE = new ();

    private () {}

    public java.lang.Class<> getBeanClass() {
        return .class;
    }
    
     
     
        /**
        *
        * @param parentQName
        * @param factory
        * @return org.apache.axiom.om.OMElement
        */
       public org.apache.axiom.om.OMElement getOMElement (
               final  bean,
               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.ADBHelperDataSource(bean,parentQName,this));
            
            
               return factory.createOMElement(new org.apache.axis2.databinding.ADBHelperDataSource(bean,.MY_QNAME,this));
            
        
        }

         public void serialize( typedBean,
                           javax.xml.namespace.QName parentQName,
                           javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {

             
            
                

                java.lang.String prefix = parentQName.getPrefix();
                java.lang.String namespace = parentQName.getNamespaceURI();

                writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter);

                
               
               writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
                       registerPrefix(xmlWriter,"")+":",
                       xmlWriter);
               
                
                
                    
                    typedBean.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);
                                     }
                             }
                        
                        
                        
                             // optional attribute 
                             try {
                                writeAttribute("",
                                               "",
                                               org.apache.axis2.databinding.utils.ConverterUtil.convertToString(), xmlWriter);
                            } catch (NullPointerException e) {
                                // If  was null
                                // it can not be serialized.
                            }
                        
                        
                             writeAttribute("",
                                                     "",
                                                      org.apache.axis2.databinding.utils.ConverterUtil.convertToString(),
                            xmlWriter);
                        
                    
                

                
                
                    
                    typedBean.local
                    
                    
                    
                    typedBean.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{
                                     Helper.INSTANCE.serialize(,
                                       new javax.xml.namespace.QName("",""),
                                        xmlWriter);
                                    }
                                
                                
                                    if (==null){
                                         throw new org.apache.axis2.databinding.ADBException(" cannot be null!!");
                                    }
                                   Helper.INSTANCE.serialize(,
                                       new javax.xml.namespace.QName("",""),
                                       xmlWriter);
                                
                            
                        
                        
                             if (!=null){
                                    for (int i = 0;i < .length;i++){
                                        if ([i] != null){
                                         Helper.INSTANCE.serialize([i],
                                                   new javax.xml.namespace.QName("",""),
                                                   xmlWriter);
                                        } 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 don't have to do any thing since minOccures 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){
                                 for (int i = 0;i < .length;i++){
                                    if ([i] != null){
                                           // write null attribute
                                            writeStartElement(null, "", "", xmlWriter);
                                            [i].serialize(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){
                                // write null attribute
                                writeStartElement(null, "", "", xmlWriter);
                                .serialize(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 = "";
                                   boolean emptyNamespace = namespace == null || namespace.length() == 0;
                                   prefix =  emptyNamespace ? null : xmlWriter.getPrefix(namespace);
                                   for (int i = 0;i < .length;i++){
                                        
                                            writeStartElement(null, namespace, "", xmlWriter);
                                            xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString([i]));
                                            xmlWriter.writeEndElement();

                                        
                                        
                                            if ([i] != null){
                                                writeStartElement(null, namespace, "", xmlWriter);
                                            
                                                
                                                    xmlWriter.writeCharacters([i]);
                                                
                                                
                                                    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{

                                        
                                            
                                                        java.lang.String namespaceURI =.getNamespaceURI();
                                                        if(namespaceURI !=null){
                                                           prefix = .getPrefix();
                                                           if (prefix == null) {
                                                            prefix = generatePrefix(namespaceURI);
                                                          }
                                                         xmlWriter.writeNamespace(prefix,namespaceURI );
                                                         xmlWriter.writeCharacters(prefix + ":"+ org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                                        } else {
                                                           xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                                        }
                                            
                                            
                                                .serialize(xmlWriter);
                                            
                                            
                                                   xmlWriter.writeCharacters();
                                            
                                            
                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString());
                                            
                                        
                                          }
                                    
                                    
                                       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
                typedBean.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{
                                         Helper.INSTANCE.serialize(,
                                         .MY_QNAME,
                                         xmlWriter);
                                       }
                            
                            
                                 if (==null){
                                   throw new org.apache.axis2.databinding.ADBException(" cannot be null!");
                                 }
                                 Helper.INSTANCE.serialize(,
                                         .MY_QNAME,
                                         xmlWriter);
                            
                        
                    
                    
                    
                        
                            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);

                            
                                          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());
                                            
                                        
                                         }
                                    
                            
                               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);
            }
        }

        /**
         * 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;
        }


        /**
        * 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  parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
             object = new ();
             object = null;
            int event;
            javax.xml.namespace.QName currentQName;
            java.lang.String nillableValue = null;
            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;
                             
                             
                                 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 = fullTypeName.substring(0,fullTypeName.indexOf(":"));
                    nsPrefix = nsPrefix==null?"":nsPrefix;

                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
                    if (!"".equals(type)){
                        //find namespace for the prefix
                        java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
                        return ().getTypeObject(
                             nsUri,type,reader);
                      }

                  }

                }
                

                
                // 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("","");
                   if (!=null){
                         java.lang.String content = ;
                        
                            
                                int index = .indexOf(":");
                                java.lang.String prefix ="";
                                java.lang.String namespaceuri ="";
                                if(index >0){
                                     prefix = .substring(0,index);
                                     namespaceuri = reader.getNamespaceURI(prefix);
                                 }
                                 object.set(
                                      org.apache.axis2.databinding.utils.ConverterUtil.convertToQName(,namespaceuri));
                            
                            
                         object.set(
                           org.apache.axis2.databinding.utils.ConverterUtil.convertTo(
                                ));
                            
                        
                    }
                    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
                                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()){
                                
                                
                                    if (reader.isStartElement()  || reader.hasText() && .equals(reader.getName())){
                                
                            

                            
                            
                                
                                    
                                    
                                    // Process the array and step past its final element's end.
                                    
                                    
                                        
                                             
                                              nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil");
                                              if ("true".equals(nillableValue) || "1".equals(nillableValue)){
                                                  .add(null);
                                                  reader.next();
                                              } else {
                                            
                                                .add(Helper.INSTANCE.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(Helper.INSTANCE.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.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(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(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(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(Helper.INSTANCE.parse(reader));
                                      
                                        reader.next();
                                    
                                    }
                                
                                
                                
                                    

                                     object.set(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false));
                                       
                                         reader.next();
                                     
                                
                                
                                
                                 
                                     boolean  = false;
                                     javax.xml.namespace.QName  = new javax.xml.namespace.QName(
                                                                         "",
                                                                         "");

                                     while(!){
                                         if (reader.isStartElement() && .equals(reader.getName())){
                                              = true;
                                         }else{
                                             reader.next();
                                         }
                                     }

                                     object.set(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
                                       
                                         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)){
                                    
                                    java.lang.String content = reader.getElementText();
                                    
                                        
                                            
                                            int index = content.indexOf(":");
                                            java.lang.String prefix ="";
                                            java.lang.String namespaceuri ="";
                                            if(index > 0){
                                                 prefix = content.substring(0,index);
                                                 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));
                                            
                                        
                                    
                                    
                                    object = .fromString(content);
                                    
                                    
                                       } else {
                                           reader.getElementText(); // throw away text nodes if any.
                                       }
                                    
                                      
                                        reader.next();
                                    
                                
                            
                            
                              }  // End of if for expected property start element
                            
                            
                                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.getLocalName());
                                }
                            
                        

                          
                            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.getLocalName());
                                
                        

                          
                        
                          
                             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.getLocalName());
                                        
                             }
                          
                             } else reader.next();  
                            }  // end of while loop
                        
                        


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

            return object;
        }



}
    
    
           
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy