/** * Create and return an Element for a given XMLDescriptor. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @param simple * @return */ protected Element buildElement(Descriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<Descriptor> descriptors, boolean simple) { Element element = new Element(); element.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart()); if (simple) { if (isComplexTypeWithSimpleContentRequired(desc)) { element.setComplexType(buildComplexTypeWithSimpleContent(desc, schemaForNamespace, workingSchema, properties, descriptors)); } else { element.setSimpleType(buildSimpleType(desc, workingSchema, false)); } } else { element.setComplexType(buildComplexType(true, desc, schemaForNamespace, workingSchema, properties, descriptors)); } return element; }
/** * Create and return an Element for a given XMLDescriptor. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @param simple * @return */ protected Element buildElement(Descriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<Descriptor> descriptors, boolean simple) { Element element = new Element(); element.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart()); if (simple) { if (isComplexTypeWithSimpleContentRequired(desc)) { element.setComplexType(buildComplexTypeWithSimpleContent(desc, schemaForNamespace, workingSchema, properties, descriptors)); } else { element.setSimpleType(buildSimpleType(desc, workingSchema, false)); } } else { element.setComplexType(buildComplexType(true, desc, schemaForNamespace, workingSchema, properties, descriptors)); } return element; }
/** * Create an element reference and add it to a given particle. This * method will typically be called when processing an XPath and a * prefixed path element is encountered that requires an element ref. * * @param elementRefName * @param particle * @return */ public Element createRefElement(String elementRefName, TypeDefParticle particle) { Element refElement = new Element(); // ref won't have a complex type refElement.setComplexType(null); refElement.setMinOccurs(Occurs.ZERO); refElement.setMaxOccurs(Occurs.ONE); refElement.setRef(elementRefName); particle.addElement(refElement); return refElement; }
/** * Create and return an Element for a given XMLDescriptor. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @param simple * @return */ protected Element buildElement(XMLDescriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<XMLDescriptor> descriptors, boolean simple) { Element element = new Element(); element.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart()); if (simple) { if (isComplexTypeWithSimpleContentRequired(desc)) { element.setComplexType(buildComplexTypeWithSimpleContent(desc, schemaForNamespace, workingSchema, properties, descriptors)); } else { element.setSimpleType(buildSimpleType(desc, workingSchema, false)); } } else { element.setComplexType(buildComplexType(true, desc, schemaForNamespace, workingSchema, properties, descriptors)); } return element; }
/** * Create an element reference and add it to a given particle. This * method will typically be called when processing an XPath and a * prefixed path element is encountered that requires an element ref. * * @param elementRefName * @param particle * @return */ public Element createRefElement(String elementRefName, TypeDefParticle particle) { Element refElement = new Element(); // ref won't have a complex type refElement.setComplexType(null); refElement.setMinOccurs(Occurs.ZERO); refElement.setMaxOccurs(Occurs.ONE); refElement.setRef(elementRefName); particle.addElement(refElement); return refElement; }
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype);
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype);
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype);
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype); element.setComplexType(ctype);
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype); element.setComplexType(ctype);
globalElement.setName(frag.getLocalName()); if (ctype != null) { globalElement.setComplexType(ctype); } else { globalElement.setType(getSchemaTypeString(refDesc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()), workingSchema)); element.setComplexType(ctype); element.setComplexType(ctype);
if (simple) { if (isComplexTypeWithSimpleContentRequired(desc)) { topLevelElement.setComplexType(buildComplexTypeWithSimpleContent(desc, schemaForNamespace, workingSchema, properties, descriptors)); } else { topLevelElement.setSimpleType(buildSimpleType(desc, workingSchema, false)); topLevelElement.setComplexType(buildComplexType(true, desc, schemaForNamespace, workingSchema, properties, descriptors));
Sequence sequence = new Sequence(); cType.setSequence(sequence); currentElement.setComplexType(cType); Sequence gSequence = new Sequence(); gCType.setSequence(gSequence); globalElement.setComplexType(gCType); s.addTopLevelElement(globalElement); currentElement.setComplexType(null); currentElement.setRef(frag.getShortName()); currentSequence.addElement(currentElement);
Sequence wrapperSequence = new Sequence(); wrapperType.setSequence(wrapperSequence); wrapperElement.setComplexType(wrapperType); return new AddToSchemaResult(wrapperSequence, wrapperType);
Sequence wrapperSequence = new Sequence(); wrapperType.setSequence(wrapperSequence); wrapperElement.setComplexType(wrapperType); return new AddToSchemaResult(wrapperSequence, wrapperType);
gElement.setComplexType(gCType);
} else if (ctype != null) { element.setComplexType(ctype);
} else if (ctype != null) { element.setComplexType(ctype);
} else if (ctype != null) { element.setComplexType(ctype);