private void processSimpleContent(String targetNamespace, String defaultNamespace, SimpleContent simpleContent, SDOType owningType) { if (simpleContent != null) { if (simpleContent.getExtension() != null) { processExtension(targetNamespace, defaultNamespace, owningType, simpleContent.getExtension(), true); } else { if (simpleContent.getRestriction() != null) { processRestriction(targetNamespace, defaultNamespace, owningType, simpleContent.getRestriction()); } } } }
private void processSimpleContent(String targetNamespace, String defaultNamespace, SimpleContent simpleContent, SDOType owningType) { if (simpleContent != null) { if (simpleContent.getExtension() != null) { processExtension(targetNamespace, defaultNamespace, owningType, simpleContent.getExtension(), true); } else { if (simpleContent.getRestriction() != null) { processRestriction(targetNamespace, defaultNamespace, owningType, simpleContent.getRestriction()); } } } }
/** * 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; }
/** * Convenience method for processing an any attribute property. Required * schema components will be generated and set accordingly. * * @param type the ComplexType which compositor(s) should be added to */ private void addAnyAttributeToSchema(ComplexType type) { AnyAttribute anyAttribute = new AnyAttribute(); anyAttribute.setProcessContents(SKIP); anyAttribute.setNamespace(Constants.ANY_NAMESPACE_OTHER); if (type.getSimpleContent() != null) { SimpleContent content = type.getSimpleContent(); if(content.getExtension() != null){ content.getExtension().setAnyAttribute(anyAttribute); }else if(content.getRestriction() != null){ content.getRestriction().setAnyAttribute(anyAttribute); } } else { type.setAnyAttribute(anyAttribute); } }
/** * Convenience method for processing an any attribute property. Required * schema components will be generated and set accordingly. * * @param type the ComplexType which compositor(s) should be added to */ private void addAnyAttributeToSchema(ComplexType type) { AnyAttribute anyAttribute = new AnyAttribute(); anyAttribute.setProcessContents(SKIP); anyAttribute.setNamespace(Constants.ANY_NAMESPACE_OTHER); if (type.getSimpleContent() != null) { SimpleContent content = type.getSimpleContent(); if(content.getExtension() != null){ content.getExtension().setAnyAttribute(anyAttribute); }else if(content.getRestriction() != null){ content.getRestriction().setAnyAttribute(anyAttribute); } } else { type.setAnyAttribute(anyAttribute); } }
type.getSimpleContent().getExtension().getOrderedAttributes().add(reference); } else { type.getOrderedAttributes().add(reference); type.getSimpleContent().getExtension().getOrderedAttributes().add(attribute); } else if (type.getComplexContent() != null) { type.getComplexContent().getExtension().getOrderedAttributes().add(attribute);
type.getSimpleContent().getExtension().getOrderedAttributes().add(reference); } else { type.getOrderedAttributes().add(reference); type.getSimpleContent().getExtension().getOrderedAttributes().add(attribute); } else if (type.getComplexContent() != null) { type.getComplexContent().getExtension().getOrderedAttributes().add(attribute);