Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.Configuration


                                                     List<String> arrayKeys,
                                                     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) {
View Full Code Here


                                                    boolean writeXsiType,
                                                    TypeConverter converter) {
        if (writeXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        Configuration c = new Configuration(namespaceMap);
        if (converter != null) {
            c.setTypeConverter(converter);
        }
        return c;
    }
View Full Code Here

    /**
     * Construct a JettisonMappedXmlDriver.
     */
    public JettisonMappedXmlDriver() {
        this(new Configuration());
    }
View Full Code Here

    protected String marshall(Serializable object, String transformation)
            throws JMSException {
        StringWriter buffer = new StringWriter();
        HierarchicalStreamWriter out;
        if (transformation.toLowerCase().endsWith("json")) {
            out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer);
        } else {
            out = new PrettyPrintWriter(buffer);
        }
        getXStream().marshal(object, out);
        return buffer.toString();
View Full Code Here

                                                     List<String> arrayKeys,
                                                     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) {
View Full Code Here

    private final MappedXMLInputFactory mif;
    private final MappedNamespaceConvention convention;
    private boolean useSerializeAsArray = true;

    public JettisonMappedXmlDriver() {
        this(new Configuration(), true);
    }
View Full Code Here

  protected String marshall(Serializable object, String transformation)
      throws JMSException {
    StringWriter buffer = new StringWriter();
    HierarchicalStreamWriter out;
    if (transformation.toLowerCase().endsWith("json")) {
      out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer);
    } else {
      out = new PrettyPrintWriter(buffer);
    }
    getXStream().marshal(object, out);
    return buffer.toString();
View Full Code Here

                                       Configuration writer) {
        this.isBadgerFishConventionUsed = isBadgerFishConventionUsed;
        if (reader != null) {
            this.inputConfiguration = reader;
        } else {
            this.inputConfiguration = new Configuration(new HashMap<String, String>());
        }
        if (writer != null) {
            this.outputConfiguration = writer;
        } else {
            this.outputConfiguration = new Configuration(new HashMap<String, String>());
        }
        // see http://jira.codehaus.org/browse/JETTISON-74 . reading disabled
        // for now
        isReadable = false;
        isWritable = true;
View Full Code Here

                                Configuration writer) {
        this.isBadgerFishConventionUsed = isBadgerFishConventionUsed;
        if (reader != null) {
            this.inputConfiguration = reader;
        } else {
            this.inputConfiguration = new Configuration(new HashMap<String, String>());
        }
        if (writer != null) {
            this.outputConfiguration = writer;
        } else {
            this.outputConfiguration = new Configuration(new HashMap<String, String>());
        }

        // see http://jira.codehaus.org/browse/JETTISON-74 . reading disabled
        // for now
        isReadable = false;
View Full Code Here

        }
        if (BADGER_FISH_CONVENTION.equals(convention)) {
            return JSONUtils.createBadgerFishWriter(os);
        }
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap,
                                          writeXsiType && !ignoreNamespaces,
                                          attributesToElements,
                                          typeConverter);
       
View Full Code Here

TOP

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

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.