/** * Create an attribute reference and add it to a given complex type. * This method will typically be called when processing an XPath * and a prefixed path element is encountered that requires an * attribute ref. * * @param attributeRefName * @param owningComplexType * @return */ public Attribute createRefAttribute(String attributeRefName, ComplexType owningComplexType) { Attribute refAttribute = new Attribute(); refAttribute.setRef(attributeRefName); if (owningComplexType.getSimpleContent() != null) { owningComplexType.getSimpleContent().getExtension().getOrderedAttributes().add(refAttribute); } else { owningComplexType.getOrderedAttributes().add(refAttribute); } return refAttribute; }
/** * Create an attribute reference and add it to a given complex type. * This method will typically be called when processing an XPath * and a prefixed path element is encountered that requires an * attribute ref. * * @param attributeRefName * @param owningComplexType * @return */ public Attribute createRefAttribute(String attributeRefName, ComplexType owningComplexType) { Attribute refAttribute = new Attribute(); refAttribute.setRef(attributeRefName); if (owningComplexType.getSimpleContent() != null) { owningComplexType.getSimpleContent().getExtension().getOrderedAttributes().add(refAttribute); } else { owningComplexType.getOrderedAttributes().add(refAttribute); } return refAttribute; }
type.getSimpleContent().getExtension().getOrderedAttributes().add(reference); } else { type.getOrderedAttributes().add(reference); type.getComplexContent().getExtension().getOrderedAttributes().add(attribute); } else { type.getOrderedAttributes().add(attribute);
ct.getOrderedAttributes().add(attr); } else { elem.setSimpleType(st);
ct.getOrderedAttributes().add(attr); } else { elem.setSimpleType(st);
ct.getOrderedAttributes().add(attr); } else { elem.setSimpleType(st);
type.getSimpleContent().getExtension().getOrderedAttributes().add(reference); } else { type.getOrderedAttributes().add(reference); type.getComplexContent().getExtension().getOrderedAttributes().add(attribute); } else { type.getOrderedAttributes().add(attribute);
if (frag.isAttribute()) { Attribute attr = buildAttribute(frag, schemaTypeString); ct.getOrderedAttributes().add(attr); } else { Element elem = buildElement(frag, schemaTypeString, Occurs.ZERO, null);
if (frag.isAttribute()) { Attribute attr = buildAttribute(frag, schemaTypeString); ct.getOrderedAttributes().add(attr); } else { Element elem = buildElement(frag, schemaTypeString, Occurs.ZERO, null);
if (frag.isAttribute()) { Attribute attr = buildAttribute(frag, schemaTypeString); ct.getOrderedAttributes().add(attr); } else { Element elem = buildElement(frag, schemaTypeString, Occurs.ZERO, null);
Attribute attr = buildAttribute(nextProperty); if (owner instanceof ComplexType) { ((ComplexType)owner).getOrderedAttributes().add(attr); } else if (owner instanceof Extension) { ((Extension)owner).getOrderedAttributes().add(attr);
Attribute attr = buildAttribute(nextProperty); if (owner instanceof ComplexType) { ((ComplexType)owner).getOrderedAttributes().add(attr); } else if (owner instanceof Extension) { ((Extension)owner).getOrderedAttributes().add(attr);
processOrderedAttributes(targetNamespace, defaultNamespace, newType, complexType.getOrderedAttributes()); finishComplexType(newType);
private SDOType processComplexType(String targetNamespace, String defaultNamespace, String name, ComplexType complexType) { if (complexType == null) { return null; } boolean addedNR = addNextNamespaceResolver(complexType.getAttributesMap()); SDOType newType = startComplexType(targetNamespace, defaultNamespace, name, complexType); if (newType != null) { if (complexType.getComplexContent() != null) { processComplexContent(targetNamespace, defaultNamespace, complexType.getComplexContent(), newType); finishComplexType(newType); } else if (complexType.getSimpleContent() != null) { processSimpleContent(targetNamespace, defaultNamespace, complexType.getSimpleContent(), newType); finishComplexType(newType); } else { if (complexType.getChoice() != null) { processChoice(targetNamespace, defaultNamespace, newType, complexType.getChoice(), false); } else if (complexType.getSequence() != null) { processSequence(targetNamespace, defaultNamespace, newType, complexType.getSequence(), false); } else if (complexType.getAll() != null) { processAll(targetNamespace, defaultNamespace, newType, complexType.getAll(), false); } processOrderedAttributes(targetNamespace, defaultNamespace, newType, complexType.getOrderedAttributes()); finishComplexType(newType); } } if (addedNR) { namespaceResolvers.remove(namespaceResolvers.size() - 1); } return newType; }
attr.setUse(Attribute.REQUIRED); ct.getOrderedAttributes().add(attr); } else { seq = buildSchemaComponentsForXPath(frag, seq, schemaForNamespace, workingSchema, properties);
attr.setUse(Attribute.REQUIRED); ct.getOrderedAttributes().add(attr); } else { seq = buildSchemaComponentsForXPath(frag, seq, schemaForNamespace, workingSchema, properties);
attr.setUse(Attribute.REQUIRED); ct.getOrderedAttributes().add(attr); } else { seq = buildSchemaComponentsForXPath(frag, seq, schemaForNamespace, workingSchema, properties);