/** * static method to create the object Precondition: If this object is an element, the current or * next start element starts this object and any intervening reader events are ignorable If this * object is not an element, it is a complex type and the reader is at the event just after the * outer start element Postcondition: If this object is an element, the reader is positioned at * its end element If this object is a complex type, the reader is positioned at the end element * of its outer element */ public static ClusteringAgent parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { ClusteringAgent object = null; int event; java.lang.String nillableValue = null; java.lang.String prefix = ""; java.lang.String namespaceuri = ""; try { while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) { java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"); if (fullTypeName != null) { java.lang.String nsPrefix = null; if (fullTypeName.indexOf(":") > -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":")); } nsPrefix = nsPrefix == null ? "" : nsPrefix; java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1); if (!"ClusteringAgent".equals(type)) { // find namespace for the prefix java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); return (ClusteringAgent) org.apache.axis2.clustering.management.xsd.ExtensionMapper.getTypeObject( nsUri, type, reader); } throw new org.apache.axis2.databinding.ADBException( "The an abstract class can not be instantiated !!!"); } } // Note all attributes that were handled. Used to differ normal attributes // from anyAttributes. java.util.Vector handledAttributes = new java.util.Vector(); reader.next(); while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName( "http://clustering.axis2.apache.org/xsd", "configurationContext") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setConfigurationContext(null); reader.next(); reader.next(); } else { object.setConfigurationContext( org.apache.axis2.context.xsd.ConfigurationContext.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://clustering.axis2.apache.org/xsd", "domains") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setDomains(null); reader.next(); reader.next(); } else { object.setDomains(java.util.xsd.Set.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://clustering.axis2.apache.org/xsd", "members") .equals(reader.getName())) { object.setMembers( org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject( reader, org.apache.axis2.clustering.management.xsd.ExtensionMapper.class)); reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName( "http://clustering.axis2.apache.org/xsd", "nodeManager") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setNodeManager(null); reader.next(); reader.next(); } else { object.setNodeManager( org.apache.axis2.clustering.management.xsd.NodeManager.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName( "http://clustering.axis2.apache.org/xsd", "stateManager") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setStateManager(null); reader.next(); reader.next(); } else { object.setStateManager( org.apache.axis2.clustering.state.xsd.StateManager.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement()) // A start element we are not expecting indicates a trailing invalid property throw new org.apache.axis2.databinding.ADBException( "Unexpected subelement " + reader.getName()); } catch (javax.xml.stream.XMLStreamException e) { throw new java.lang.Exception(e); } return object; }
/** * static method to create the object Precondition: If this object is an element, the current or * next start element starts this object and any intervening reader events are ignorable If this * object is not an element, it is a complex type and the reader is at the event just after the * outer start element Postcondition: If this object is an element, the reader is positioned at * its end element If this object is a complex type, the reader is positioned at the end element * of its outer element */ public static Policy parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { Policy object = new Policy(); int event; java.lang.String nillableValue = null; java.lang.String prefix = ""; java.lang.String namespaceuri = ""; try { while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) { java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"); if (fullTypeName != null) { java.lang.String nsPrefix = null; if (fullTypeName.indexOf(":") > -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":")); } nsPrefix = nsPrefix == null ? "" : nsPrefix; java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1); if (!"Policy".equals(type)) { // find namespace for the prefix java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); return (Policy) org.apache.axis2.transaction.xsd.ExtensionMapper.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(); reader.next(); while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "empty") .equals(reader.getName())) { java.lang.String content = reader.getElementText(); object.setEmpty( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "firstPolicyComponent") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setFirstPolicyComponent(null); reader.next(); reader.next(); } else { object.setFirstPolicyComponent( org.apache.neethi.xsd.PolicyComponent.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "policyComponents") .equals(reader.getName())) { object.setPolicyComponents( org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject( reader, org.apache.axis2.transaction.xsd.ExtensionMapper.class)); reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "assertions") .equals(reader.getName())) { object.setAssertions( org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject( reader, org.apache.axis2.transaction.xsd.ExtensionMapper.class)); reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "type") .equals(reader.getName())) { java.lang.String content = reader.getElementText(); object.setType(org.apache.axis2.databinding.utils.ConverterUtil.convertToShort(content)); reader.next(); } // End of if for expected property start element else { object.setType(java.lang.Short.MIN_VALUE); } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "alternatives") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setAlternatives(null); reader.next(); reader.next(); } else { object.setAlternatives(authclient.java.util.xsd.Iterator.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "attributes") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if ("true".equals(nillableValue) || "1".equals(nillableValue)) { object.setAttributes(null); reader.next(); reader.next(); } else { object.setAttributes(authclient.java.util.xsd.Map.Factory.parse(reader)); reader.next(); } } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "id") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) { java.lang.String content = reader.getElementText(); object.setId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); } else { reader.getElementText(); // throw away text nodes if any. } reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "name") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) { java.lang.String content = reader.getElementText(); object.setName( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); } else { reader.getElementText(); // throw away text nodes if any. } reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://neethi.apache.org/xsd", "type") .equals(reader.getName())) { java.lang.String content = reader.getElementText(); object.setType(org.apache.axis2.databinding.utils.ConverterUtil.convertToShort(content)); reader.next(); } // End of if for expected property start element else { object.setType(java.lang.Short.MIN_VALUE); } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement()) // A start element we are not expecting indicates a trailing invalid property throw new org.apache.axis2.databinding.ADBException( "Unexpected subelement " + reader.getLocalName()); } catch (javax.xml.stream.XMLStreamException e) { throw new java.lang.Exception(e); } return object; }
/** * static method to create the object Precondition: If this object is an element, the current or * next start element starts this object and any intervening reader events are ignorable If this * object is not an element, it is a complex type and the reader is at the event just after the * outer start element Postcondition: If this object is an element, the reader is positioned at * its end element If this object is a complex type, the reader is positioned at the end element * of its outer element */ public static ResourceServiceException parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { ResourceServiceException object = new ResourceServiceException(); int event; java.lang.String nillableValue = null; java.lang.String prefix = ""; java.lang.String namespaceuri = ""; try { while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) { java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"); if (fullTypeName != null) { java.lang.String nsPrefix = null; if (fullTypeName.indexOf(":") > -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":")); } nsPrefix = nsPrefix == null ? "" : nsPrefix; java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1); if (!"ResourceServiceException".equals(type)) { // find namespace for the prefix java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); return (ResourceServiceException) org.wso2.carbon.registry.resource.services.utils.xsd.ExtensionMapper .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(); reader.next(); while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName( "http://services.resource.registry.carbon.wso2.org", "Exception") .equals(reader.getName())) { object.setException( org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject( reader, org.wso2.carbon.registry.resource.services.utils.xsd.ExtensionMapper.class)); reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName( "http://utils.services.resource.registry.carbon.wso2.org/xsd", "message") .equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) { java.lang.String content = reader.getElementText(); object.setMessage( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); } else { reader.getElementText(); // throw away text nodes if any. } reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement()) // A start element we are not expecting indicates a trailing invalid property throw new org.apache.axis2.databinding.ADBException( "Unexpected subelement " + reader.getLocalName()); } catch (javax.xml.stream.XMLStreamException e) { throw new java.lang.Exception(e); } return object; }