Examples of namespace()


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

                    if (method.getParameterTypes().length == 1
                        && method.getParameterTypes()[0].equals(elValue.getClass())) {

                        XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
                        if (null != elementDecl) {
                            QName elementType = new QName(elementDecl.namespace(), elementDecl.name());
                            if (elementType.equals(elNname)) {
                                mObj = method.invoke(objectFactory.newInstance(),
                                                    elValue);                       
                            }
                        }
View Full Code Here

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

                    && method.getParameterTypes()[0].equals(cls)) {
                   
                    XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
                    if (null != elementDecl) {
                        String name = elementDecl.name();
                        String ns = namespace != null ? namespace : elementDecl.namespace();
                        if (namespace != null) {
                            helper.setJaxbNamespace(elementDecl.namespace());
                        }
                        QName elementType = new QName(ns, name);
                        registry.registerDeserializer(parentType, elementType, helper);
View Full Code Here

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

                    XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
                    if (null != elementDecl) {
                        String name = elementDecl.name();
                        String ns = namespace != null ? namespace : elementDecl.namespace();
                        if (namespace != null) {
                            helper.setJaxbNamespace(elementDecl.namespace());
                        }
                        QName elementType = new QName(ns, name);
                        registry.registerDeserializer(parentType, elementType, helper);
                        registry.registerSerializer(parentType, elementType, helper);                        
                        registry.mapExtensionTypes(parentType, elementType, cls);
View Full Code Here

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

    private boolean checkObjectFactoryNamespaces(Class<?> clz) {
        for (Method meth : clz.getMethods()) {
            XmlElementDecl decl = meth.getAnnotation(XmlElementDecl.class);
            if (decl != null
                && XmlElementDecl.GLOBAL.class.equals(decl.scope())
                && StringUtils.isEmpty(decl.namespace())) {
                return true;
            }
        }

        return false;
View Full Code Here

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

    private boolean checkObjectFactoryNamespaces(Class<?> clz) {
        for (Method meth : clz.getMethods()) {
            XmlElementDecl decl = meth.getAnnotation(XmlElementDecl.class);
            if (decl != null
                && StringUtils.isEmpty(decl.namespace())) {
                return true;
            }
        }

        return false;
View Full Code Here

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

    private static QName getXmlElementRefOrElementQName(Class jaxbClass, Field field)
            throws NoSuchFieldException {
        XmlElementRef xmlElementRef = (XmlElementRef)
                getAnnotation(field, XmlElementRef.class);
        if (xmlElementRef != null) {
            return new QName(xmlElementRef.namespace(),
                    xmlElementRef.name());
        }
        XmlElement xmlElement = (XmlElement)
                getAnnotation(field, XmlElement.class);
View Full Code Here

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

        // Make sure XmlElementWrapper annotation is on a collection or array
        if (helper.isAnnotationPresent(property.getElement(), XmlElementWrapper.class)) {
            XmlElementWrapper wrapper = (XmlElementWrapper) helper.getAnnotation(property.getElement(), XmlElementWrapper.class);
            org.eclipse.persistence.jaxb.xmlmodel.XmlElementWrapper xmlEltWrapper = new org.eclipse.persistence.jaxb.xmlmodel.XmlElementWrapper();
            xmlEltWrapper.setName(wrapper.name());
            xmlEltWrapper.setNamespace(wrapper.namespace());
            xmlEltWrapper.setNillable(wrapper.nillable());
            xmlEltWrapper.setRequired(wrapper.required());
            property.setXmlElementWrapper(xmlEltWrapper);
        }
View Full Code Here

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

   
    XmlRootElement root = bean.getAnnotation(XmlRootElement.class);
   
    if (root != null) {
      name = root.name();
      namespace = !root.namespace().equals("##default") ? root.namespace() : "";
      rootElement = true;
    } else {
      XmlElement element = bean.getAnnotation(XmlElement.class);
      if (element != null) {
        name = element.name();
View Full Code Here

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

   
    XmlRootElement root = bean.getAnnotation(XmlRootElement.class);
   
    if (root != null) {
      name = root.name();
      namespace = !root.namespace().equals("##default") ? root.namespace() : "";
      rootElement = true;
    } else {
      XmlElement element = bean.getAnnotation(XmlElement.class);
      if (element != null) {
        name = element.name();
View Full Code Here

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

        if (!found) {
            //not in object factory or no object factory, try other annotations
            XmlRootElement elAnnot = cls.getAnnotation(XmlRootElement.class);
            if (elAnnot != null) {
                String name = elAnnot.name();
                String ns = elAnnot.namespace();
                if (StringUtils.isEmpty(ns)
                    || "##default".equals(ns)) {
                    XmlSchema schema = null;
                    if (cls.getPackage() != null) {
                        schema = cls.getPackage().getAnnotation(XmlSchema.class);
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.