Examples of MappedNamespaceConvention


Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                if (null == config.getXml2JsonNs()) {
                    jmConfig = new Configuration();
                } else {
                    jmConfig = new Configuration(config.getXml2JsonNs());
                }
                return new MappedXMLStreamWriter(new MappedNamespaceConvention(jmConfig), writer);
            default:
                return null;
        }
    }
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                    } else {
                        jmConfig = new Configuration(config.getXml2JsonNs());
                    }
                    return new MappedXMLStreamReader(
                            new JSONObject(new JSONTokener(ReaderWriter.readFromAsString(nonEmptyReader))),
                            new MappedNamespaceConvention(jmConfig));
                } catch (Exception ex) {
                    throw new XMLStreamException(ex);
                }
            case BADGERFISH:
                try {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                                                     Configuration config,
                                                     boolean serializeAsArray,
                                                     List<String> arrayKeys,
                                                     boolean dropRootElement) throws Exception {
       
        MappedNamespaceConvention convention = new MappedNamespaceConvention(config);
        AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
                                            convention,
                                            new OutputStreamWriter(os, UTF8));
        if (serializeAsArray) {
            if (arrayKeys != null) {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

        return null;
    }

    //returns the "Mapped" JSON writer
    protected XMLStreamWriter getJSONWriter(OutputStream outStream) {
        MappedNamespaceConvention mnc = new MappedNamespaceConvention();
        return new MappedXMLStreamWriter(mnc, new OutputStreamWriter(outStream));
    }
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

            // Use an OutputStream directly instead of a Writer for performance.
            XMLStreamWriter xsw = null;
            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(new OutputStreamWriter(entityStream));
            } else {
                MappedNamespaceConvention con = new MappedNamespaceConvention(outputConfiguration);
                xsw = new MappedXMLStreamWriter(con, new OutputStreamWriter(entityStream));
            }
            marshaller.marshal(entityToMarshal, xsw);
        } catch (JAXBException e) {
            if (logger.isErrorEnabled()) {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

        return null;
    }

    //returns the "Mapped" JSON writer
    protected XMLStreamWriter getJSONWriter(OutputStream outStream) {
        MappedNamespaceConvention mnc = new MappedNamespaceConvention();
        return new MappedXMLStreamWriter(mnc, new OutputStreamWriter(outStream));
    }
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                encoding = "UTF-8";
            }
            Marshaller ms = createMarshaller(actualObject, actualClass, genericType, encoding);

            Configuration c = new Configuration(namespaceMap);
            MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
            AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
                                               convention,
                                               new OutputStreamWriter(os, encoding));
            if (serializeAsArray) {
                if (arrayKeys != null) {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                                                     Configuration config,
                                                     boolean serializeAsArray,
                                                     List<String> arrayKeys,
                                                     boolean dropRootElement) throws Exception {
       
        MappedNamespaceConvention convention = new MappedNamespaceConvention(config);
        AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
                                            convention,
                                            new OutputStreamWriter(os, UTF8));
        if (serializeAsArray) {
            if (arrayKeys != null) {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                                                     Configuration config,
                                                     boolean serializeAsArray,
                                                     List<String> arrayKeys,
                                                     boolean dropRootElement) throws Exception {
       
        MappedNamespaceConvention convention = new PrefixRespectingMappedNamespaceConvention(config);
        AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
                                            convention,
                                            new OutputStreamWriter(os, UTF8));
        if (serializeAsArray) {
            if (arrayKeys != null) {
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

    private static class JettisonMappedReaderFactory extends AbstractXMLInputFactory {
        private static final int INPUT_BUF_SIZE = 4096;
        private MappedNamespaceConvention convention;
        private DocumentDepthProperties depthProps;
        public JettisonMappedReaderFactory(Map<?, ?> nstojns, DocumentDepthProperties depthProps) {
            convention = new MappedNamespaceConvention(new Configuration(nstojns));
            this.depthProps = depthProps;
        }
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.