ComplexType entryComplexType = new ComplexType(); Sequence entrySequence = new Sequence(); element.setMaxOccurs(Occurs.UNBOUNDED); } else { ComplexType complexType = new ComplexType(); Sequence sequence = new Sequence(); complexType.setSequence(sequence);
ComplexType entryComplexType = new ComplexType(); Sequence entrySequence = new Sequence(); element.setMaxOccurs(Occurs.UNBOUNDED); } else { ComplexType complexType = new ComplexType(); Sequence sequence = new Sequence(); complexType.setSequence(sequence);
/** * Create and return a ComplexType containing simple content for a given XMLDescriptor. Assumes * that the descriptor has a schema context set. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @return */ private ComplexType buildComplexTypeWithSimpleContent(XMLDescriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<XMLDescriptor> descriptors) { ComplexType ct = new ComplexType(); SimpleContent sc = new SimpleContent(); Extension extension = new Extension(); sc.setExtension(extension); ct.setSimpleContent(sc); for (DatabaseMapping mapping : desc.getMappings()) { XMLField xFld = (XMLField) mapping.getField(); if (xFld.getXPath().equals(TEXT)) { extension.setBaseType(getSchemaTypeForDirectMapping((XMLDirectMapping) mapping, workingSchema)); } else if (xFld.getXPathFragment().isAttribute()) { String schemaTypeString = getSchemaTypeForDirectMapping((XMLDirectMapping) mapping, workingSchema); Attribute attr = buildAttribute((XMLDirectMapping) mapping, schemaTypeString); extension.getOrderedAttributes().add(attr); } } return ct; }
/** * Create and return a ComplexType containing simple content for a given XMLDescriptor. Assumes * that the descriptor has a schema context set. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @return */ private ComplexType buildComplexTypeWithSimpleContent(Descriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<Descriptor> descriptors) { ComplexType ct = new ComplexType(); SimpleContent sc = new SimpleContent(); Extension extension = new Extension(); sc.setExtension(extension); ct.setSimpleContent(sc); for (CoreMapping mapping : (Vector<CoreMapping>)desc.getMappings()) { Field xFld = (Field) mapping.getField(); if (xFld.getXPath().equals(TEXT)) { extension.setBaseType(getSchemaTypeForDirectMapping((DirectMapping) mapping, workingSchema)); } else if (xFld.getXPathFragment().isAttribute()) { String schemaTypeString = getSchemaTypeForDirectMapping((DirectMapping) mapping, workingSchema); Attribute attr = buildAttribute((DirectMapping) mapping, schemaTypeString); extension.getOrderedAttributes().add(attr); } } return ct; }
/** * Create and return a ComplexType containing simple content for a given XMLDescriptor. Assumes * that the descriptor has a schema context set. * * @param desc * @param schemaForNamespace * @param workingSchema * @param properties * @param descriptors * @return */ private ComplexType buildComplexTypeWithSimpleContent(Descriptor desc, HashMap<String, Schema> schemaForNamespace, Schema workingSchema, SchemaModelGeneratorProperties properties, List<Descriptor> descriptors) { ComplexType ct = new ComplexType(); SimpleContent sc = new SimpleContent(); Extension extension = new Extension(); sc.setExtension(extension); ct.setSimpleContent(sc); for (CoreMapping mapping : (Vector<CoreMapping>)desc.getMappings()) { Field xFld = (Field) mapping.getField(); if (xFld.getXPath().equals(TEXT)) { extension.setBaseType(getSchemaTypeForDirectMapping((DirectMapping) mapping, workingSchema)); } else if (xFld.getXPathFragment().isAttribute()) { String schemaTypeString = getSchemaTypeForDirectMapping((DirectMapping) mapping, workingSchema); Attribute attr = buildAttribute((DirectMapping) mapping, schemaTypeString); extension.getOrderedAttributes().add(attr); } } return ct; }
private ComplexType generateComplexType(Type type) { SDOType sdoType = (SDOType) type; ComplexType complexType = new ComplexType(); String xsdLocalName = sdoType.getXsdLocalName(); if (xsdLocalName != null) {
private ComplexType generateComplexType(Type type) { SDOType sdoType = (SDOType) type; ComplexType complexType = new ComplexType(); String xsdLocalName = sdoType.getXsdLocalName(); if (xsdLocalName != null) {
ComplexType type = new ComplexType(); SimpleContent content = new SimpleContent(); if (EMPTY_STRING.equals(typeName)) {
ComplexType ct = new ComplexType(); if (!anonymous) { ct.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart());
ComplexType ct = new ComplexType(); if (!anonymous) { ct.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart());
ComplexType ct = new ComplexType(); if (!anonymous) { ct.setName(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart());
ComplexType wrapperType = new ComplexType(); Sequence wrapperSequence = new Sequence(); wrapperType.setSequence(wrapperSequence);
ComplexType wrapperType = new ComplexType(); Sequence wrapperSequence = new Sequence(); wrapperType.setSequence(wrapperSequence);
gElement.setType(getQualifiedTypeName(prop, fragSchema)); } else { ComplexType gCType = new ComplexType(); TypeDefParticle particle; if (isChoice) {
gElement.setType(getQualifiedTypeName(prop, fragSchema)); } else { ComplexType gCType = new ComplexType(); TypeDefParticle particle; if (isChoice) {
currentElement = new Element(); ComplexType cType = new ComplexType(); Sequence sequence = new Sequence(); cType.setSequence(sequence); globalElement = new Element(); globalElement.setName(frag.getLocalName()); ComplexType gCType = new ComplexType(); Sequence gSequence = new Sequence(); gCType.setSequence(gSequence);
currentElement = new Element(); ComplexType cType = new ComplexType(); Sequence sequence = new Sequence(); cType.setSequence(sequence); globalElement = new Element(); globalElement.setName(frag.getLocalName()); ComplexType gCType = new ComplexType(); Sequence gSequence = new Sequence(); gCType.setSequence(gSequence);
currentElement = new Element(); ComplexType cType = new ComplexType(); Sequence sequence = new Sequence(); cType.setSequence(sequence); globalElement = new Element(); globalElement.setName(frag.getLocalName()); ComplexType gCType = new ComplexType(); Sequence gSequence = new Sequence(); gCType.setSequence(gSequence);
ComplexType type = new ComplexType(); JavaClass superClass = CompilerHelper.getNextMappedSuperClass(myClass, this.typeInfo, this.helper);
ComplexType type = new ComplexType(); JavaClass superClass = CompilerHelper.getNextMappedSuperClass(myClass, this.typeInfo, this.helper);