public void serialize( final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType) throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException { java.lang.String prefix = null; java.lang.String namespace = null; prefix = parentQName.getPrefix(); namespace = parentQName.getNamespaceURI(); writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); if (serializeType) { java.lang.String namespacePrefix = registerPrefix(xmlWriter, "http://state.clustering.axis2.apache.org/xsd"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) { writeAttribute( "xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix + ":StateManager", xmlWriter); } else { writeAttribute( "xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", "StateManager", xmlWriter); } } if (localConfigurationContextTracker) { if (localConfigurationContext == null) { writeStartElement( null, "http://state.clustering.axis2.apache.org/xsd", "configurationContext", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localConfigurationContext.serialize( new javax.xml.namespace.QName( "http://state.clustering.axis2.apache.org/xsd", "configurationContext"), xmlWriter); } } if (localReplicationExcludePatternsTracker) { if (localReplicationExcludePatterns == null) { writeStartElement( null, "http://state.clustering.axis2.apache.org/xsd", "replicationExcludePatterns", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localReplicationExcludePatterns.serialize( new javax.xml.namespace.QName( "http://state.clustering.axis2.apache.org/xsd", "replicationExcludePatterns"), xmlWriter); } } xmlWriter.writeEndElement(); }
public void serialize( final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType) throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException { java.lang.String prefix = null; java.lang.String namespace = null; prefix = parentQName.getPrefix(); namespace = parentQName.getNamespaceURI(); writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); if (serializeType) { java.lang.String namespacePrefix = registerPrefix(xmlWriter, "http://clustering.axis2.apache.org/xsd"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) { writeAttribute( "xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix + ":ClusteringAgent", xmlWriter); } else { writeAttribute( "xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", "ClusteringAgent", xmlWriter); } } if (localConfigurationContextTracker) { if (localConfigurationContext == null) { writeStartElement( null, "http://clustering.axis2.apache.org/xsd", "configurationContext", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localConfigurationContext.serialize( new javax.xml.namespace.QName( "http://clustering.axis2.apache.org/xsd", "configurationContext"), xmlWriter); } } if (localDomainsTracker) { if (localDomains == null) { writeStartElement(null, "http://clustering.axis2.apache.org/xsd", "domains", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localDomains.serialize( new javax.xml.namespace.QName("http://clustering.axis2.apache.org/xsd", "domains"), xmlWriter); } } if (localMembersTracker) { if (localMembers != null) { if (localMembers instanceof org.apache.axis2.databinding.ADBBean) { ((org.apache.axis2.databinding.ADBBean) localMembers) .serialize( new javax.xml.namespace.QName( "http://clustering.axis2.apache.org/xsd", "members"), xmlWriter, true); } else { writeStartElement(null, "http://clustering.axis2.apache.org/xsd", "members", xmlWriter); org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType( localMembers, xmlWriter); xmlWriter.writeEndElement(); } } else { // write null attribute writeStartElement(null, "http://clustering.axis2.apache.org/xsd", "members", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } } if (localNodeManagerTracker) { if (localNodeManager == null) { writeStartElement(null, "http://clustering.axis2.apache.org/xsd", "nodeManager", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localNodeManager.serialize( new javax.xml.namespace.QName("http://clustering.axis2.apache.org/xsd", "nodeManager"), xmlWriter); } } if (localStateManagerTracker) { if (localStateManager == null) { writeStartElement( null, "http://clustering.axis2.apache.org/xsd", "stateManager", xmlWriter); // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); xmlWriter.writeEndElement(); } else { localStateManager.serialize( new javax.xml.namespace.QName("http://clustering.axis2.apache.org/xsd", "stateManager"), xmlWriter); } } xmlWriter.writeEndElement(); }