Examples of MappedNamespaceConvention


Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

      normalize(root);

      ByteArrayOutputStream bout = new ByteArrayOutputStream();
      Writer writer = new PrintWriter(bout);

      MappedNamespaceConvention con = new MappedNamespaceConvention();
      XMLStreamWriter streamWriter = new ResultAdapter(con, writer);

      Source source = new DOMSource(root);
      //Result output = new StAXResult(streamWriter); JDK 6 only
      Result output = new SAXResult((ContentHandler)streamWriter);
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

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

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention


   protected static XMLStreamWriter getMappedXMLStreamWriter(OutputStream entityStream)
   {
      OutputStreamWriter out = new OutputStreamWriter(entityStream);
      MappedNamespaceConvention convention = new MappedNamespaceConvention();
      XMLStreamWriter writer = new MappedXMLStreamWriter(convention, out);
      return writer;
   }
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) {
            logger.error(Messages.getMessage("jaxbFailToMarshal"), type.getName());
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                                                     boolean dropRootElement) throws Exception {
        if (writeXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        Configuration c = new Configuration(namespaceMap);
        MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
        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

     * @since 1.4
     */
    public JettisonMappedXmlDriver(final Configuration config, final boolean useSerializeAsArray) {
        mof = new MappedXMLOutputFactory(config);
        mif = new MappedXMLInputFactory(config);
        convention = new MappedNamespaceConvention(config);
        this.useSerializeAsArray = useSerializeAsArray;
    }
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedNamespaceConvention

                                                     boolean dropRootElement) throws Exception {
        if (writeXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        Configuration c = new Configuration(namespaceMap);
        MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
        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

    }

    public JettisonMappedXmlDriver(final Configuration config, final boolean useSerializeAsArray) {
        mof = new MappedXMLOutputFactory(config);
        mif = new MappedXMLInputFactory(config);
        convention = new MappedNamespaceConvention(config);
        this.useSerializeAsArray = useSerializeAsArray;
    }
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) {
            logger.error(Messages.getMessage("jaxbFailToMarshal"), type.getName()); //$NON-NLS-1$
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.