Package com.fasterxml.jackson.dataformat.xml

Examples of com.fasterxml.jackson.dataformat.xml.JacksonXmlModule


    @Override
    protected void initXmlModule() {
        if (defaultUseWrapper != null) {
            if (defaultUseWrapper.equals("false")) {
                xmlModule = new JacksonXmlModule();
                xmlModule.setDefaultUseWrapper(false);
            } else if (defaultUseWrapper.equals("true")) {
                //default value is already true, so nothing to do
            } else {
                throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, defaultUseWrapper, "defaultUseWrapper");
View Full Code Here


    }

    @Override
    protected void initXmlModule() {
        if (xmlTextElementName != null && !xmlTextElementName.isEmpty()) {
            xmlModule = new JacksonXmlModule();
            xmlModule.setXMLTextElementName(xmlTextElementName);
        }
    }
View Full Code Here

                xmlFactory = xmlFactoryCached;
                if (xmlFactory == null) {
                    xmlFactoryCached = xmlFactory = new XmlFactory();
                }

                JacksonXmlModule xmlModule = null;
                NoMappingJsonFactoryObjectFactory.configureInputDecoratorAndOutputDecorator(xmlFactory, environment);

                final Object xmlTextElementName = environment.get("xmlTextElementName");
                if (xmlTextElementName != null) {
                    xmlModule = new JacksonXmlModule();
                    xmlModule.setXMLTextElementName((String) xmlTextElementName);
                }

                final Object defaultUseWrapper = environment.get("defaultUseWrapper");
                if (defaultUseWrapper != null) {
                    if (defaultUseWrapper.equals("false")) {
                        if (xmlModule == null) {
                            xmlModule = new JacksonXmlModule();
                        }
                        xmlModule.setDefaultUseWrapper(false);
                    } else if (defaultUseWrapper.equals("true")) {
                        //default value is already true, so nothing to do
                    } else {
                        throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, (String) defaultUseWrapper, "defaultUseWrapper");
                    }
View Full Code Here

    public synchronized XmlMapper getDefaultMapper()
    {
        if (_defaultMapper == null) {
            // 10-Oct-2012, tatu: Better do things explicitly...
            JacksonXmlModule module = getConfiguredModule();
            _defaultMapper = (module == null) ? new XmlMapper() : new XmlMapper(module);
            _setAnnotations(_defaultMapper, _defaultAnnotationsToUse);
        }
        return _defaultMapper;
    }
View Full Code Here

        return _defaultMapper;
    }

    protected JacksonXmlModule getConfiguredModule()
    {
        return new JacksonXmlModule();
    }
View Full Code Here

    }

    @Override
    protected void initXmlModule() {
        if (xmlTextElementName != null && !xmlTextElementName.isEmpty()) {
            xmlModule = new JacksonXmlModule();
            xmlModule.setXMLTextElementName(xmlTextElementName);
        }
    }
View Full Code Here

    }

    @Override
    protected void initXmlModule() {
        if (xmlTextElementName != null && !xmlTextElementName.isEmpty()) {
            xmlModule = new JacksonXmlModule();
            xmlModule.setXMLTextElementName(xmlTextElementName);
        }
    }
View Full Code Here

                xmlFactory = xmlFactoryCached;
                if (xmlFactory == null) {
                    xmlFactoryCached = xmlFactory = new XmlFactory();
                }

                JacksonXmlModule xmlModule = null;
                NoMappingJsonFactoryObjectFactory.configureInputDecoratorAndOutputDecorator(xmlFactory, environment);

                final Object xmlTextElementName = environment.get("xmlTextElementName");
                if (xmlTextElementName != null) {
                    xmlModule = new JacksonXmlModule();
                    xmlModule.setXMLTextElementName((String) xmlTextElementName);
                }

                final Object defaultUseWrapper = environment.get("defaultUseWrapper");
                if (defaultUseWrapper != null) {
                    if (defaultUseWrapper.equals("false")) {
                        if (xmlModule == null) {
                            xmlModule = new JacksonXmlModule();
                        }
                        xmlModule.setDefaultUseWrapper(false);
                    } else if (defaultUseWrapper.equals("true")) {
                        //default value is already true, so nothing to do
                    } else {
                        throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, (String) defaultUseWrapper, "defaultUseWrapper");
                    }
View Full Code Here

    @Override
    protected void initXmlModule() {
        if (defaultUseWrapper != null) {
            if (defaultUseWrapper.equals("false")) {
                xmlModule = new JacksonXmlModule();
                xmlModule.setDefaultUseWrapper(false);
            } else if (defaultUseWrapper.equals("true")) {
                //default value is already true, so nothing to do
            } else {
                throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, defaultUseWrapper, "defaultUseWrapper");
View Full Code Here

    // let's actually reuse XmlMapper to make things bit faster
    @Override
    public void setUp() throws Exception
    {
        super.setUp();
        JacksonXmlModule module = new JacksonXmlModule();
        module.setDefaultUseWrapper(false);
        _xmlMapper = new XmlMapper(module);
        _xmlMapper.setPropertyNamingStrategy(new PropertyNamingStrategy.PascalCaseStrategy());
        _xmlMapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.dataformat.xml.JacksonXmlModule

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.