Package org.codehaus.jettison.mapped

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


                    } 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

                                                     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

        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

            // 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

        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

                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

                                                     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

                                                     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

    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

Related Classes of org.codehaus.jettison.mapped.MappedNamespaceConvention

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.