Package org.apache.ws.commons.schema

Examples of org.apache.ws.commons.schema.XmlSchemaUse


  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())) {
View Full Code Here


        } else if (annotated instanceof XmlSchemaAnyAttribute) {
            attributeInfo.any = true;
            attributeInfo.xmlName = null; // unknown until runtime.
            attributeInfo.javascriptName = "any";
            attributeInfo.type = null; // runtime for any.
            attributeInfo.use = new XmlSchemaUse(BlockConstants.OPTIONAL);
        } else {
            throw new UnsupportedConstruct(LOG, "UNSUPPORTED_ATTRIBUTE_ITEM", annotated, contextName);
        }

        factoryCommon(realAnnotated, currentSchema, schemaCollection, prefixAccumulator, attributeInfo);
View Full Code Here

        } else { // any
            attributeInfo.any = true;
            attributeInfo.xmlName = null; // unknown until runtime.
            attributeInfo.javascriptName = "any";
            attributeInfo.type = null; // runtime for any.
            attributeInfo.use = new XmlSchemaUse(BlockConstants.OPTIONAL);
        }
    }
View Full Code Here

    public boolean isNillable() {
        return false;
    }

    public boolean isOptional() {
        return !use.equals(new XmlSchemaUse(BlockConstants.REQUIRED));
    }
View Full Code Here

        } else if (annotated instanceof XmlSchemaAnyAttribute) {
            attributeInfo.any = true;
            attributeInfo.xmlName = null; // unknown until runtime.
            attributeInfo.javascriptName = "any";
            attributeInfo.type = null; // runtime for any.
            attributeInfo.use = new XmlSchemaUse(BlockConstants.OPTIONAL);
        } else {
            throw new UnsupportedConstruct(LOG, "UNSUPPORTED_ATTRIBUTE_ITEM", annotated, contextName);
        }

        factoryCommon(realAnnotated, currentSchema, schemaCollection, prefixAccumulator, attributeInfo);
View Full Code Here

        } else { // any
            attributeInfo.any = true;
            attributeInfo.xmlName = null; // unknown until runtime.
            attributeInfo.javascriptName = "any";
            attributeInfo.type = null; // runtime for any.
            attributeInfo.use = new XmlSchemaUse(BlockConstants.OPTIONAL);
        }
    }
View Full Code Here

    public boolean isNillable() {
        return false;
    }

    public boolean isOptional() {
        return !use.equals(new XmlSchemaUse(BlockConstants.REQUIRED));
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.schema.XmlSchemaUse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.