/** * A complex type name is derived from an XML schema complex type name. * * @param xsdComplexType the XSD complex type * @return a unique type name for this complex type */ private static String getComplexTypeName(XmlSchemaComplexType xsdComplexType) { return xsdComplexType.getName(); }
/** * Get a name for a record type. * <p/> * TODO XML schema names might not be valid Avro type names * * @param xsdType the XML schema complex type. * @return an avro type name */ public String getAvroTypeName(final XmlSchemaComplexType xsdType) { return xsdType.getName(); }
/** * Process an XML schema complex type. * * @param schema the XML Schema * @param jaxbNamespace the JAXB namespace * @param jaxbNamespacePrefix the JAXB namespace prefix * @param xsdComplexType the XML Schema type to process */ protected void processComplexType(final XmlSchema schema, final String jaxbNamespace, final String jaxbNamespacePrefix, final XmlSchemaComplexType xsdComplexType) { if (_log.isDebugEnabled()) { _log.debug("process started for complex type = " + xsdComplexType.getName()); } processParticle(schema, jaxbNamespace, jaxbNamespacePrefix, xsdComplexType.getQName(), xsdComplexType.getParticle()); if (_log.isDebugEnabled()) { _log.debug("process ended for complex type = " + xsdComplexType.getName()); } }
/** * Annotated complex types as group items. * * @param schema the XML Schema being annotated * @param xsdComplexType the XML schema type * @param elc the DOM Element representing the Cobol annotation * @param level the current level in the type hierarchy * @throws XsdMappingException if annotation fails */ public void setComplexTypeAttributes(final XmlSchema schema, final XmlSchemaComplexType xsdComplexType, final Element elc, final int level) throws XsdMappingException { if (_log.isDebugEnabled()) { _log.debug("setComplexTypeAttributes started for type = " + xsdComplexType.getName()); _log.debug(" XmlSchemaType QName = " + xsdComplexType.getQName()); } elc.setAttribute(CobolMarkup.TYPE, CobolType.GROUP_ITEM.name()); if (_log.isDebugEnabled()) { _log.debug(" Cobol type = " + elc.getAttribute(CobolMarkup.TYPE)); } if (_log.isDebugEnabled()) { _log.debug("setComplexTypeAttributes ended for type = " + xsdComplexType.getQName()); } }
/** * Process an XML schema complex type. * * @param xsdComplexType the XML Schema type to process * @param level the current level in the elements hierarchy. * @throws XsdMappingException if processing fails */ public void processComplexType(final XmlSchemaComplexType xsdComplexType, final int level) throws XsdMappingException { if (_log.isDebugEnabled()) { _log.debug("process started for complex type = " + xsdComplexType.getName()); } /* Delegate processing of XML schema complex type */ _processor.processComplexType(_schema, xsdComplexType, level); /* Complex types might particles such as sequence and all */ XmlSchemaParticle particle = xsdComplexType.getParticle(); processParticle(xsdComplexType.getQName(), particle, level + XsdConstants.DEFAULT_LEVEL_INCREMENT); if (_log.isDebugEnabled()) { _log.debug("process ended for complex type = " + xsdComplexType.getName()); } }
public boolean isLiteralArray(XmlSchemaComplexType type) { boolean array = false; if ((type.getAttributes().isEmpty()) && (type.getParticle() instanceof XmlSchemaSequence)) { XmlSchemaSequence stype = (XmlSchemaSequence)type.getParticle(); if ((stype.getItems().size() == 1) && (stype.getItems().get(0) instanceof XmlSchemaElement)) { XmlSchemaElement el = (XmlSchemaElement)stype.getItems().get(0); if (!(el.getMaxOccurs() == 1)) { // it's a literal array array = true; } if (el.getMaxOccurs() == 1 && el.getMinOccurs() == 1 && type.getName() != null && WSDLTypes.isAnonymous(type.getName())) { array = true; } } } return array; }
xsdComplexType.getName()); if (javaClassName != null) { if (_log.isDebugEnabled()) {
new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()), xmlSchemaComplexType); addContentToMethodSchemaType(xmlSchemaSequence, xmlSchemaElement.setSchemaTypeName(new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName())); return new QName(xmlSchema.getTargetNamespace(), complexTypeName); } else {
new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()), xmlSchemaComplexType); addContentToMethodSchemaType(xmlSchemaSequence, xmlSchemaElement.setSchemaTypeName(new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName())); return new QName(xmlSchema.getTargetNamespace(), complexTypeName); } else {
new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()), xmlSchemaComplexType); addContentToMethodSchemaType(xmlSchemaSequence, xmlSchemaElement.setSchemaTypeName(new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName())); return new QName(xmlSchema.getTargetNamespace(), complexTypeName); } else {
if ((complexType.getName() != null) && (complexType.getQName() != null)) { Map metaInfo = complexType.getMetaInfoMap(); String complexTypeName = (String)
try { XmlSchemaComplexType complexType = (XmlSchemaComplexType)type; if (!JavascriptUtils.notVeryComplexType(complexType) && complexType.getName() != null) { complexTypeConstructorAndAccessors(complexType.getQName(), complexType); complexTypeSerializerFunction(complexType.getQName(), complexType); if (!JavascriptUtils.notVeryComplexType(complexType) && complexType.getName() == null) { complexTypeConstructorAndAccessors(element.getQName(), complexType); complexTypeSerializerFunction(element.getQName(), complexType);
if ((complexType.getName() != null) && (complexType.getQName() != null)) { Map metaInfo = complexType.getMetaInfoMap(); String complexTypeName = (String)
new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()), xmlSchemaComplexType); addContentToMethodSchemaType(xmlSchemaSequence, xmlSchemaElement.setSchemaTypeName(new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName())); new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()), xmlSchemaComplexType); addContentToMethodSchemaType(xmlSchemaSequence, xmlSchemaElement.setSchemaTypeName(new QName(schemaTargetNameSpace, xmlSchemaComplexType.getName()));
if (complexType.getName() != null && !this.changedComplexTypeSet.contains(schemaType)) {
if (complexType.getName() != null && !this.changedComplexTypeSet.contains(schemaType)) {
String rootClassName = NameUtil .toClassName(((XmlSchemaComplexType) type) .getName()); if (jaxbModel.getTypeNamePrefix() != null) { rootClassName = jaxbModel.getTypeNamePrefix()
if (type instanceof XmlSchemaComplexType) { XmlSchemaComplexType complexType = (XmlSchemaComplexType) type; if (complexType.getName() != null) { processNamedComplexSchemaType(complexType, resolvedSchema); } else { if (complexType.getName() != null) { processNamedComplexSchemaType(complexType, resolvedSchema); } else {