Package org.apache.ws.commons.schema

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


        schema.setTargetNamespace(name);
    }

    public void setQualified(boolean qualified) throws Exception  {
        if (qualified) {
            XmlSchemaForm form = XmlSchemaForm.QUALIFIED;
            schema.setAttributeFormDefault(form);
            schema.setElementFormDefault(form);
        }
    }
View Full Code Here


        SchemaInfo schemaInfo = new SchemaInfo(namespaceURI);
        SchemaCollection col = serviceInfo.getXmlSchemaCollection();

        XmlSchema schema = col.newXmlSchemaInCollection(namespaceURI);
        if (qualified) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }

        schemaInfo.setSchema(schema);

        Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();
View Full Code Here

                                              mpi.getConcreteName().getLocalPart());
                    mpi.setElement(true);
                    mpi.setElementQName(newName);
                    mpi.setConcreteName(newName);
                    XmlSchemaUtils.setElementQName(el, newName);
                    el.setForm(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
                }
               
                if (Collection.class.isAssignableFrom(mpi.getTypeClass())
                           && mpi.getTypeClass().isInterface()) {
                    Type type = (Type)mpi.getProperty(GENERIC_TYPE);
View Full Code Here

            return schemaInfo;
        }

        schema = col.newXmlSchemaInCollection(namespaceURI);
        if (qualified) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }
        schemaInfo.setSchema(schema);

        Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();
        if (explicitNamespaceMappings == null) {
View Full Code Here

        // Initialize XmlSchema and XmlSchemaCollection
        XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection();
        xmlSchema = new XmlSchema(this.schemaTargetNamespace, xmlSchemaCollection);

        // Setting attributeFormDefault and elementFormDefault to unqualified
        xmlSchema.setAttributeFormDefault(new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED));
        xmlSchema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED));

        // Adding the schema Namespace Prefix and the default prefix to the namespace map
        nameSpacesMap.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                          Java2WSDLConstants.URI_2001_SCHEMA_XSD);
        nameSpacesMap.put(prefix, this.schemaTargetNamespace);
View Full Code Here

    Map<String, XmlSchema> schemaMap = cparams.getSchemaMap();
    if (!schemaMap.containsKey(namespace)) {
      XmlSchema schema = new XmlSchema(namespace, cparams.getXmlSchemaCollection());
      schema.setNamespaceContext(new NamespaceMap());
      schemaMap.put(namespace, schema);
      schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
      schema.setAttributeFormDefault(new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED));
    }
    return schemaMap.get(namespace);
  }
View Full Code Here

        this.elementFormDefault = elementFormDefault;
    }

    protected XmlSchemaForm getAttrFormDefaultSetting() {
        if (FORM_DEFAULT_UNQUALIFIED.equals(getAttrFormDefault())) {
            return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED);
        } else {
            return new XmlSchemaForm(XmlSchemaForm.QUALIFIED);
        }
    }
View Full Code Here

        }
    }

    protected XmlSchemaForm getElementFormDefaultSetting() {
        if (FORM_DEFAULT_UNQUALIFIED.equals(getElementFormDefault())) {
            return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED);
        } else {
            return new XmlSchemaForm(XmlSchemaForm.QUALIFIED);
        }
    }
View Full Code Here

            return schemaInfo;
        }

        schema = col.newXmlSchemaInCollection(namespaceURI);
        if (qualified) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }
        schemaInfo.setSchema(schema);

        Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();
        if (explicitNamespaceMappings == null) {
View Full Code Here

        prefixmap.put(this.schema_namespace_prefix, this.schemaTargetNameSpace);

        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();

        schema = new XmlSchema(this.schemaTargetNameSpace, schemaCollection);
        schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        schema.setPrefixToNamespaceMap(prefixmap);
        this.typeTable = new TypeTable();

        try {
            Class clazz = Class.forName(className, true, loader);
View Full Code Here

TOP

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

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.