/** * Build and return an Element based on a given name, minOccurs and * maxOccurs. * * @param name * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(String name, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(name); element.setMinOccurs(minOccurs); element.setMaxOccurs(maxOccurs); return element; }
/** * Build and return an Element based on a given name, minOccurs and * maxOccurs. * * @param name * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(String name, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(name); element.setMinOccurs(minOccurs); element.setMaxOccurs(maxOccurs); return element; }
/** * Build and return an Element based on a given name, minOccurs and * maxOccurs. * * @param name * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(String name, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(name); element.setMinOccurs(minOccurs); element.setMaxOccurs(maxOccurs); return element; }
/** * Build an Element with name, type and possibly minOccurs set. This method will * typically be called when processing an XPath that has no associated Property * that can be used to build an Element, such as in the case of XmlJoinNodes. * * @param elementName name of the Element * @param elementType type of the Element * @param isAll indicates if the Element will be added to an All structure * @return */ private Element buildElement(String elementName, String elementType, boolean isAll) { Element element = new Element(); // Set minOccurs based on the 'required' flag if (!(isAll)) { element.setMinOccurs(Occurs.ZERO); } element.setName(elementName); element.setType(elementType); return element; }
/** * Build an Element with name, type and possibly minOccurs set. This method will * typically be called when processing an XPath that has no associated Property * that can be used to build an Element, such as in the case of XmlJoinNodes. * * @param elementName name of the Element * @param elementType type of the Element * @param isAll indicates if the Element will be added to an All structure * @return */ private Element buildElement(String elementName, String elementType, boolean isAll) { Element element = new Element(); // Set minOccurs based on the 'required' flag if (!(isAll)) { element.setMinOccurs(Occurs.ZERO); } element.setName(elementName); element.setType(elementType); 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 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; }
/** * Build and return an Element for a given XPathFragment. * * @param frag * @param schemaType * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(XPathFragment frag, String schemaType, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(frag.getLocalName()); element.setMinOccurs(minOccurs); element.setMaxOccurs(frag.containsIndex() ? Occurs.UNBOUNDED : maxOccurs); if (schemaType != null) { element.setType(schemaType); } return element; }
/** * Build and return an Element for a given XPathFragment. * * @param frag * @param schemaType * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(XPathFragment frag, String schemaType, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(frag.getLocalName()); element.setMinOccurs(minOccurs); element.setMaxOccurs(frag.containsIndex() ? Occurs.UNBOUNDED : maxOccurs); if (schemaType != null) { element.setType(schemaType); } return element; }
/** * Build and return an Element for a given XPathFragment. * * @param frag * @param schemaType * @param minOccurs * @param maxOccurs * @return */ protected Element buildElement(XPathFragment frag, String schemaType, String minOccurs, String maxOccurs) { Element element = new Element(); element.setName(frag.getLocalName()); element.setMinOccurs(minOccurs); element.setMaxOccurs(frag.containsIndex() ? Occurs.UNBOUNDED : maxOccurs); if (schemaType != null) { element.setType(schemaType); } return element; }
reference.setMinOccurs(referencedElement.getMinOccurs()); reference.setMaxOccurs(referencedElement.getMaxOccurs()); Schema attributeSchema = this.getSchemaForNamespace(referencedElementURI); if (attributeSchema != null && attributeSchema.getTopLevelElements().get(referencedElement.getName()) == null) { referencedElement.setMinOccurs(null); referencedElement.setMaxOccurs(null);
reference.setMinOccurs(referencedElement.getMinOccurs()); reference.setMaxOccurs(referencedElement.getMaxOccurs()); Schema attributeSchema = this.getSchemaForNamespace(referencedElementURI); if (attributeSchema != null && attributeSchema.getTopLevelElements().get(referencedElement.getName()) == null) { referencedElement.setMinOccurs(null); referencedElement.setMaxOccurs(null);
element.setMinOccurs("1");