Package com.sun.xml.internal.bind.v2.runtime

Examples of com.sun.xml.internal.bind.v2.runtime.XMLSerializer


    public void handleAttribute(final QName attributeName, final String value) {
        startElement(attributeName);
    }

    private RuntimePropertyInfo getCurrentElementRuntimePropertyInfo() {
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        return (cp == null) ? null : cp.getInfo();
    }
View Full Code Here


        public String print(BeanT bean) throws AccessorException, SAXException {
            TargetT target = acc.get(bean);
            if(target==null)    return null;
           
            XMLSerializer w = XMLSerializer.getInstance();
            try {
                String id = w.grammar.getBeanInfo(target,true).getId(target,w);
                if(id==null)
                    w.errorMissingId(target);
                return id;
            } catch (JAXBException e) {
                w.reportError(null,e);
                return null;
            }
        }
View Full Code Here

        if(list==null)
            return null;

        StringBuilder buf = new StringBuilder();
        XMLSerializer w = XMLSerializer.getInstance();
        ListIterator<ItemT> itr = lister.iterator(list, w);

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    if(buf.length()>0buf.append(' ');
                    buf.append(xducer.print(item));
                }
            } catch (JAXBException e) {
                w.reportError(null,e);
            }
        }
        return buf.toString();
    }
View Full Code Here

        public String print(BeanT bean) throws AccessorException, SAXException {
            TargetT target = acc.get(bean);
            if(target==null)    return null;
           
            XMLSerializer w = XMLSerializer.getInstance();
            try {
                String id = w.grammar.getBeanInfo(target,true).getId(target,w);
                if(id==null)
                    w.errorMissingId(target);
                return id;
            } catch (JAXBException e) {
                w.reportError(null,e);
                return null;
            }
        }
View Full Code Here

        if(list==null)
            return null;

        StringBuilder buf = new StringBuilder();
        XMLSerializer w = XMLSerializer.getInstance();
        ListIterator<ItemT> itr = lister.iterator(list, w);

        while(itr.hasNext()) {
            try {
                ItemT item = itr.next();
                if (item != null) {
                    if(buf.length()>0buf.append(' ');
                    buf.append(xducer.print(item));
                }
            } catch (JAXBException e) {
                w.reportError(null,e);
            }
        }
        return buf.toString();
    }
View Full Code Here

        public String print(BeanT bean) throws AccessorException, SAXException {
            TargetT target = acc.get(bean);
            if(target==null)    return null;
           
            XMLSerializer w = XMLSerializer.getInstance();
            try {
                String id = w.grammar.getBeanInfo(target,true).getId(target,w);
                if(id==null)
                    w.errorMissingId(target);
                return id;
            } catch (JAXBException e) {
                w.reportError(null,e);
                return null;
            }
        }
View Full Code Here

        // still the same array, no need to dig out runtime property info
        if ((elementName != null) && (parentPI != null) && (parentPI.lastUnderlyingPI != null) && (elementName.equals(parentPI.lastUnderlyingPI.elementName))) {
            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
View Full Code Here

        // still the same array, no need to dig out runtime property info
        if ((elementName != null) && (parentPI != null) && (parentPI.lastUnderlyingPI != null) && (elementName.equals(parentPI.lastUnderlyingPI.elementName))) {
            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
View Full Code Here

        public String print(BeanT bean) throws AccessorException, SAXException {
            TargetT target = acc.get(bean);
            if(target==null)    return null;
           
            XMLSerializer w = XMLSerializer.getInstance();
            try {
                String id = w.grammar.getBeanInfo(target,true).getId(target,w);
                if(id==null)
                    w.errorMissingId(target);
                return id;
            } catch (JAXBException e) {
                w.reportError(null,e);
                return null;
            }
        }
View Full Code Here

/*     */
/* 102 */     if (list == null) {
/* 103 */       return null;
/*     */     }
/* 105 */     StringBuilder buf = new StringBuilder();
/* 106 */     XMLSerializer w = XMLSerializer.getInstance();
/* 107 */     ListIterator itr = this.lister.iterator(list, w);
/*     */
/* 109 */     while (itr.hasNext()) {
/*     */       try {
/* 111 */         Object item = itr.next();
/* 112 */         if (item != null) {
/* 113 */           if (buf.length() > 0) buf.append(' ');
/* 114 */           buf.append(this.xducer.print(item));
/*     */         }
/*     */       } catch (JAXBException e) {
/* 117 */         w.reportError(null, e);
/*     */       }
/*     */     }
/* 120 */     return buf.toString();
/*     */   }
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.bind.v2.runtime.XMLSerializer

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.