Package javax.xml.bind.annotation

Examples of javax.xml.bind.annotation.XmlSchema.namespace()


        String name = null;
        Package pkg = javaType.getPackage();
        if (pkg != null) {
            XmlSchema schema = pkg.getAnnotation(XmlSchema.class);
            if (schema != null) {
                namespace = schema.namespace();
            }
        }

        QName elementQName = null;
        QName typeQName = null;
View Full Code Here


    String namespace = enumInfo.namespace();
    if ("##default".equals(namespace)) {
      Package pkg = clazz.getPackage();
      if (pkg != null) {
        XmlSchema schemaInfo = pkg.getAnnotation(XmlSchema.class);
        namespace = schemaInfo.namespace();
      }
    }

    Field unknown = null;
    Field[] fields = clazz.getDeclaredFields();
View Full Code Here

    String namespace = enumInfo.namespace();
    if ("##default".equals(namespace)) {
      Package pkg = clazz.getPackage();
      if (pkg != null) {
        XmlSchema schemaInfo = pkg.getAnnotation(XmlSchema.class);
        namespace = schemaInfo.namespace();
      }
    }

    Field[] fields = clazz.getDeclaredFields();
    for (Field field : fields) {
View Full Code Here

    String namespace = enumInfo.namespace();
    if ("##default".equals(namespace)) {
      Package pkg = clazz.getPackage();
      if (pkg != null) {
        XmlSchema schemaInfo = pkg.getAnnotation(XmlSchema.class);
        namespace = schemaInfo.namespace();
      }
    }

    Field unknown = null;
    Field[] fields = clazz.getDeclaredFields();
View Full Code Here

    String namespace = enumInfo.namespace();
    if ("##default".equals(namespace)) {
      Package pkg = clazz.getPackage();
      if (pkg != null) {
        XmlSchema schemaInfo = pkg.getAnnotation(XmlSchema.class);
        namespace = schemaInfo.namespace();
      }
    }

    Field[] fields = clazz.getDeclaredFields();
    for (Field field : fields) {
View Full Code Here

        if (packageInfo == null) {
            XmlSchema xmlSchema = (XmlSchema) helper.getAnnotation(pack, XmlSchema.class);
            packageInfo = new PackageInfo();
            NamespaceInfo namespaceInfo = null;
            if(xmlSchema != null) {
                namespaceInfo = findInfoForNamespace(xmlSchema.namespace());
            }
            if(namespaceInfo == null) {
                namespaceInfo = processNamespaceInformation(xmlSchema);
            }
           
View Full Code Here

       
        XmlSchema schema = pack.getAnnotation(XmlSchema.class);
        String namespace = null;
        if (schema != null)
        {
            namespace = schema.namespace();
        }
        else
        {
            namespace = "";
        }
View Full Code Here

         * Get the namespace declared at the package level, and ensure the the
         * given namespace is not redundant with that package-level namespace.
         */
        final XmlSchema schema = impl.getPackage().getAnnotation(XmlSchema.class);
        assertNotNull("Missing @XmlSchema package annotation.", schema);
        final String schemaNamespace = schema.namespace();
        assertFalse("Missing namespace in @XmlSchema package annotation.", schemaNamespace.trim().isEmpty());
        assertFalse("Namespace declaration is redundant with @XmlSchema.", namespace.equals(schemaNamespace));
        /*
         * Check that the namespace is declared in the package-level @XmlNs annotation.
         * We do not verify the validity of those @XmlNs annotations, since this is the
View Full Code Here

     */
    private static String getNamespace(final Package p) {
        if (p != null) {
            final XmlSchema schema = p.getAnnotation(XmlSchema.class);
            if (schema != null) {
                final String namespace = schema.namespace().trim();
                if (!namespace.isEmpty() && !DEFAULT.equals(namespace)) {
                    return namespace;
                }
            }
        }
View Full Code Here

         }

         XmlSchema xmlSchema = packageInfo.getUnderlyingAnnotation(XmlSchema.class);
         if (xmlSchema != null)
         {
            String namespace = xmlSchema.namespace();
            if (JBossXmlConstants.DEFAULT.equals(xmlSchema) == false && XMLConstants.NULL_NS_URI.equals(defaultNamespace))
            {
               defaultNamespace = namespace;
               addNamespace(defaultNamespace, true);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.