gt:                                 prefix = generatePrefix(namespace);
context: /**
  * Global Sensor Networks (GSN) Source Code
  * Copyright (c) 2006-2014, Ecole Polytechnique Federale de Lausanne (EPFL)
  * 
  * This file is part of GSN.
  * 
  * GSN is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 2 of the License, or
  * (at your option) any later version.
  * 
  * GSN is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  * 
  * You should have received a copy of the GNU General Public License
  * along with GSN.  If not, see <http://www.gnu.org/licenses/>.
  * 
  * File: webservices/standard/src/gsn/webservice/standard/RegisterQuery.java
  *
  * @author Timotee Maret
  *
  */
  
  
  /**
   * RegisterQuery.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis2 version: 1.4.1  Built on : Aug 13, 2008 (05:03:41 LKT)
   */
              
                  package gsn.webservice.standard;
              
  
              /**
              *  RegisterQuery bean class
              */
          
          public  class RegisterQuery
          implements org.apache.axis2.databinding.ADBBean{
          
                  public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
                  "http://standard.webservice.gsn",
                  "registerQuery",
                  "ns3");
  
              
  
          private static java.lang.String generatePrefix(java.lang.String namespace) {
              if(namespace.equals("http://standard.webservice.gsn")){
                  return "ns3";
              }
              return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
          }
  
          
  
                          /**
                          * field for AcDetails
                          */
  
                          
                                      protected gsn.webservice.standard.xsd.GSNWebService_ACDetails localAcDetails ;
                                  
                             /*  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 localAcDetailsTracker = false ;
                             
  
                             /**
                             * Auto generated getter method
                             * @return gsn.webservice.standard.xsd.GSNWebService_ACDetails
                             */
                             public  gsn.webservice.standard.xsd.GSNWebService_ACDetails getAcDetails(){
                                 return localAcDetails;
                             }
  
                             
                          
                              /**
                                 * Auto generated setter method
                                 * @param param AcDetails
                                 */
                                 public void setAcDetails(gsn.webservice.standard.xsd.GSNWebService_ACDetails param){
                              
                                         if (param != null){
                                            //update the setting tracker
                                            localAcDetailsTracker = true;
                                         } else {
                                            localAcDetailsTracker = false;
                                                
                                         }
                                     
                                              this.localAcDetails=param;
                                      
  
                                 }
                              
  
                          /**
                          * field for OutputStructure
                          * This was an Array!
                          */
  
                          
                                      protected gsn.webservice.standard.xsd.GSNWebService_DataField[] localOutputStructure ;
                                  
                             /*  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 localOutputStructureTracker = false ;
                             
  
                             /**
                             * Auto generated getter method
                             * @return gsn.webservice.standard.xsd.GSNWebService_DataField[]
                             */
                             public  gsn.webservice.standard.xsd.GSNWebService_DataField[] getOutputStructure(){
                                 return localOutputStructure;
                             }
  
                             
                          
  
  
                                 
                                /**
                                 * validate the array for OutputStructure
                                 */
                                protected void validateOutputStructure(gsn.webservice.standard.xsd.GSNWebService_DataField[] param){
                               
                                }
  
  
                               /**
                                * Auto generated setter method
                                * @param param OutputStructure
                                */
                                public void setOutputStructure(gsn.webservice.standard.xsd.GSNWebService_DataField[] param){
                                
                                     validateOutputStructure(param);
  
                                 
                                            if (param != null){
                                               //update the setting tracker
                                               localOutputStructureTracker = true;
                                            } else {
                                               localOutputStructureTracker = false;
                                                   
                                            }
                                        
                                        this.localOutputStructure=param;
                                }
  
                                 
                               
                               /**
                               * Auto generated add method for the array for convenience
                               * @param param gsn.webservice.standard.xsd.GSNWebService_DataField
                               */
                               public void addOutputStructure(gsn.webservice.standard.xsd.GSNWebService_DataField param){
                                     if (localOutputStructure == null){
                                     localOutputStructure = new gsn.webservice.standard.xsd.GSNWebService_DataField[]{};
                                     }
  
                              
                                   //update the setting tracker
                                  localOutputStructureTracker = true;
                              
  
                                 java.util.List list =
                              org.apache.axis2.databinding.utils.ConverterUtil.toList(localOutputStructure);
                                 list.add(param);
                                 this.localOutputStructure =
                               (gsn.webservice.standard.xsd.GSNWebService_DataField[])list.toArray(
                              new gsn.webservice.standard.xsd.GSNWebService_DataField[list.size()]);
  
                               }
                               
  
                          /**
                          * field for Vsnames
                          * This was an Array!
                          */
  
                          
                                      protected java.lang.String[] localVsnames ;
                                  
                             /*  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 localVsnamesTracker = false ;
                             
  
                             /**
                             * Auto generated getter method
                             * @return java.lang.String[]
                             */
                             public  java.lang.String[] getVsnames(){
                                 return localVsnames;
                             }
  
                             
                          
  
  
                                 
                                /**
                                 * validate the array for Vsnames
                                 */
                                protected void validateVsnames(java.lang.String[] param){
                               
                                }
  
  
                               /**
                                * Auto generated setter method
                                * @param param Vsnames
                                */
                                public void setVsnames(java.lang.String[] param){
                                
                                     validateVsnames(param);
  
                                 
                                            if (param != null){
                                               //update the setting tracker
                                               localVsnamesTracker = true;
                                            } else {
                                               localVsnamesTracker = false;
                                                   
                                            }
                                        
                                        this.localVsnames=param;
                                }
  
                                 
                               
                               /**
                               * Auto generated add method for the array for convenience
                               * @param param java.lang.String
                               */
                               public void addVsnames(java.lang.String param){
                                     if (localVsnames == null){
                                     localVsnames = new java.lang.String[]{};
                                     }
  
                              
                                   //update the setting tracker
                                  localVsnamesTracker = true;
                              
  
                                 java.util.List list =
                              org.apache.axis2.databinding.utils.ConverterUtil.toList(localVsnames);
                                 list.add(param);
                                 this.localVsnames =
                               (java.lang.String[])list.toArray(
                              new java.lang.String[list.size()]);
  
                               }
                               
  
                          /**
                          * field for QueryName
                          * This was an Attribute!
                          */
  
                          
                                      protected java.lang.String localQueryName ;
                                  
  
                             /**
                             * Auto generated getter method
                             * @return java.lang.String
                             */
                             public  java.lang.String getQueryName(){
                                 return localQueryName;
                             }
  
                             
                          
                              /**
                                 * Auto generated setter method
                                 * @param param QueryName
                                 */
                                 public void setQueryName(java.lang.String param){
                              
                                              this.localQueryName=param;
                                      
  
                                 }
                              
  
                          /**
                          * field for Query
                          * This was an Attribute!
                          */
  
                          
                                      protected java.lang.String localQuery ;
                                  
  
                             /**
                             * Auto generated getter method
                             * @return java.lang.String
                             */
                             public  java.lang.String getQuery(){
                                 return localQuery;
                             }
  
                             
                          
                              /**
                                 * Auto generated setter method
                                 * @param param Query
                                 */
                                 public void setQuery(java.lang.String param){
                              
                                              this.localQuery=param;
                                      
  
                                 }
                              
  
       /**
       * isReaderMTOMAware
       * @return true if the reader supports MTOM
       */
     public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
          boolean isReaderMTOMAware = false;
          
          try{
            isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
          }catch(java.lang.IllegalArgumentException e){
            isReaderMTOMAware = false;
          }
          return isReaderMTOMAware;
     }
       
       
          /**
          *
          * @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{
  
  
          
                  org.apache.axiom.om.OMDataSource dataSource =
                         new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
  
                   public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
                         RegisterQuery.this.serialize(MY_QNAME,factory,xmlWriter);
                   }
                 };
                 return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
                 MY_QNAME,factory,dataSource);
              
         }
  
           public void serialize(final javax.xml.namespace.QName parentQName,
                                         final org.apache.axiom.om.OMFactory factory,
                                         org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
                                  throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
                             serialize(parentQName,factory,xmlWriter,false);
           }
  
           public void serialize(final javax.xml.namespace.QName parentQName,
                                 final org.apache.axiom.om.OMFactory factory,
                                 org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
                                 boolean serializeType)
              throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
              
                  
  
  
                  java.lang.String prefix = null;
                  java.lang.String namespace = null;
                  
  
                      prefix = parentQName.getPrefix();
                      namespace = parentQName.getNamespaceURI();
  
                      if ((namespace != null) && (namespace.trim().length() > 0)) {
                          java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
                          if (writerPrefix != null) {
                              xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
                          } else {
                              if (prefix == null) {
  