/** * Creates new XmlSchemaAttribute */ public XmlSchemaAttribute() { form = new XmlSchemaForm(XmlSchemaForm.NONE); use = new XmlSchemaUse(Constants.BlockConstants.NONE); }
public boolean isOptional() { return !use.equals(XmlSchemaUse.REQUIRED); }
attribute.setAttribute("id", attributeObj.id); String useType = attributeObj.use.getValue(); if (!useType.equals(Constants.BlockConstants.NONE)) { useType = convertString(useType);
String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE); SchemaConstants.ATTRIBUTE_TYPE); String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE); SchemaConstants.ATTRIBUTE_TYPE); String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE);
attribute.setAttribute("id", attributeObj.id); String useType = attributeObj.use.getValue(); if (!useType.equals(Constants.BlockConstants.NONE)) { useType = convertString(useType);
String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE); SchemaConstants.ATTRIBUTE_TYPE); String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE); SchemaConstants.ATTRIBUTE_TYPE); String use = att.getUse().toString(); if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) { metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE);
/** * Creates new XmlSchemaAttribute */ public XmlSchemaAttribute() { form = new XmlSchemaForm(XmlSchemaForm.NONE); use = new XmlSchemaUse(Constants.BlockConstants.NONE); }
attribute.setAttribute("id", attributeObj.id); String useType = attributeObj.use.getValue(); if (!useType.equals(Constants.BlockConstants.NONE)) { useType = convertString(useType);
/** * Creates new XmlSchemaAttribute */ public XmlSchemaAttribute() { form = new XmlSchemaForm(XmlSchemaForm.NONE); use = new XmlSchemaUse(Constants.BlockConstants.NONE); }
attr.use = new XmlSchemaUse(useType);
attr.use = new XmlSchemaUse(useType);
attr.use = new XmlSchemaUse(useType);
/** * Adds the given parameter to the complex type. * @param complexType The complex type which the attribute will be added to * @param name The name of the attribute * @param xsdType The type of the attribute */ @SuppressWarnings("unchecked") private static void addAttributeToComplexType(XmlSchemaComplexType complexType, String name, QName xsdType) { XmlSchemaAttribute attr = new XmlSchemaAttribute(); attr.setName(name); attr.setSchemaTypeName(xsdType); attr.setUse(new XmlSchemaUse("optional")); XmlSchemaAttribute tmpAttr; for (Iterator<XmlSchemaAttribute> itr = complexType.getAttributes().getIterator(); itr.hasNext();) { tmpAttr = itr.next(); if (tmpAttr.getName().equals(attr.getName())) { /* current attribute is already set, nothing more to do */ return; } } complexType.getAttributes().add(attr); }