diff --git a/.travis.yml b/.travis.yml index f1a7176ac..8f0057761 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,17 @@ jdk: - openjdk8 - openjdk11 +# Below this line is configuration for deploying to the Sonatype OSS repo +# https://knowm.org/configure-travis-ci-to-deploy-snapshots/ +before_install: "git clone -b travis `git config --get remote.origin.url` target/travis" +script: "[ ${TRAVIS_PULL_REQUEST} = 'false' ] && mvn clean deploy --settings target/travis/settings.xml || mvn clean verify --settings target/travis/settings.xml" + branches: only: - master - - "2.10" + - "2.12" + +env: + global: + - secure: "z0xmU0VFKUHE6TVqDBIH5LRV/x1Cd4jk8uuiTXp0tH6980PzlN+cDTzSwXEEa+ugJ1g0slRFbE9/0hL7mJ+jPHEDHR1xE6iZT46EWWDyPJQelxO1K4lSzvpLvE07CaQuBAeDAoEOxKd2m7IBx9fRLdgp8QBpfjHxlh77Cmk4pug=" + - secure: "wAgWG2GqyvXYcWOaoEE5YRncfF1Q23aiw8YmEveuC4xGCjvYCdKYrK/fz69dwNERN+H1dxM0IMNgkFXrnHsC6YcbGLsS+do28NK5e/ygF1P7dcpC6a6LYLTvrguMw+eco7xIaxUlMnTccj8K9T/OpKpGvGKaH4uW+GLoxCnXSv0=" diff --git a/XsiNilPrecedence385Test.java b/XsiNilPrecedence385Test.java new file mode 100644 index 000000000..b0eeca76a --- /dev/null +++ b/XsiNilPrecedence385Test.java @@ -0,0 +1,78 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import com.ctc.wstx.stax.WstxInputFactory; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.dataformat.xml.XmlFactory; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; +import org.junit.Test; + +import javax.xml.stream.XMLInputFactory; +import java.util.List; + +import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES; +import static javax.xml.stream.XMLInputFactory.IS_NAMESPACE_AWARE; + +public class XsiNilPrecedence385Test extends XmlTestBase +{ + protected static class Items { + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "item") + public List itemList; + } + + @JacksonXmlRootElement(localName = "Items") + protected static class Item { + @JacksonXmlProperty(isAttribute = true) + public String attr1; + @JacksonXmlProperty(isAttribute = true) + public String type; + @JacksonXmlProperty(isAttribute = true) + public Integer idx; + @JacksonXmlText + public String value; + } + + private XmlMapper MAPPER; + + @Override + public void setUp() throws Exception { + super.setUp(); + XMLInputFactory ifactory = new WstxInputFactory(); + ifactory.setProperty(IS_NAMESPACE_AWARE, true); + + XmlFactory xf = new XmlFactory(ifactory); + + XmlMapper mapper = new XmlMapper(xf); // there are other overloads too + mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true); + mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false); + + MAPPER = mapper; + } + + @Test + public void test() throws Exception + { + String xml = "\n" + + "\n" + + "\n" + + ""; + Items bean = MAPPER.readValue(xml, Items.class); + + assertNotNull(bean); + assertNotNull(bean.itemList); + assertEquals(2, bean.itemList.size()); + + assertEquals("a",bean.itemList.get(0).attr1); + assertEquals("est",bean.itemList.get(0).type); + assertEquals(Integer.valueOf("1"),bean.itemList.get(0).idx); + + assertEquals("b",bean.itemList.get(1).attr1); + assertEquals("est",bean.itemList.get(1).type); + assertEquals(Integer.valueOf("2"),bean.itemList.get(1).idx); + } +} \ No newline at end of file diff --git a/docs/javadoc/2.11/allclasses-frame.html b/docs/javadoc/2.11/allclasses-frame.html new file mode 100644 index 000000000..5f912515f --- /dev/null +++ b/docs/javadoc/2.11/allclasses-frame.html @@ -0,0 +1,66 @@ + + + + + + +All Classes (Jackson-dataformat-XML 2.11.0 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.11/allclasses-noframe.html b/docs/javadoc/2.11/allclasses-noframe.html new file mode 100644 index 000000000..91819928c --- /dev/null +++ b/docs/javadoc/2.11/allclasses-noframe.html @@ -0,0 +1,66 @@ + + + + + + +All Classes (Jackson-dataformat-XML 2.11.0 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html new file mode 100644 index 000000000..beb4babd1 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html @@ -0,0 +1,392 @@ + + + + + + +DefaultingXmlTypeResolverBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class DefaultingXmlTypeResolverBuilder

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>, Serializable
    +
    +
    +
    +
    public class DefaultingXmlTypeResolverBuilder
    +extends com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder
    +implements Serializable
    +
    Sub-class of StdTypeResolverBuilder specifically used with + Default Typing. +

    + Composition/sub-classing gets quite tricky here: ideally we would just + extend XmlTypeResolverBuilder but unfortunately inheritance hierarchy + does not allow this.

    +
    +
    Since:
    +
    2.10
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder

        +_appliesFor, _subtypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +_customIdResolver, _defaultImpl, _idType, _includeAs, _typeIdVisible, _typeProperty
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      DefaultingXmlTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping t, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.TypeIdResolveridResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, + com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, + Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, + boolean forSer, + boolean forDeser) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilderinit(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType, + com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuildertypeProperty(String typeIdPropName) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder

        +buildTypeDeserializer, buildTypeSerializer, construct, subTypeValidator, useForType
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +defaultImpl, defineDefaultImpl, getDefaultImpl, getTypeProperty, inclusion, isTypeIdVisible, noTypeInfoBuilder, reportInvalidBaseType, typeIdVisibility, verifyBaseTypeValidity
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DefaultingXmlTypeResolverBuilder

        +
        public DefaultingXmlTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping t,
        +                                        com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
        +                                                                                com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes)
        +
        +
        Specified by:
        +
        init in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        init in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        typeProperty

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder typeProperty(String typeIdPropName)
        +
        +
        Specified by:
        +
        typeProperty in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        typeProperty in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        idResolver

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config,
        +                                                                            com.fasterxml.jackson.databind.JavaType baseType,
        +                                                                            com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator,
        +                                                                            Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes,
        +                                                                            boolean forSer,
        +                                                                            boolean forDeser)
        +
        +
        Overrides:
        +
        idResolver in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html new file mode 100644 index 000000000..e227d6999 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html @@ -0,0 +1,619 @@ + + + + + + +JacksonXmlAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class JacksonXmlAnnotationIntrospector

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector, Serializable
    +
    +
    +
    +
    public class JacksonXmlAnnotationIntrospector
    +extends com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
    +implements XmlAnnotationIntrospector
    +
    Extension of JacksonAnnotationIntrospector that is needed to support + additional xml-specific annotation that Jackson provides. Note, however, that + there is no JAXB annotation support here; that is provided with + separate introspector (see + JaxbAnnotationIntrospector).
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected boolean_cfgDefaultUseWrapper 
      static booleanDEFAULT_USE_WRAPPER +
      For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

        +_annotationsInside, _cfgConstructorPropertiesImpliesCreator
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder_constructStdTypeResolverBuilder() +
      We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
      +
      protected com.fasterxml.jackson.databind.PropertyName_findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a) 
      com.fasterxml.jackson.databind.PropertyNamefindNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a) 
      com.fasterxml.jackson.databind.PropertyNamefindNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a) 
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      com.fasterxml.jackson.databind.PropertyNamefindRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac) 
      com.fasterxml.jackson.databind.PropertyNamefindWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann) 
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

        +_classIfExplicit, _classIfExplicit, _constructNoTypeResolverBuilder, _constructVirtualProperty, _constructVirtualProperty, _findConstructorName, _findTypeResolver, _isIgnorable, _propertyName, findAndAddVirtualProperties, findAutoDetectVisibility, findClassDescription, findContentDeserializer, findContentSerializer, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentConverter, findDeserializationContentType, findDeserializationConverter, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumAliases, findEnumValue, findEnumValues, findFilterId, findFormat, findImplicitPropertyName, findInjectableValue, findInjectableValueId, findKeyDeserializer, findKeySerializer, findMergeInfo, findNamingStrategy, findNullSerializer, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPropertyAccess, findPropertyAliases, findPropertyContentTypeResolver, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnorals, findPropertyInclusion, findPropertyIndex, findPropertyTypeResolver, findReferenceType, findRenameByField, findSerializationContentConverter, findSerializationContentType, findSerializationConverter, findSerializationKeyType, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializer, findSetterInfo, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isIgnorableType, isTypeId, readResolve, refineDeserializationType, refineSerializationType, resolveSetterConflict, setConstructorPropertiesImpliesCreator, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findIgnoreUnknownProperties, findPropertiesToIgnore, findPropertiesToIgnore, findSerializationInclusion, findSerializationInclusionForContent, nopInstance, pair
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_USE_WRAPPER

        +
        public static final boolean DEFAULT_USE_WRAPPER
        +
        For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        _cfgDefaultUseWrapper

        +
        protected boolean _cfgDefaultUseWrapper
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JacksonXmlAnnotationIntrospector

        +
        public JacksonXmlAnnotationIntrospector()
        +
      • +
      + + + +
        +
      • +

        JacksonXmlAnnotationIntrospector

        +
        public JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findWrapperName

        +
        public com.fasterxml.jackson.databind.PropertyName findWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        +
        Overrides:
        +
        findWrapperName in class com.fasterxml.jackson.databind.AnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public com.fasterxml.jackson.databind.PropertyName findRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac)
        +
        +
        Overrides:
        +
        findRootName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + + + + +
        +
      • +

        findNameForSerialization

        +
        public com.fasterxml.jackson.databind.PropertyName findNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
        +
        Overrides:
        +
        findNameForSerialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findNameForDeserialization

        +
        public com.fasterxml.jackson.databind.PropertyName findNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
        +
        Overrides:
        +
        findNameForDeserialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        _constructStdTypeResolverBuilder

        +
        protected com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder _constructStdTypeResolverBuilder()
        +
        We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
        +
        +
        Overrides:
        +
        _constructStdTypeResolverBuilder in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        _findXmlName

        +
        protected com.fasterxml.jackson.databind.PropertyName _findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html new file mode 100644 index 000000000..9ded9c733 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html @@ -0,0 +1,482 @@ + + + + + + +JacksonXmlModule (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class JacksonXmlModule

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class JacksonXmlModule
    +extends com.fasterxml.jackson.databind.module.SimpleModule
    +implements Serializable
    +
    Module that implements most functionality needed to support producing and + consuming XML instead of JSON.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module

        +com.fasterxml.jackson.databind.Module.SetupContext
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected boolean_cfgDefaultUseWrapper +
      Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not.
      +
      protected String_cfgNameForTextElement +
      Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use).
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        +_abstractTypes, _deserializerModifier, _deserializers, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JacksonXmlModule() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.AnnotationIntrospector_constructIntrospector() 
      voidsetDefaultUseWrapper(boolean state) +
      Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations.
      +
      voidsetupModule(com.fasterxml.jackson.databind.Module.SetupContext context) 
      voidsetXMLTextElementName(String name) +
      Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values.
      +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        +_checkNotNull, addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, getTypeId, registerSubtypes, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setValueInstantiators, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.Module

        +getDependencies
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _cfgDefaultUseWrapper

        +
        protected boolean _cfgDefaultUseWrapper
        +
        Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not. + If enabled, wrapping is used by default; if false, it is not. +

        + Note that JAXB annotation introspector always assumes "do not wrap by default". + Jackson annotations have different default due to backwards compatibility.

        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
        Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use). Defaults to empty String, but + may be changed for interoperability reasons: JAXB, for example, uses + "value" as name.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JacksonXmlModule

        +
        public JacksonXmlModule()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setupModule

        +
        public void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
        +
        +
        Overrides:
        +
        setupModule in class com.fasterxml.jackson.databind.module.SimpleModule
        +
        +
      • +
      + + + +
        +
      • +

        setDefaultUseWrapper

        +
        public void setDefaultUseWrapper(boolean state)
        +
        Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations. + See JacksonXmlElementWrapper + for details. +

        + Note that method MUST be called before registering the module; otherwise change + will not have any effect.

        +
        +
        Parameters:
        +
        state - Whether to enable or disable "use wrapper for non-annotated List properties"
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values. Default name is empty String + (""); but some frameworks use other names: JAXB, for example, uses + "value". +

        + Note that method MUST be called before registering the module; otherwise change + will not have any effect.

        +
        +
        Parameters:
        +
        name - Virtual name to use when exposing XML character data sections
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _constructIntrospector

        +
        protected com.fasterxml.jackson.databind.AnnotationIntrospector _constructIntrospector()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/PackageVersion.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/PackageVersion.html new file mode 100644 index 000000000..855de44be --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/PackageVersion.html @@ -0,0 +1,321 @@ + + + + + + +PackageVersion (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class PackageVersion

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned
    +
    +
    +
    +
    public final class PackageVersion
    +extends Object
    +implements com.fasterxml.jackson.core.Versioned
    +
    Automatically generated from PackageVersion.java.in during + packageVersion-generate execution of maven-replacer-plugin in + pom.xml.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        VERSION

        +
        public static final com.fasterxml.jackson.core.Version VERSION
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PackageVersion

        +
        public PackageVersion()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html new file mode 100644 index 000000000..9a2adb59c --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html @@ -0,0 +1,443 @@ + + + + + + +XmlAnnotationIntrospector.JaxbWrapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlAnnotationIntrospector.JaxbWrapper

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector_intr 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JaxbWrapper(com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector i) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _intr

        +
        protected final com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector _intr
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JaxbWrapper

        +
        public JaxbWrapper(com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector i)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html new file mode 100644 index 000000000..b0a63df1d --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html @@ -0,0 +1,513 @@ + + + + + + +XmlAnnotationIntrospector.Pair (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlAnnotationIntrospector.Pair

+
+
+ +
+ +
+
+
    +
  • + + + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Pair(com.fasterxml.jackson.databind.AnnotationIntrospector p, + com.fasterxml.jackson.databind.AnnotationIntrospector s) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      static XmlAnnotationIntrospector.Pairinstance(com.fasterxml.jackson.databind.AnnotationIntrospector a1, + com.fasterxml.jackson.databind.AnnotationIntrospector a2) 
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair

        +_explicitClassOrOb, _isExplicitClassOrOb, allIntrospectors, allIntrospectors, create, findAndAddVirtualProperties, findAutoDetectVisibility, findClassDescription, findContentDeserializer, findContentSerializer, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentConverter, findDeserializationContentType, findDeserializationConverter, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumAliases, findEnumValue, findEnumValues, findFilterId, findFormat, findIgnoreUnknownProperties, findImplicitPropertyName, findInjectableValue, findInjectableValueId, findKeyDeserializer, findKeySerializer, findMergeInfo, findNameForDeserialization, findNameForSerialization, findNamingStrategy, findNullSerializer, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findPropertiesToIgnore, findPropertyAccess, findPropertyAliases, findPropertyContentTypeResolver, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnorals, findPropertyInclusion, findPropertyIndex, findPropertyTypeResolver, findReferenceType, findRenameByField, findRootName, findSerializationContentConverter, findSerializationContentType, findSerializationConverter, findSerializationInclusion, findSerializationInclusionForContent, findSerializationKeyType, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializer, findSetterInfo, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, findWrapperName, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isIgnorableType, isTypeId, refineDeserializationType, refineSerializationType, resolveSetterConflict, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, nopInstance, pair
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Pair

        +
        public Pair(com.fasterxml.jackson.databind.AnnotationIntrospector p,
        +            com.fasterxml.jackson.databind.AnnotationIntrospector s)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        instance

        +
        public static XmlAnnotationIntrospector.Pair instance(com.fasterxml.jackson.databind.AnnotationIntrospector a1,
        +                                                      com.fasterxml.jackson.databind.AnnotationIntrospector a2)
        +
      • +
      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html new file mode 100644 index 000000000..e2393e62e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html @@ -0,0 +1,348 @@ + + + + + + +XmlAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Interface XmlAnnotationIntrospector

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeInterface and Description
      static class XmlAnnotationIntrospector.JaxbWrapper +
      Wrapper we need to adapt JaxbAnnotationIntrospector as + XmlAnnotationIntrospector: something we can not (alas!) + do in JAXB module because of dependency direction (JAXB module + has no knowledge of this module).
      +
      static class XmlAnnotationIntrospector.Pair +
      Extension of AnnotationIntrospector.Pair that can + also dispatch 'XmlAnnotationIntrospector' methods.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
      • +
      + + + +
        +
      • +

        setDefaultUseWrapper

        +
        void setDefaultUseWrapper(boolean b)
        +
        +
        Since:
        +
        2.7
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactory.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactory.html new file mode 100644 index 000000000..85a4108e8 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactory.html @@ -0,0 +1,1519 @@ + + + + + + +XmlFactory (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlFactory

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class XmlFactory
    +extends com.fasterxml.jackson.core.JsonFactory
    +
    Factory used for constructing FromXmlParser and ToXmlGenerator + instances. +

    + Implements JsonFactory since interface for constructing XML backed + parsers and generators is quite similar to dealing with JSON.

    +
    +
    Author:
    +
    Tatu Saloranta (tatu.saloranta@iki.fi)
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _xmlParserFeatures

        +
        protected int _xmlParserFeatures
        +
      • +
      + + + +
        +
      • +

        _xmlGeneratorFeatures

        +
        protected int _xmlGeneratorFeatures
        +
      • +
      + + + +
        +
      • +

        _xmlInputFactory

        +
        protected transient XMLInputFactory _xmlInputFactory
        +
      • +
      + + + +
        +
      • +

        _xmlOutputFactory

        +
        protected transient XMLOutputFactory _xmlOutputFactory
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
      • +
      + + + +
        +
      • +

        _jdkXmlInFactory

        +
        protected transient String _jdkXmlInFactory
        +
        Hiding place for JDK-serialization unthawed factories...
        +
      • +
      + + + +
        +
      • +

        _jdkXmlOutFactory

        +
        protected transient String _jdkXmlOutFactory
        +
        Hiding place for JDK-serialization unthawed factories...
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlFactory

        +
        public XmlFactory()
        +
        Default constructor used to create factory instances. + Creation of a factory instance is a light-weight operation, + but it is still a good idea to reuse limited number of + factory instances (and quite often just a single instance): + factories are used as context for storing some reused + processing objects (such as symbol tables parsers use) + and this reuse only works within context of a single + factory instance.
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        public XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc)
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc,
        +                     int xpFeatures,
        +                     int xgFeatures,
        +                     XMLInputFactory xmlIn,
        +                     XMLOutputFactory xmlOut,
        +                     String nameForTextElem)
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(XmlFactory src,
        +                     com.fasterxml.jackson.core.ObjectCodec oc)
        +
        +
        Since:
        +
        2.2.1
        +
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(XmlFactoryBuilder b)
        +
        Constructors used by JsonFactoryBuilder for instantiation.
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        rebuild

        +
        public XmlFactoryBuilder rebuild()
        +
        +
        Overrides:
        +
        rebuild in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + + + + + +
        +
      • +

        copy

        +
        public XmlFactory copy()
        +
        Note: compared to base implementation by JsonFactory, + here the copy will actually share underlying XML input and + output factories, as there is no way to make copies of those.
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Overrides:
        +
        version in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        readResolve

        +
        protected Object readResolve()
        +
        Method that we need to override to actually make restoration go + through constructors etc.
        +
        +
        Overrides:
        +
        readResolve in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        getXMLTextElementName

        +
        public String getXMLTextElementName()
        +
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public final XmlFactory configure(FromXmlParser.Feature f,
        +                                  boolean state)
        +
        Method for enabling or disabling specified XML parser feature.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        isEnabled

        +
        public final boolean isEnabled(FromXmlParser.Feature f)
        +
        Checked whether specified XML parser feature is enabled.
        +
      • +
      + + + +
        +
      • +

        getFormatParserFeatures

        +
        public int getFormatParserFeatures()
        +
        +
        Overrides:
        +
        getFormatParserFeatures in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatGeneratorFeatures

        +
        public int getFormatGeneratorFeatures()
        +
        +
        Overrides:
        +
        getFormatGeneratorFeatures in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public final XmlFactory configure(ToXmlGenerator.Feature f,
        +                                  boolean state)
        +
        Method for enabling or disabling specified XML generator feature.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        isEnabled

        +
        public final boolean isEnabled(ToXmlGenerator.Feature f)
        +
        Check whether specified XML generator feature is enabled.
        +
      • +
      + + + +
        +
      • +

        getXMLInputFactory

        +
        public XMLInputFactory getXMLInputFactory()
        +
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        setXMLInputFactory

        +
        public void setXMLInputFactory(XMLInputFactory f)
        +
      • +
      + + + +
        +
      • +

        getXMLOutputFactory

        +
        public XMLOutputFactory getXMLOutputFactory()
        +
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        setXMLOutputFactory

        +
        public void setXMLOutputFactory(XMLOutputFactory f)
        +
      • +
      + + + +
        +
      • +

        getFormatName

        +
        public String getFormatName()
        +
        Method that returns short textual id identifying format + this factory supports. +

        + Note: sub-classes should override this method; default + implementation will return null for all sub-classes

        +
        +
        Overrides:
        +
        getFormatName in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        hasFormat

        +
        public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
        +                                                          throws IOException
        +
        +
        Overrides:
        +
        hasFormat in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        requiresCustomCodec

        +
        public boolean requiresCustomCodec()
        +
        XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
        +
        +
        Overrides:
        +
        requiresCustomCodec in class com.fasterxml.jackson.core.JsonFactory
        +
        Returns:
        +
        True since XML format does require support from codec
        +
        +
      • +
      + + + +
        +
      • +

        canUseCharArrays

        +
        public boolean canUseCharArrays()
        +
        As of 2.4, we do have actual capability for passing char arrays + efficiently, but unfortunately + have no working mechanism for recycling buffers. So we have to + admit that can not make efficient use.
        +
        +
        Overrides:
        +
        canUseCharArrays in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatReadFeatureType

        +
        public Class<FromXmlParser.Feature> getFormatReadFeatureType()
        +
        +
        Overrides:
        +
        getFormatReadFeatureType in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatWriteFeatureType

        +
        public Class<ToXmlGenerator.Feature> getFormatWriteFeatureType()
        +
        +
        Overrides:
        +
        getFormatWriteFeatureType in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        createParser

        +
        public com.fasterxml.jackson.core.JsonParser createParser(String content)
        +                                                   throws IOException
        +
        Overridden just to prevent trying to optimize access via char array; + while nice idea, problem is that we don't have proper hooks to ensure + that temporary buffer gets recycled; so let's just use StringReader.
        +
        +
        Overrides:
        +
        createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        createGenerator

        +
        public ToXmlGenerator createGenerator(OutputStream out,
        +                                      com.fasterxml.jackson.core.JsonEncoding enc)
        +                               throws IOException
        +
        +
        Overrides:
        +
        createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        createGenerator

        +
        public ToXmlGenerator createGenerator(File f,
        +                                      com.fasterxml.jackson.core.JsonEncoding enc)
        +                               throws IOException
        +
        +
        Overrides:
        +
        createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(InputStream in,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(Reader r,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(char[] data,
        +                                      int offset,
        +                                      int len,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt,
        +                                      boolean recycleBuffer)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(byte[] data,
        +                                      int offset,
        +                                      int len,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createGenerator

        +
        protected com.fasterxml.jackson.core.JsonGenerator _createGenerator(Writer out,
        +                                                                    com.fasterxml.jackson.core.io.IOContext ctxt)
        +                                                             throws IOException
        +
        +
        Overrides:
        +
        _createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        hasXMLFormat

        +
        public static com.fasterxml.jackson.core.format.MatchStrength hasXMLFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
        +                                                                    throws IOException
        +
        Method that tries to figure out if content seems to be in some kind + of XML format. + Note that implementation here is not nearly as robust as what underlying + Stax parser will do; the idea is to first support common encodings, + then expand as needed (for example, it is not all that hard to support + UTF-16; but it is some work and not needed quite yet)
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html new file mode 100644 index 000000000..33e3394b1 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html @@ -0,0 +1,706 @@ + + + + + + +XmlFactoryBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlFactoryBuilder

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlFactoryBuilder
    +extends com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
    +
    TSFBuilder + implementation for constructing XmlFactory + instances.
    +
    +
    Since:
    +
    3.0
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html new file mode 100644 index 000000000..22152c446 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html @@ -0,0 +1,404 @@ + + + + + + +XmlMapper.Builder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlMapper.Builder

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    XmlMapper
    +
    +
    +
    +
    public static class XmlMapper.Builder
    +extends com.fasterxml.jackson.databind.cfg.MapperBuilder<XmlMapper,XmlMapper.Builder>
    +
    Builder implementation for constructing XmlMapper instances.
    +
    +
    Since:
    +
    2.10
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.html new file mode 100644 index 000000000..f904b3d0f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlMapper.html @@ -0,0 +1,860 @@ + + + + + + +XmlMapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlMapper

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class XmlMapper
    +extends com.fasterxml.jackson.databind.ObjectMapper
    +
    Customized ObjectMapper that will read and write XML instead of JSON, + using XML-backed JsonFactory + implementation (XmlFactory). +

    + Mapper itself overrides some aspects of functionality to try to handle + data binding aspects as similar to JAXB as possible. +

    + Note that most of configuration should be done by pre-constructing + JacksonXmlModule explicitly, instead of relying on default settings.

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class XmlMapper.Builder +
      Builder implementation for constructing XmlMapper instances.
      +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder, com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected JacksonXmlModule_xmlModule 
      protected static JacksonXmlModuleDEFAULT_XML_MODULE 
      protected static DefaultXmlPrettyPrinterDEFAULT_XML_PRETTY_PRINTER 
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +_configOverrides, _deserializationConfig, _deserializationContext, _injectableValues, _jsonFactory, _mixIns, _registeredModuleTypes, _rootDeserializers, _serializationConfig, _serializerFactory, _serializerProvider, _subtypeResolver, _typeFactory, DEFAULT_ANNOTATION_INTROSPECTOR, DEFAULT_BASE
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?>_constructDefaultTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      static XmlMapper.Builderbuilder() 
      static XmlMapper.Builderbuilder(XmlFactory streamFactory) 
      com.fasterxml.jackson.databind.ObjectMapperconfigure(FromXmlParser.Feature f, + boolean state) 
      com.fasterxml.jackson.databind.ObjectMapperconfigure(ToXmlGenerator.Feature f, + boolean state) 
      XmlMappercopy() 
      com.fasterxml.jackson.databind.ObjectMapperdisable(FromXmlParser.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperdisable(ToXmlGenerator.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperenable(FromXmlParser.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperenable(ToXmlGenerator.Feature f) 
      XmlFactorygetFactory() 
      <T> TreadValue(XMLStreamReader r, + Class<T> valueType) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      <T> TreadValue(XMLStreamReader r, + com.fasterxml.jackson.databind.JavaType valueType) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      <T> TreadValue(XMLStreamReader r, + com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      XmlMappersetDefaultUseWrapper(boolean state) +
      Deprecated.  + +
      +
      protected voidsetXMLTextElementName(String name) +
      Deprecated.  + +
      +
      com.fasterxml.jackson.core.Versionversion() 
      voidwriteValue(XMLStreamWriter w0, + Object value) +
      Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
      +
      static XmlMapper.BuilderxmlBuilder() 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +_assertNotNull, _checkInvalidCopy, _configAndWriteValue, _convert, _findRootDeserializer, _initForReading, _initForReading, _newReader, _newReader, _newWriter, _newWriter, _newWriter, _readMapAndClose, _readTreeAndClose, _readValue, _serializerProvider, _unwrapAndDeserialize, _verifyNoTrailingTokens, _verifySchemaType, acceptJsonFormatVisitor, acceptJsonFormatVisitor, activateDefaultTyping, activateDefaultTyping, activateDefaultTyping, activateDefaultTypingAsProperty, addHandler, addMixIn, addMixInAnnotations, canDeserialize, canDeserialize, canSerialize, canSerialize, clearProblemHandlers, configOverride, configure, configure, configure, configure, configure, constructType, convertValue, convertValue, convertValue, createArrayNode, createDeserializationContext, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createNonBlockingByteArrayParser, createObjectNode, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, deactivateDefaultTyping, defaultClassIntrospector, disable, disable, disable, disable, disable, disable, disable, disableDefaultTyping, enable, enable, enable, enable, enable, enable, enable, enableDefaultTyping, enableDefaultTyping, enableDefaultTyping, enableDefaultTypingAsProperty, findAndRegisterModules, findMixInClassFor, findModules, findModules, generateJsonSchema, getDateFormat, getDeserializationConfig, getDeserializationContext, getInjectableValues, getJsonFactory, getNodeFactory, getPolymorphicTypeValidator, getPropertyNamingStrategy, getRegisteredModuleIds, getSerializationConfig, getSerializerFactory, getSerializerProvider, getSerializerProviderInstance, getSubtypeResolver, getTypeFactory, getVisibilityChecker, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, missingNode, mixInCount, nullNode, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, readerFor, readerFor, readerFor, readerForArrayOf, readerForListOf, readerForMapOf, readerForUpdating, readerWithView, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, readValues, registerModule, registerModules, registerModules, registerSubtypes, registerSubtypes, registerSubtypes, setAnnotationIntrospector, setAnnotationIntrospectors, setBase64Variant, setConfig, setConfig, setDateFormat, setDefaultLeniency, setDefaultMergeable, setDefaultPrettyPrinter, setDefaultPropertyInclusion, setDefaultPropertyInclusion, setDefaultSetterInfo, setDefaultTyping, setDefaultVisibility, setFilterProvider, setFilters, setHandlerInstantiator, setInjectableValues, setLocale, setMixInAnnotations, setMixInResolver, setMixIns, setNodeFactory, setPolymorphicTypeValidator, setPropertyInclusion, setPropertyNamingStrategy, setSerializationInclusion, setSerializerFactory, setSerializerProvider, setSubtypeResolver, setTimeZone, setTypeFactory, setVisibility, setVisibility, setVisibilityChecker, tokenStreamFactory, treeAsTokens, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithType, writerWithType, writerWithType, writerWithView, writeTree, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + + + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        copy

        +
        public XmlMapper copy()
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Overrides:
        +
        version in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + +
        +
      • +

        _constructDefaultTypeResolverBuilder

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> _constructDefaultTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability,
        +                                                                                                              com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
        +
        Overrides:
        +
        _constructDefaultTypeResolverBuilder in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getFactory

        +
        public XmlFactory getFactory()
        +
        +
        Overrides:
        +
        getFactory in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public com.fasterxml.jackson.databind.ObjectMapper configure(ToXmlGenerator.Feature f,
        +                                                             boolean state)
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public com.fasterxml.jackson.databind.ObjectMapper configure(FromXmlParser.Feature f,
        +                                                             boolean state)
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       Class<T> valueType)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       com.fasterxml.jackson.databind.JavaType valueType)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        writeValue

        +
        public void writeValue(XMLStreamWriter w0,
        +                       Object value)
        +                throws IOException
        +
        Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html new file mode 100644 index 000000000..484522cc7 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html @@ -0,0 +1,604 @@ + + + + + + +XmlPrettyPrinter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Interface XmlPrettyPrinter

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    com.fasterxml.jackson.core.PrettyPrinter
    +
    +
    +
    All Known Implementing Classes:
    +
    DefaultXmlPrettyPrinter
    +
    +
    +
    +
    public interface XmlPrettyPrinter
    +extends com.fasterxml.jackson.core.PrettyPrinter
    +
    There are some XML-specific quirks that need extra TLC when + indenting: so we will use a refinement of general purpose one.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from interface com.fasterxml.jackson.core.PrettyPrinter

        +DEFAULT_ROOT_VALUE_SEPARATOR, DEFAULT_SEPARATORS
      • +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      voidwriteEndElement(org.codehaus.stax2.XMLStreamWriter2 sw, + int nrOfEntries) +
      Method for forcibly writing an end element, without going + through Jackson generator (and thus, without updating currently + active element stack)
      +
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + BigDecimal value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + BigInteger value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + boolean value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + byte[] data, + int offset, + int len) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + char[] buffer, + int offset, + int len, + boolean isCData) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + double value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + float value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + int value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + long value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + String text, + boolean isCData) 
      voidwriteLeafNullElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName) 
      voidwritePrologLinefeed(org.codehaus.stax2.XMLStreamWriter2 sw) +
      Method for trying to write a linefeed to separate entities outside of the + root element (that is, in prolog or epilog), most often called to separate + XML declaration from the root element.
      +
      voidwriteStartElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName) +
      Method for forcibly writing a start element, without going + through Jackson generator (and thus, without updating currently + active element stack)
      +
      +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.core.PrettyPrinter

        +beforeArrayValues, beforeObjectEntries, writeArrayValueSeparator, writeEndArray, writeEndObject, writeObjectEntrySeparator, writeObjectFieldValueSeparator, writeRootValueSeparator, writeStartArray, writeStartObject
      • +
      +
    • +
    +
  • +
+
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html new file mode 100644 index 000000000..ea9b9bfb5 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html @@ -0,0 +1,361 @@ + + + + + + +XmlTypeResolverBuilder.XmlClassNameIdResolver (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder.XmlClassNameIdResolver

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    +
    +
    +
    Enclosing class:
    +
    XmlTypeResolverBuilder
    +
    +
    +
    +
    protected static class XmlTypeResolverBuilder.XmlClassNameIdResolver
    +extends com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_subTypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +_baseType, _typeFactory
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.type.TypeFactory typeFactory, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlClassNameIdResolver

        +
        public XmlClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
        +                              com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
        +                              com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        idFromValue

        +
        public String idFromValue(Object value)
        +
        +
        Specified by:
        +
        idFromValue in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        idFromValue in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        +
      • +
      + + + +
        +
      • +

        typeFromId

        +
        public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context,
        +                                                          String id)
        +                                                   throws IOException
        +
        +
        Specified by:
        +
        typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        typeFromId in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html new file mode 100644 index 000000000..90c40c585 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html @@ -0,0 +1,380 @@ + + + + + + +XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    +
    +
    +
    Enclosing class:
    +
    XmlTypeResolverBuilder
    +
    +
    +
    +
    protected static class XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
    +extends com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver

        +_basePackageName, _basePackagePrefix
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_subTypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +_baseType, _typeFactory
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlMinimalClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.type.TypeFactory typeFactory, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringidFromValue(Object value) 
      com.fasterxml.jackson.databind.JavaTypetypeFromId(com.fasterxml.jackson.databind.DatabindContext context, + String id) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver

        +_typeFromId, construct, getMechanism
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_idFrom, getDescForKnownTypeIds, idFromValueAndType, registerSubtype
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +idFromBaseType, init
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlMinimalClassNameIdResolver

        +
        public XmlMinimalClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
        +                                     com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
        +                                     com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        idFromValue

        +
        public String idFromValue(Object value)
        +
        +
        Specified by:
        +
        idFromValue in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        idFromValue in class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver
        +
        +
      • +
      + + + +
        +
      • +

        typeFromId

        +
        public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context,
        +                                                          String id)
        +                                                   throws IOException
        +
        +
        Specified by:
        +
        typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        typeFromId in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html new file mode 100644 index 000000000..3df51f4f0 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html @@ -0,0 +1,420 @@ + + + + + + +XmlTypeResolverBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
    +
    +
    +
    +
    public class XmlTypeResolverBuilder
    +extends com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
    +
    Custom specialization of StdTypeResolverBuilder; needed so that + type id property name can be modified as necessary to make it legal + XML element or attribute name.
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +_customIdResolver, _defaultImpl, _idType, _includeAs, _typeIdVisible, _typeProperty
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected static StringdecodeXmlClassName(String className) +
      Helper method for decoding "XML safe" Java class name back into + actual class name
      +
      protected static StringencodeXmlClassName(String className) +
      Helper method for encoding regular Java class name in form that + can be used as XML element name.
      +
      protected com.fasterxml.jackson.databind.jsontype.TypeIdResolveridResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, + com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, + Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, + boolean forSer, + boolean forDeser) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilderinit(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType, + com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuildertypeProperty(String typeIdPropName) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +buildTypeDeserializer, buildTypeSerializer, defaultImpl, defineDefaultImpl, getDefaultImpl, getTypeProperty, inclusion, isTypeIdVisible, noTypeInfoBuilder, reportInvalidBaseType, subTypeValidator, typeIdVisibility, verifyBaseTypeValidity
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTypeResolverBuilder

        +
        public XmlTypeResolverBuilder()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
        +                                                                                com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes)
        +
        +
        Specified by:
        +
        init in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        init in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        typeProperty

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder typeProperty(String typeIdPropName)
        +
        +
        Specified by:
        +
        typeProperty in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        typeProperty in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        idResolver

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config,
        +                                                                            com.fasterxml.jackson.databind.JavaType baseType,
        +                                                                            com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator,
        +                                                                            Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes,
        +                                                                            boolean forSer,
        +                                                                            boolean forDeser)
        +
        +
        Overrides:
        +
        idResolver in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        encodeXmlClassName

        +
        protected static String encodeXmlClassName(String className)
        +
        Helper method for encoding regular Java class name in form that + can be used as XML element name.
        +
      • +
      + + + +
        +
      • +

        decodeXmlClassName

        +
        protected static String decodeXmlClassName(String className)
        +
        Helper method for decoding "XML safe" Java class name back into + actual class name
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html new file mode 100644 index 000000000..645242956 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html @@ -0,0 +1,226 @@ + + + + + + +JacksonXmlCData (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlCData

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      booleanvalue +
      Whether the property text should always be within a CData block + when serialized.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        value

        +
        public abstract boolean value
        +
        Whether the property text should always be within a CData block + when serialized.
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html new file mode 100644 index 000000000..f3e8fcebe --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html @@ -0,0 +1,321 @@ + + + + + + +JacksonXmlElementWrapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlElementWrapper

+
+
+
+
    +
  • +
    +
    +
    @Target(value={FIELD,METHOD})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlElementWrapper
    +
    Annotation that is similar to JAXB javax.xml.bind.annotation.XmlElementWrapper, + to indicate wrapper element to use (if any) for Collection types (arrays, + java.util.Collection). If defined, a separate container (wrapper) element + is used; if not, entries are written without wrapping.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeFields and Description
      static StringUSE_PROPERTY_NAME +
      Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
      +
      +
    • +
    + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      StringlocalName 
      Stringnamespace 
      booleanuseWrapping +
      Optional property that can be used to explicitly disable wrapping, + usually via mix-ins, or when using AnnotationIntrospector + pairs.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        USE_PROPERTY_NAME

        +
        public static final String USE_PROPERTY_NAME
        +
        Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        useWrapping

        +
        public abstract boolean useWrapping
        +
        Optional property that can be used to explicitly disable wrapping, + usually via mix-ins, or when using AnnotationIntrospector + pairs.
        +
        +
        Since:
        +
        2.1
        +
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html new file mode 100644 index 000000000..4a1d7cf13 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html @@ -0,0 +1,263 @@ + + + + + + +JacksonXmlProperty (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlProperty

+
+
+
+
    +
  • +
    +
    +
    @Target(value={FIELD,METHOD,PARAMETER})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlProperty
    +
    Annotation that can be used to provide XML-specific configuration + for properties, above and beyond what + JsonProperty contains. + It is an alternative to using JAXB annotations.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        isAttribute

        +
        public abstract boolean isAttribute
        +
        +
        Default:
        +
        false
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html new file mode 100644 index 000000000..32874f929 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html @@ -0,0 +1,242 @@ + + + + + + +JacksonXmlRootElement (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlRootElement

+
+
+
+
    +
  • +
    +
    +
    @Target(value=TYPE)
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlRootElement
    +
    Annotation that can be used to define name of root element used + for the root-level object when serialized, which normally uses + name of the type (class). It is similar to JAXB XmlRootElement.
    +
  • +
+
+
+
    +
  • + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html new file mode 100644 index 000000000..4b5949535 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html @@ -0,0 +1,232 @@ + + + + + + +JacksonXmlText (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlText

+
+
+
+
    +
  • +
    +
    +
    @Target(value={FIELD,METHOD})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlText
    +
    Interface that is loosely similar to XmlValue + in that it can be used on one (and only one!) property of a POJO. + It will result in value of the property be serialized without element wrapper, + as long as there are no element-wrapped other properties (attribute-valued + properties are acceptable). + It is also similar to core Jackson JsonValue annotation; but + has to be separate as JsonValue does not allow any other + properties.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      booleanvalue +
      Whether serialization of the property should always be done as basic + XML text or not; if true, will be, if false, not.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        value

        +
        public abstract boolean value
        +
        Whether serialization of the property should always be done as basic + XML text or not; if true, will be, if false, not.
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html new file mode 100644 index 000000000..65fce041e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html new file mode 100644 index 000000000..1e21a84d6 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html new file mode 100644 index 000000000..22ebd33c3 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html new file mode 100644 index 000000000..5fa50c218 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html new file mode 100644 index 000000000..2704f072a --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html new file mode 100644 index 000000000..87b96322f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html @@ -0,0 +1,25 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.annotation

+
+

Annotation Types

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html new file mode 100644 index 000000000..b8a4c3e95 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html @@ -0,0 +1,191 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.annotation

+
+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+

See: Description

+
+
+ + + + +

Package com.fasterxml.jackson.dataformat.xml.annotation Description

+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html new file mode 100644 index 000000000..0d8348343 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.annotation

+Package Hierarchies: + +
+
+

Annotation Type Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html new file mode 100644 index 000000000..a8d15222a --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.annotation

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html new file mode 100644 index 000000000..76d579460 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder

+
+
No usage of com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html new file mode 100644 index 000000000..6d033d4ad --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector

+
+
No usage of com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html new file mode 100644 index 000000000..eacd0b3d3 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html @@ -0,0 +1,189 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.JacksonXmlModule

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html new file mode 100644 index 000000000..752ff29bb --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.PackageVersion (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.PackageVersion

+
+
No usage of com.fasterxml.jackson.dataformat.xml.PackageVersion
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html new file mode 100644 index 000000000..4362a8c5f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html new file mode 100644 index 000000000..165251efd --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html @@ -0,0 +1,171 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html new file mode 100644 index 000000000..70d724b08 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html @@ -0,0 +1,232 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html new file mode 100644 index 000000000..8b3ccdf5c --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html @@ -0,0 +1,255 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlFactory (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlFactory

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html new file mode 100644 index 000000000..bc056a073 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html @@ -0,0 +1,245 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html new file mode 100644 index 000000000..5c66b66c9 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html @@ -0,0 +1,212 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html new file mode 100644 index 000000000..9f167d477 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html @@ -0,0 +1,192 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlMapper (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlMapper

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html new file mode 100644 index 000000000..ce0fd6c20 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html @@ -0,0 +1,193 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html new file mode 100644 index 000000000..6f53f9a03 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html new file mode 100644 index 000000000..1d41b51ce --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html new file mode 100644 index 000000000..c28cbbd56 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html new file mode 100644 index 000000000..cddafcebd --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html @@ -0,0 +1,421 @@ + + + + + + +FromXmlParser.Feature (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Enum FromXmlParser.Feature

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        EMPTY_ELEMENT_AS_NULL

        +
        public static final FromXmlParser.Feature EMPTY_ELEMENT_AS_NULL
        +
        Feature that indicates whether XML Empty elements (ones where there are + no separate start and end tages, but just one tag that ends with "/>") + are exposed as JsonToken.VALUE_NULL) or not. If they are not + returned as `null` tokens, they will be returned as JsonToken.VALUE_STRING + tokens with textual value of "" (empty String). +

        + Default setting is `true` for backwards compatibility.

        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static FromXmlParser.Feature[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (FromXmlParser.Feature c : FromXmlParser.Feature.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static FromXmlParser.Feature valueOf(String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum type has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        collectDefaults

        +
        public static int collectDefaults()
        +
        Method that calculates bit set (flags) of all features that + are enabled by default.
        +
      • +
      + + + +
        +
      • +

        enabledByDefault

        +
        public boolean enabledByDefault()
        +
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      + + + +
        +
      • +

        getMask

        +
        public int getMask()
        +
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      + + + +
        +
      • +

        enabledIn

        +
        public boolean enabledIn(int flags)
        +
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html new file mode 100644 index 000000000..2c8a3bdb5 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html @@ -0,0 +1,1527 @@ + + + + + + +FromXmlParser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class FromXmlParser

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Closeable, AutoCloseable
    +
    +
    +
    +
    public class FromXmlParser
    +extends com.fasterxml.jackson.core.base.ParserMinimalBase
    +
    JsonParser implementation that exposes XML structure as + set of JSON events that can be used for data binding.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class FromXmlParser.Feature +
      Enumeration that defines all togglable features for XML parsers.
      +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser

        +com.fasterxml.jackson.core.JsonParser.NumberType
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected byte[]_binaryValue +
      We will hold on to decoded binary data, for duration of + current event, so that multiple calls to + getBinaryValue(com.fasterxml.jackson.core.Base64Variant) will not need to decode data more + than once.
      +
      protected com.fasterxml.jackson.core.util.ByteArrayBuilder_byteArrayBuilder +
      ByteArrayBuilder is needed if 'getBinaryValue' is called.
      +
      protected String_cfgNameForTextElement +
      In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
      +
      protected boolean_closed +
      Flag that indicates whether parser is closed or not.
      +
      protected String_currText 
      protected int_formatFeatures +
      Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
      +
      protected com.fasterxml.jackson.core.io.IOContext_ioContext 
      protected boolean_mayBeLeaf +
      We need special handling to keep track of whether a value + may be exposed as simple leaf value.
      +
      protected Set<String>_namesToWrap 
      protected com.fasterxml.jackson.core.JsonToken_nextToken 
      protected com.fasterxml.jackson.core.ObjectCodec_objectCodec 
      protected XmlReadContext_parsingContext +
      Information about parser context, context in which + the next token is to be parsed (root, array, object).
      +
      protected XmlTokenStream_xmlTokens 
      static StringDEFAULT_UNNAMED_TEXT_PROPERTY +
      The default name placeholder for XML text segments is empty + String ("").
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

        +_currToken, _lastClearedToken, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_TAB, MAX_ERROR_TOKEN_LENGTH, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MIN_INT_D, MIN_INT_L, MIN_LONG_D, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.JsonParser

        +_features, _requestPayload
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FromXmlParser(com.fasterxml.jackson.core.io.IOContext ctxt, + int genericParserFeatures, + int xmlFeatures, + com.fasterxml.jackson.core.ObjectCodec codec, + XMLStreamReader xmlReader) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected byte[]_decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant) 
      protected com.fasterxml.jackson.core.util.ByteArrayBuilder_getByteArrayBuilder() 
      protected void_handleEOF() +
      Method called when an EOF is encountered between tokens.
      +
      protected boolean_isEmpty(String str) 
      protected void_releaseBuffers() +
      Method called to release internal buffers owned by the base + parser.
      +
      voidaddVirtualWrapping(Set<String> namesToWrap) +
      Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements.
      +
      voidclose() 
      FromXmlParserconfigure(FromXmlParser.Feature f, + boolean state) 
      FromXmlParserdisable(FromXmlParser.Feature f) 
      FromXmlParserenable(FromXmlParser.Feature f) 
      BigIntegergetBigIntegerValue() 
      byte[]getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) 
      com.fasterxml.jackson.core.ObjectCodecgetCodec() 
      com.fasterxml.jackson.core.JsonLocationgetCurrentLocation() +
      Method that returns location of the last processed character; + usually for error reporting purposes
      +
      StringgetCurrentName() +
      Method that can be called to get the name associated with + the current event.
      +
      BigDecimalgetDecimalValue() 
      doublegetDoubleValue() 
      ObjectgetEmbeddedObject() 
      floatgetFloatValue() 
      intgetFormatFeatures() 
      intgetIntValue() 
      longgetLongValue() 
      com.fasterxml.jackson.core.JsonParser.NumberTypegetNumberType() 
      NumbergetNumberValue() 
      XmlReadContextgetParsingContext() 
      XMLStreamReadergetStaxReader() +
      Method that allows application direct access to underlying + Stax XMLStreamWriter.
      +
      StringgetText() 
      intgetText(Writer writer) 
      char[]getTextCharacters() 
      intgetTextLength() 
      intgetTextOffset() 
      com.fasterxml.jackson.core.JsonLocationgetTokenLocation() +
      Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
      +
      StringgetValueAsString() 
      StringgetValueAsString(String defValue) 
      booleanhasTextCharacters() +
      XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
      +
      booleanisClosed() 
      booleanisEnabled(FromXmlParser.Feature f) 
      booleanisExpectedStartArrayToken() +
      Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
      +
      StringnextTextValue() +
      Method overridden to support more reliable deserialization of + String collections.
      +
      com.fasterxml.jackson.core.JsonTokennextToken() 
      voidoverrideCurrentName(String name) 
      com.fasterxml.jackson.core.JsonParseroverrideFormatFeatures(int values, + int mask) 
      booleanrequiresCustomCodec() +
      XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
      +
      voidsetCodec(com.fasterxml.jackson.core.ObjectCodec c) 
      voidsetXMLTextElementName(String name) 
      com.fasterxml.jackson.core.Versionversion() 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

        +_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, hasCurrentToken, hasToken, hasTokenId, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.core.JsonParser

        +_codec, _constructError, _reportUnsupportedOperation, canParseAsync, canReadObjectId, canReadTypeId, canUseSchema, configure, currentName, disable, enable, finishToken, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getFeatureMask, getInputSource, getNonBlockingInputFeeder, getObjectId, getSchema, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, isNaN, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, overrideStdFeatures, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, setCurrentValue, setFeatureMask, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchema
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_UNNAMED_TEXT_PROPERTY

        +
        public static final String DEFAULT_UNNAMED_TEXT_PROPERTY
        +
        The default name placeholder for XML text segments is empty + String ("").
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
        In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name. +

        + Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use). Defaults to empty String, but + may be changed for interoperability reasons: JAXB, for example, uses + "value" as name.

        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _objectCodec

        +
        protected com.fasterxml.jackson.core.ObjectCodec _objectCodec
        +
      • +
      + + + +
        +
      • +

        _closed

        +
        protected boolean _closed
        +
        Flag that indicates whether parser is closed or not. Gets + set when parser is either closed by explicit call + (close()) or when end-of-input is reached.
        +
      • +
      + + + +
        +
      • +

        _ioContext

        +
        protected final com.fasterxml.jackson.core.io.IOContext _ioContext
        +
      • +
      + + + +
        +
      • +

        _parsingContext

        +
        protected XmlReadContext _parsingContext
        +
        Information about parser context, context in which + the next token is to be parsed (root, array, object).
        +
      • +
      + + + + + + + +
        +
      • +

        _mayBeLeaf

        +
        protected boolean _mayBeLeaf
        +
        We need special handling to keep track of whether a value + may be exposed as simple leaf value.
        +
      • +
      + + + +
        +
      • +

        _nextToken

        +
        protected com.fasterxml.jackson.core.JsonToken _nextToken
        +
      • +
      + + + +
        +
      • +

        _currText

        +
        protected String _currText
        +
      • +
      + + + +
        +
      • +

        _namesToWrap

        +
        protected Set<String> _namesToWrap
        +
      • +
      + + + +
        +
      • +

        _byteArrayBuilder

        +
        protected com.fasterxml.jackson.core.util.ByteArrayBuilder _byteArrayBuilder
        +
        ByteArrayBuilder is needed if 'getBinaryValue' is called. If so, + we better reuse it for remainder of content.
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FromXmlParser

        +
        public FromXmlParser(com.fasterxml.jackson.core.io.IOContext ctxt,
        +                     int genericParserFeatures,
        +                     int xmlFeatures,
        +                     com.fasterxml.jackson.core.ObjectCodec codec,
        +                     XMLStreamReader xmlReader)
        +              throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Specified by:
        +
        version in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getCodec

        +
        public com.fasterxml.jackson.core.ObjectCodec getCodec()
        +
        +
        Specified by:
        +
        getCodec in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        setCodec

        +
        public void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
        +
        +
        Specified by:
        +
        setCodec in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        requiresCustomCodec

        +
        public boolean requiresCustomCodec()
        +
        XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
        +
        +
        Overrides:
        +
        requiresCustomCodec in class com.fasterxml.jackson.core.JsonParser
        +
        Returns:
        +
        True since XML format does require support from codec
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        getFormatFeatures

        +
        public int getFormatFeatures()
        +
        +
        Overrides:
        +
        getFormatFeatures in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        overrideFormatFeatures

        +
        public com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values,
        +                                                                    int mask)
        +
        +
        Overrides:
        +
        overrideFormatFeatures in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getStaxReader

        +
        public XMLStreamReader getStaxReader()
        +
        Method that allows application direct access to underlying + Stax XMLStreamWriter. Note that use of writer is + discouraged, and may interfere with processing of this writer; + however, occasionally it may be necessary. +

        + Note: writer instance will always be of type + XMLStreamWriter2 (including + Typed Access API) so upcasts are safe.

        +
      • +
      + + + +
        +
      • +

        addVirtualWrapping

        +
        public void addVirtualWrapping(Set<String> namesToWrap)
        +
        Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements. This is needed for supporting + handling of so-called "unwrapped" array types, something + XML mappings like JAXB often use. +

        + NOTE: this method is considered part of internal implementation + interface, and it is NOT guaranteed to remain unchanged + between minor versions (it is however expected not to change in + patch versions). So if you have to use it, be prepared for + possible additional work.

        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        getCurrentName

        +
        public String getCurrentName()
        +                      throws IOException
        +
        Method that can be called to get the name associated with + the current event.
        +
        +
        Specified by:
        +
        getCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        overrideCurrentName

        +
        public void overrideCurrentName(String name)
        +
        +
        Specified by:
        +
        overrideCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + + + + + +
        +
      • +

        isClosed

        +
        public boolean isClosed()
        +
        +
        Specified by:
        +
        isClosed in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getParsingContext

        +
        public XmlReadContext getParsingContext()
        +
        +
        Specified by:
        +
        getParsingContext in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getTokenLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
        +
        Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
        +
        +
        Specified by:
        +
        getTokenLocation in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getCurrentLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
        +
        Method that returns location of the last processed character; + usually for error reporting purposes
        +
        +
        Specified by:
        +
        getCurrentLocation in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        isExpectedStartArrayToken

        +
        public boolean isExpectedStartArrayToken()
        +
        Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
        +
        +
        Overrides:
        +
        isExpectedStartArrayToken in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        nextToken

        +
        public com.fasterxml.jackson.core.JsonToken nextToken()
        +                                               throws IOException
        +
        +
        Specified by:
        +
        nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        nextTextValue

        +
        public String nextTextValue()
        +                     throws IOException
        +
        Method overridden to support more reliable deserialization of + String collections.
        +
        +
        Overrides:
        +
        nextTextValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public String getText()
        +               throws IOException
        +
        +
        Specified by:
        +
        getText in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getValueAsString

        +
        public final String getValueAsString()
        +                              throws IOException
        +
        +
        Overrides:
        +
        getValueAsString in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getValueAsString

        +
        public String getValueAsString(String defValue)
        +                        throws IOException
        +
        +
        Overrides:
        +
        getValueAsString in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextCharacters

        +
        public char[] getTextCharacters()
        +                         throws IOException
        +
        +
        Specified by:
        +
        getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextLength

        +
        public int getTextLength()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextOffset

        +
        public int getTextOffset()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        hasTextCharacters

        +
        public boolean hasTextCharacters()
        +
        XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
        +
        +
        Specified by:
        +
        hasTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public int getText(Writer writer)
        +            throws IOException
        +
        +
        Overrides:
        +
        getText in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getEmbeddedObject

        +
        public Object getEmbeddedObject()
        +                         throws IOException
        +
        +
        Overrides:
        +
        getEmbeddedObject in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getBinaryValue

        +
        public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
        +                      throws IOException
        +
        +
        Specified by:
        +
        getBinaryValue in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _decodeBase64

        +
        protected byte[] _decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
        +                        throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getBigIntegerValue

        +
        public BigInteger getBigIntegerValue()
        +                              throws IOException
        +
        +
        Specified by:
        +
        getBigIntegerValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getDecimalValue

        +
        public BigDecimal getDecimalValue()
        +                           throws IOException
        +
        +
        Specified by:
        +
        getDecimalValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getDoubleValue

        +
        public double getDoubleValue()
        +                      throws IOException
        +
        +
        Specified by:
        +
        getDoubleValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getFloatValue

        +
        public float getFloatValue()
        +                    throws IOException
        +
        +
        Specified by:
        +
        getFloatValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getIntValue

        +
        public int getIntValue()
        +                throws IOException
        +
        +
        Specified by:
        +
        getIntValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getLongValue

        +
        public long getLongValue()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getLongValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getNumberType

        +
        public com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
        +                                                               throws IOException
        +
        +
        Specified by:
        +
        getNumberType in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getNumberValue

        +
        public Number getNumberValue()
        +                      throws IOException
        +
        +
        Specified by:
        +
        getNumberValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _handleEOF

        +
        protected void _handleEOF()
        +                   throws com.fasterxml.jackson.core.JsonParseException
        +
        Method called when an EOF is encountered between tokens. + If so, it may be a legitimate EOF, but only iff there + is no open non-root context.
        +
        +
        Specified by:
        +
        _handleEOF in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        com.fasterxml.jackson.core.JsonParseException
        +
        +
      • +
      + + + +
        +
      • +

        _releaseBuffers

        +
        protected void _releaseBuffers()
        +                        throws IOException
        +
        Method called to release internal buffers owned by the base + parser.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _getByteArrayBuilder

        +
        protected com.fasterxml.jackson.core.util.ByteArrayBuilder _getByteArrayBuilder()
        +
      • +
      + + + +
        +
      • +

        _isEmpty

        +
        protected boolean _isEmpty(String str)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html new file mode 100644 index 000000000..f141b53ae --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html @@ -0,0 +1,547 @@ + + + + + + +WrapperHandlingDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class WrapperHandlingDeserializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ResolvableDeserializer, Serializable
    +
    +
    +
    +
    public class WrapperHandlingDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
    +
    Delegating deserializer whose only function is to handle case of + "unwrapped" List/array deserialization from XML.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected Set<String>_namesToWrap +
      (Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
      +
      protected com.fasterxml.jackson.databind.JavaType_type 
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +_delegatee
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected void_configureParser(com.fasterxml.jackson.core.JsonParser p) 
      protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase_verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser) 
      com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.BeanProperty property) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + Object intoValue) 
      ObjectdeserializeWithType(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) 
      protected com.fasterxml.jackson.databind.JsonDeserializer<?>newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, resolve, supportsUpdate
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserializeWithType, getEmptyAccessPattern, getEmptyValue, getNullValue, unwrappingDeserializer
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _namesToWrap

        +
        protected final Set<String> _namesToWrap
        +
        (Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
        +
      • +
      + + + +
        +
      • +

        _type

        +
        protected final com.fasterxml.jackson.databind.JavaType _type
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        WrapperHandlingDeserializer

        +
        public WrapperHandlingDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate)
        +
      • +
      + + + +
        +
      • +

        WrapperHandlingDeserializer

        +
        public WrapperHandlingDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                                   Set<String> namesToWrap)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newDelegatingInstance

        +
        protected com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0)
        +
        +
        Specified by:
        +
        newDelegatingInstance in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        +
      • +
      + + + +
        +
      • +

        createContextual

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                                                           com.fasterxml.jackson.databind.BeanProperty property)
        +                                                                    throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Specified by:
        +
        createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
        +
        Overrides:
        +
        createContextual in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                          Object intoValue)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeWithType

        +
        public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
        +                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
        +                           throws IOException
        +
        +
        Overrides:
        +
        deserializeWithType in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _configureParser

        +
        protected final void _configureParser(com.fasterxml.jackson.core.JsonParser p)
        +                               throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _verifyDeserType

        +
        protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase _verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html new file mode 100644 index 000000000..623dbee8e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html @@ -0,0 +1,364 @@ + + + + + + +XmlBeanDeserializerModifier (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlBeanDeserializerModifier

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlBeanDeserializerModifier
    +extends com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
    +implements Serializable
    +
    The main reason for a modifier is to support handling of + 'wrapped' Collection types.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected String_cfgNameForTextValue +
      Virtual name used for text segments.
      +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      com.fasterxml.jackson.databind.JsonDeserializer<?>modifyDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + com.fasterxml.jackson.databind.JsonDeserializer<?> deser0) 
      List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>updateProperties(com.fasterxml.jackson.databind.DeserializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> propDefs) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier

        +modifyArrayDeserializer, modifyCollectionDeserializer, modifyCollectionLikeDeserializer, modifyEnumDeserializer, modifyKeyDeserializer, modifyMapDeserializer, modifyMapLikeDeserializer, modifyReferenceDeserializer, updateBuilder
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _cfgNameForTextValue

        +
        protected String _cfgNameForTextValue
        +
        Virtual name used for text segments.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanDeserializerModifier

        +
        public XmlBeanDeserializerModifier(String nameForTextValue)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        updateProperties

        +
        public List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> updateProperties(com.fasterxml.jackson.databind.DeserializationConfig config,
        +                                                                                               com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                                               List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> propDefs)
        +
        +
        Overrides:
        +
        updateProperties in class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
        +
        +
      • +
      + + + +
        +
      • +

        modifyDeserializer

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> modifyDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config,
        +                                                                             com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                             com.fasterxml.jackson.databind.JsonDeserializer<?> deser0)
        +
        +
        Overrides:
        +
        modifyDeserializer in class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html new file mode 100644 index 000000000..c8eff452e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html @@ -0,0 +1,694 @@ + + + + + + +XmlReadContext (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlReadContext

+
+
+ +
+
    +
  • +
    +
    +
    public final class XmlReadContext
    +extends com.fasterxml.jackson.core.JsonStreamContext
    +
    Extension of JsonStreamContext, which implements + core methods needed, and adds small amount of additional + state data we need. +

    + Almost same as standard JsonReaderContext, but + custom version needed to be able to keep track of names + of properties that need wrapping; this is needed to + support wrapped/unwrapped Collection/array values.

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _lineNr

        +
        protected int _lineNr
        +
      • +
      + + + +
        +
      • +

        _columnNr

        +
        protected int _columnNr
        +
      • +
      + + + +
        +
      • +

        _currentName

        +
        protected String _currentName
        +
      • +
      + + + +
        +
      • +

        _currentValue

        +
        protected Object _currentValue
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        _namesToWrap

        +
        protected Set<String> _namesToWrap
        +
      • +
      + + + +
        +
      • +

        _wrappedName

        +
        protected String _wrappedName
        +
        Name of property that requires wrapping
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlReadContext

        +
        public XmlReadContext(XmlReadContext parent,
        +                      int type,
        +                      int lineNr,
        +                      int colNr)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        reset

        +
        protected final void reset(int type,
        +                           int lineNr,
        +                           int colNr)
        +
      • +
      + + + +
        +
      • +

        getCurrentValue

        +
        public Object getCurrentValue()
        +
        +
        Overrides:
        +
        getCurrentValue in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        setCurrentValue

        +
        public void setCurrentValue(Object v)
        +
        +
        Overrides:
        +
        setCurrentValue in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        createRootContext

        +
        public static XmlReadContext createRootContext(int lineNr,
        +                                               int colNr)
        +
      • +
      + + + +
        +
      • +

        createRootContext

        +
        public static XmlReadContext createRootContext()
        +
      • +
      + + + +
        +
      • +

        createChildArrayContext

        +
        public final XmlReadContext createChildArrayContext(int lineNr,
        +                                                    int colNr)
        +
      • +
      + + + +
        +
      • +

        createChildObjectContext

        +
        public final XmlReadContext createChildObjectContext(int lineNr,
        +                                                     int colNr)
        +
      • +
      + + + +
        +
      • +

        getCurrentName

        +
        public final String getCurrentName()
        +
        +
        Specified by:
        +
        getCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        hasCurrentName

        +
        public boolean hasCurrentName()
        +
        +
        Overrides:
        +
        hasCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        getParent

        +
        public final XmlReadContext getParent()
        +
        +
        Specified by:
        +
        getParent in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        expectComma

        +
        public final boolean expectComma()
        +
      • +
      + + + +
        +
      • +

        setCurrentName

        +
        public void setCurrentName(String name)
        +
      • +
      + + + +
        +
      • +

        getStartLocation

        +
        public final com.fasterxml.jackson.core.JsonLocation getStartLocation(Object srcRef)
        +
        +
        Overrides:
        +
        getStartLocation in class com.fasterxml.jackson.core.JsonStreamContext
        +
        Returns:
        +
        Location pointing to the point where the context + start marker was found
        +
        +
      • +
      + + + +
        +
      • +

        setNamesToWrap

        +
        public void setNamesToWrap(Set<String> namesToWrap)
        +
      • +
      + + + +
        +
      • +

        getNamesToWrap

        +
        public Set<String> getNamesToWrap()
        +
      • +
      + + + +
        +
      • +

        convertToArray

        +
        protected void convertToArray()
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public final String toString()
        +
        Overridden to provide developer readable "JsonPath" representation + of the context.
        +
        +
        Overrides:
        +
        toString in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.html new file mode 100644 index 000000000..ac1756368 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.html @@ -0,0 +1,423 @@ + + + + + + +XmlStringDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlStringDeserializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.NullValueProvider, Serializable
    +
    +
    +
    +
    public class XmlStringDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<String>
    +
    Custom variant used instead of "plain" StringDeserializer to handle + couple of edge cases that XML parser exposes. +

    + NOTE: mostly copy-pasted from standard StringDeserializer

    +
    +
    Since:
    +
    2.9.4
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      Stringdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      StringdeserializeWithType(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) 
      ObjectgetEmptyValue(com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      booleanisCachable() 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer

        +deserialize, getEmptyAccessPattern, getNullAccessPattern, supportsUpdate
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserializeWithType, findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, replaceDelegatee, unwrappingDeserializer
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlStringDeserializer

        +
        public XmlStringDeserializer()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isCachable

        +
        public boolean isCachable()
        +
        +
        Overrides:
        +
        isCachable in class com.fasterxml.jackson.databind.JsonDeserializer<String>
        +
        +
      • +
      + + + +
        +
      • +

        getEmptyValue

        +
        public Object getEmptyValue(com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                     throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Overrides:
        +
        getEmptyValue in class com.fasterxml.jackson.databind.JsonDeserializer<String>
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public String deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                   throws IOException
        +
        +
        Specified by:
        +
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<String>
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeWithType

        +
        public String deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
        +                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
        +                           throws IOException
        +
        +
        Overrides:
        +
        deserializeWithType in class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<String>
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html new file mode 100644 index 000000000..1a9932e89 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html @@ -0,0 +1,552 @@ + + + + + + +XmlTextDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlTextDeserializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ResolvableDeserializer, Serializable
    +
    +
    +
    +
    public class XmlTextDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
    +
    Delegating deserializer that is used in the special cases where + we may sometimes see a "plain" String value but need to map it + as if it was a property of POJO. The impedance is introduced by + heuristic conversion from XML events into rough JSON equivalents; + and this is one work-around that can only be done after the fact.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.databind.deser.ValueInstantiator_valueInstantiator 
      protected com.fasterxml.jackson.databind.deser.SettableBeanProperty_xmlTextProperty +
      Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
      +
      protected int_xmlTextPropertyIndex +
      Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +_delegatee
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate, + int textPropIndex) 
      XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate, + com.fasterxml.jackson.databind.deser.SettableBeanProperty prop) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase_verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser) 
      com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.BeanProperty property) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + Object bean) 
      ObjectdeserializeWithType(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) 
      protected com.fasterxml.jackson.databind.JsonDeserializer<?>newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, resolve, supportsUpdate
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserializeWithType, getEmptyAccessPattern, getEmptyValue, getNullValue, unwrappingDeserializer
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _xmlTextPropertyIndex

        +
        protected final int _xmlTextPropertyIndex
        +
        Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
        +
      • +
      + + + +
        +
      • +

        _xmlTextProperty

        +
        protected final com.fasterxml.jackson.databind.deser.SettableBeanProperty _xmlTextProperty
        +
        Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
        +
      • +
      + + + +
        +
      • +

        _valueInstantiator

        +
        protected final com.fasterxml.jackson.databind.deser.ValueInstantiator _valueInstantiator
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTextDeserializer

        +
        public XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                           com.fasterxml.jackson.databind.deser.SettableBeanProperty prop)
        +
      • +
      + + + +
        +
      • +

        XmlTextDeserializer

        +
        public XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                           int textPropIndex)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newDelegatingInstance

        +
        protected com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0)
        +
        +
        Specified by:
        +
        newDelegatingInstance in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        +
      • +
      + + + +
        +
      • +

        createContextual

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                                                           com.fasterxml.jackson.databind.BeanProperty property)
        +                                                                    throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Specified by:
        +
        createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
        +
        Overrides:
        +
        createContextual in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                          Object bean)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeWithType

        +
        public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
        +                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
        +                           throws IOException
        +
        +
        Overrides:
        +
        deserializeWithType in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _verifyDeserType

        +
        protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase _verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html new file mode 100644 index 000000000..ca9ab655c --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html @@ -0,0 +1,949 @@ + + + + + + +XmlTokenStream (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlTokenStream

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlTokenStream
    +extends Object
    +
    Simple helper class used on top of STAX XMLStreamReader to further + abstract out all irrelevant details, and to expose equivalent of flat token + stream with no "fluff" tokens (comments, processing instructions, mixed + content) all of which is just to simplify + actual higher-level conversion to JSON tokens. +

    + Beyond initial idea there are also couple of other detours like ability + to "replay" some tokens, add virtual wrappers (ironically to support "unwrapped" + array values), and to unroll "Objects" into String values in some cases.

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        XML_START_ELEMENT

        +
        public static final int XML_START_ELEMENT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + +
        +
      • +

        XML_ATTRIBUTE_NAME

        +
        public static final int XML_ATTRIBUTE_NAME
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        XML_ATTRIBUTE_VALUE

        +
        public static final int XML_ATTRIBUTE_VALUE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _xmlReader

        +
        protected final org.codehaus.stax2.XMLStreamReader2 _xmlReader
        +
      • +
      + + + +
        +
      • +

        _sourceReference

        +
        protected final Object _sourceReference
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _currentState

        +
        protected int _currentState
        +
      • +
      + + + +
        +
      • +

        _attributeCount

        +
        protected int _attributeCount
        +
      • +
      + + + +
        +
      • +

        _xsiNilFound

        +
        protected boolean _xsiNilFound
        +
        Marker used to indicate presence of `xsi:nil="true"' in current START_ELEMENT.
        +
        +
        Since:
        +
        2.10
        +
        +
      • +
      + + + +
        +
      • +

        _mixedText

        +
        protected boolean _mixedText
        +
        If true we have a START_ELEMENT with mixed text
        +
        +
        Since:
        +
        2.8
        +
        +
      • +
      + + + +
        +
      • +

        _nextAttributeIndex

        +
        protected int _nextAttributeIndex
        +
        Index of the next attribute of the current START_ELEMENT + to return (as field name and value pair), if any; -1 + when no attributes to return
        +
      • +
      + + + +
        +
      • +

        _localName

        +
        protected String _localName
        +
      • +
      + + + +
        +
      • +

        _namespaceURI

        +
        protected String _namespaceURI
        +
      • +
      + + + +
        +
      • +

        _textValue

        +
        protected String _textValue
        +
      • +
      + + + +
        +
      • +

        _repeatElement

        +
        protected int _repeatElement
        +
        Flag used to indicate that given element should be "replayed".
        +
      • +
      + + + +
        +
      • +

        _currentWrapper

        +
        protected com.fasterxml.jackson.dataformat.xml.deser.ElementWrapper _currentWrapper
        +
        Wrapping state, if any active (null if none)
        +
      • +
      + + + +
        +
      • +

        _nextLocalName

        +
        protected String _nextLocalName
        +
        In cases where we need to 'inject' a virtual END_ELEMENT, we may also + need to restore START_ELEMENT afterwards; if so, this is where names + are held.
        +
      • +
      + + + +
        +
      • +

        _nextNamespaceURI

        +
        protected String _nextNamespaceURI
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTokenStream

        +
        public XmlTokenStream(XMLStreamReader xmlReader,
        +                      Object sourceRef,
        +                      int formatFeatures)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getXmlReader

        +
        public org.codehaus.stax2.XMLStreamReader2 getXmlReader()
        +
      • +
      + + + +
        +
      • +

        setFormatFeatures

        +
        protected void setFormatFeatures(int f)
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getCurrentToken

        +
        public int getCurrentToken()
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public String getText()
        +
      • +
      + + + +
        +
      • +

        getLocalName

        +
        public String getLocalName()
        +
      • +
      + + + +
        +
      • +

        getNamespaceURI

        +
        public String getNamespaceURI()
        +
      • +
      + + + +
        +
      • +

        hasXsiNil

        +
        public boolean hasXsiNil()
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getCurrentLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
        +
      • +
      + + + +
        +
      • +

        getTokenLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
        +
      • +
      + + + +
        +
      • +

        repeatStartElement

        +
        protected void repeatStartElement()
        +
        Method used to add virtual wrapping, which just duplicates START_ELEMENT + stream points to, and its matching closing element.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        skipAttributes

        +
        protected void skipAttributes()
        +
        Method called to skip any attributes current START_ELEMENT may have, + so that they are not returned as token.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        convertToString

        +
        protected String convertToString()
        +                          throws XMLStreamException
        +
        Helper method called by XML String deserializer to concatenate textual contents + contained in logical "Object": mostly just to skip attribute values.
        +
        +
        Throws:
        +
        XMLStreamException
        +
        +
      • +
      + + + +
        +
      • +

        _handleRepeatElement

        +
        protected int _handleRepeatElement()
        +                            throws XMLStreamException
        +
        Method called to handle details of repeating "virtual" + start/end elements, needed for handling 'unwrapped' lists.
        +
        +
        Throws:
        +
        XMLStreamException
        +
        +
      • +
      + + + +
        +
      • +

        _allWs

        +
        protected boolean _allWs(String str)
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html new file mode 100644 index 000000000..a7b338fdc --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html @@ -0,0 +1,320 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html new file mode 100644 index 000000000..f0861f32d --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html @@ -0,0 +1,229 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html new file mode 100644 index 000000000..ea7bd6080 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html new file mode 100644 index 000000000..9be6da92b --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html new file mode 100644 index 000000000..379a7b6f3 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html @@ -0,0 +1,227 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlStringDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlStringDeserializer.html new file mode 100644 index 000000000..ade17937f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlStringDeserializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html new file mode 100644 index 000000000..b1e020ced --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html new file mode 100644 index 000000000..198b5573d --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html @@ -0,0 +1,166 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html new file mode 100644 index 000000000..d96be294a --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html @@ -0,0 +1,31 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.deser

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html new file mode 100644 index 000000000..11c133344 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html @@ -0,0 +1,211 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.deser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html new file mode 100644 index 000000000..de8378130 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html @@ -0,0 +1,189 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.deser

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-use.html new file mode 100644 index 000000000..086dc2de0 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/deser/package-use.html @@ -0,0 +1,214 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.deser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html new file mode 100644 index 000000000..b30997705 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html @@ -0,0 +1,479 @@ + + + + + + +XmlJaxbAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.jaxb
+

Class XmlJaxbAnnotationIntrospector

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector, Serializable
    +
    +
    +
    +
    public class XmlJaxbAnnotationIntrospector
    +extends com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
    +implements XmlAnnotationIntrospector
    +
    Alternative AnnotationIntrospector + implementation that + builds on JaxbAnnotationIntrospector. +

    + NOTE: since version 2.4, it may NOT be necessary to use this class; + instead, plain JaxbAnnotationIntrospector should fully work. + With previous versions some aspects were not fully working and this + class was necessary.

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector

        +_dataHandlerDeserializer, _dataHandlerSerializer, _ignoreXmlIDREF, _jaxbPackageName, _nonNillableInclusion, _typeFactory, _xmlValueName, DEFAULT_IGNORE_XMLIDREF, DEFAULT_NAME_FOR_XML_VALUE, FORMAT_INT, FORMAT_STRING, MARKER_FOR_DEFAULT
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector

        +_converter, _doFindDeserializationType, _findContentAdapter, _fullDeserializationType, _fullSerializationType, _getTypeFromXmlElement, _propertyNameToString, _rawDeserializationType, _rawSerializationType, _typeResolverFromXmlElements, findAccessType, findAutoDetectVisibility, findContentDeserializer, findContentSerializer, findDeserializationContentConverter, findDeserializationConverter, findDeserializer, findEnumValues, findFormat, findImplicitPropertyName, findKeyDeserializer, findNameForDeserialization, findNameForSerialization, findObjectIdInfo, findObjectReferenceInfo, findPropertyContentTypeResolver, findPropertyInclusion, findPropertyTypeResolver, findRootName, findSerializationContentConverter, findSerializationConverter, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializer, findSubtypes, findTypeName, findTypeResolver, findWrapperName, getNameUsedForXmlValue, getNonNillableInclusion, getTypeFactory, hasAsValueAnnotation, hasIgnoreMarker, hasRequiredMarker, isIgnorableType, isJAXBAnnotation, refineDeserializationType, refineSerializationType, setNameUsedForXmlValue, setNonNillableInclusion, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findAndAddVirtualProperties, findClassDescription, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentType, findDeserializationKeyType, findDeserializationType, findEnumAliases, findEnumValue, findFilterId, findIgnoreUnknownProperties, findInjectableValue, findInjectableValueId, findKeySerializer, findMergeInfo, findNamingStrategy, findNullSerializer, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findPropertiesToIgnore, findPropertyAccess, findPropertyAliases, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnorals, findPropertyIndex, findReferenceType, findRenameByField, findSerializationContentType, findSerializationInclusion, findSerializationInclusionForContent, findSerializationKeyType, findSerializationTyping, findSetterInfo, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsValue, hasCreatorAnnotation, isAnnotationBundle, isTypeId, nopInstance, pair, resolveSetterConflict
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlJaxbAnnotationIntrospector

        +
        @Deprecated
        +public XmlJaxbAnnotationIntrospector()
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        XmlJaxbAnnotationIntrospector

        +
        public XmlJaxbAnnotationIntrospector(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        findNamespace in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        isOutputAsAttribute in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        isOutputAsText in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html new file mode 100644 index 000000000..1ef7af5e9 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector

+
+
No usage of com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html new file mode 100644 index 000000000..49db283a7 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.jaxb

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html new file mode 100644 index 000000000..cd63f5601 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html @@ -0,0 +1,148 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.jaxb

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html new file mode 100644 index 000000000..309006237 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html @@ -0,0 +1,147 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.jaxb

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html new file mode 100644 index 000000000..cb4b3bb96 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.jaxb

+
+
No usage of com.fasterxml.jackson.dataformat.xml.jaxb
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-frame.html new file mode 100644 index 000000000..8306d0c48 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-frame.html @@ -0,0 +1,38 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-summary.html new file mode 100644 index 000000000..12b2b75f9 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-summary.html @@ -0,0 +1,268 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml

+
+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+

See: Description

+
+
+ + + + +

Package com.fasterxml.jackson.dataformat.xml Description

+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-tree.html new file mode 100644 index 000000000..13332e569 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-tree.html @@ -0,0 +1,228 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-use.html new file mode 100644 index 000000000..f06000454 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/package-use.html @@ -0,0 +1,269 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html new file mode 100644 index 000000000..37eca0b50 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html @@ -0,0 +1,465 @@ + + + + + + +ToXmlGenerator.Feature (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Enum ToXmlGenerator.Feature

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        WRITE_XML_DECLARATION

        +
        public static final ToXmlGenerator.Feature WRITE_XML_DECLARATION
        +
        Feature that controls whether XML declaration should be written before + when generator is initialized (true) or not (false)
        +
      • +
      + + + +
        +
      • +

        WRITE_XML_1_1

        +
        public static final ToXmlGenerator.Feature WRITE_XML_1_1
        +
        Feature that controls whether output should be done as XML 1.1; if so, + certain aspects may differ from default (1.0) processing: for example, + XML declaration will be automatically added (regardless of setting + WRITE_XML_DECLARATION) as this is required for reader to + know to use 1.1 compliant handling. XML 1.1 can be used to allow quoted + control characters (Ascii codes 0 through 31) as well as additional linefeeds + and name characters.
        +
      • +
      + + + +
        +
      • +

        WRITE_NULLS_AS_XSI_NIL

        +
        public static final ToXmlGenerator.Feature WRITE_NULLS_AS_XSI_NIL
        +
        Feature that controls whether serialization of Java null values adds + XML attribute of `xsi:nil`, as defined by XML Schema (see + this article + for details) or not. + If enabled, `xsi:nil` attribute will be added to the empty element; if disabled, + it will not. +

        + Feature is disabled by default for backwards compatibility.

        +
        +
        Since:
        +
        2.10
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static ToXmlGenerator.Feature[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (ToXmlGenerator.Feature c : ToXmlGenerator.Feature.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static ToXmlGenerator.Feature valueOf(String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum type has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        collectDefaults

        +
        public static int collectDefaults()
        +
        Method that calculates bit set (flags) of all features that + are enabled by default.
        +
      • +
      + + + +
        +
      • +

        enabledByDefault

        +
        public boolean enabledByDefault()
        +
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      + + + +
        +
      • +

        getMask

        +
        public int getMask()
        +
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      + + + +
        +
      • +

        enabledIn

        +
        public boolean enabledIn(int flags)
        +
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.FormatFeature
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html new file mode 100644 index 000000000..20ba12d61 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html @@ -0,0 +1,1811 @@ + + + + + + +ToXmlGenerator (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class ToXmlGenerator

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Closeable, Flushable, AutoCloseable
    +
    +
    +
    +
    public final class ToXmlGenerator
    +extends com.fasterxml.jackson.core.base.GeneratorBase
    +
    JsonGenerator that outputs JAXB-style XML output instead of JSON content. + Operation requires calling code (usually either standard Jackson serializers, + or in some cases (like BeanSerializer) customised ones) to do + additional configuration calls beyond regular JsonGenerator API, + mostly to pass namespace information.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_UNKNOWN_ELEMENT

        +
        protected static final String DEFAULT_UNKNOWN_ELEMENT
        +
        If we support optional definition of element names, this is the element + name to use...
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        _xmlWriter

        +
        protected final org.codehaus.stax2.XMLStreamWriter2 _xmlWriter
        +
      • +
      + + + +
        +
      • +

        _originalXmlWriter

        +
        protected final XMLStreamWriter _originalXmlWriter
        +
      • +
      + + + +
        +
      • +

        _stax2Emulation

        +
        protected final boolean _stax2Emulation
        +
        Marker flag set if the underlying stream writer has to emulate + Stax2 API: this is problematic if trying to use writeRaw(java.lang.String) calls.
        +
      • +
      + + + +
        +
      • +

        _ioContext

        +
        protected final com.fasterxml.jackson.core.io.IOContext _ioContext
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + ToXmlGenerator.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _xmlPrettyPrinter

        +
        protected XmlPrettyPrinter _xmlPrettyPrinter
        +
        We may need to use XML-specific indentation as well
        +
      • +
      + + + +
        +
      • +

        _initialized

        +
        protected boolean _initialized
        +
        Marker set when initGenerator() has been called or not.
        +
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        _nextName

        +
        protected QName _nextName
        +
        Element or attribute name to use for next output call. + Assigned by either code that initiates serialization + or bean serializer.
        +
      • +
      + + + +
        +
      • +

        _nextIsAttribute

        +
        protected boolean _nextIsAttribute
        +
        Marker flag that indicates whether next name to write + implies an attribute (true) or element (false)
        +
      • +
      + + + +
        +
      • +

        _nextIsUnwrapped

        +
        protected boolean _nextIsUnwrapped
        +
        Marker flag used to indicate that the next write of a (property) + value should be done without using surrounding start/end + elements. Flag is to be cleared once unwrapping has been triggered + once.
        +
      • +
      + + + +
        +
      • +

        _nextIsCData

        +
        protected boolean _nextIsCData
        +
        Marker flag used to indicate that the next write of a (property) + value should be as CData
        +
      • +
      + + + +
        +
      • +

        _elementNameStack

        +
        protected LinkedList<QName> _elementNameStack
        +
        To support proper serialization of arrays it is necessary to keep + stack of element names, so that we can "revert" to earlier
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ToXmlGenerator

        +
        public ToXmlGenerator(com.fasterxml.jackson.core.io.IOContext ctxt,
        +                      int stdFeatures,
        +                      int xmlFeatures,
        +                      com.fasterxml.jackson.core.ObjectCodec codec,
        +                      XMLStreamWriter sw)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        initGenerator

        +
        public void initGenerator()
        +                   throws IOException
        +
        Method called before writing any other output, to optionally + output XML declaration.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _constructDefaultPrettyPrinter

        +
        protected com.fasterxml.jackson.core.PrettyPrinter _constructDefaultPrettyPrinter()
        +
        +
        Overrides:
        +
        _constructDefaultPrettyPrinter in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        +
      • +
      + + + +
        +
      • +

        setPrettyPrinter

        +
        public com.fasterxml.jackson.core.JsonGenerator setPrettyPrinter(com.fasterxml.jackson.core.PrettyPrinter pp)
        +
        +
        Overrides:
        +
        setPrettyPrinter in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getOutputTarget

        +
        public Object getOutputTarget()
        +
        +
        Overrides:
        +
        getOutputTarget in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getOutputBuffered

        +
        public int getOutputBuffered()
        +
        Stax2 does not expose buffered content amount, so we can only return + -1 from here
        +
        +
        Overrides:
        +
        getOutputBuffered in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getFormatFeatures

        +
        public int getFormatFeatures()
        +
        +
        Overrides:
        +
        getFormatFeatures in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        overrideFormatFeatures

        +
        public com.fasterxml.jackson.core.JsonGenerator overrideFormatFeatures(int values,
        +                                                                       int mask)
        +
        +
        Overrides:
        +
        overrideFormatFeatures in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        canWriteFormattedNumbers

        +
        public boolean canWriteFormattedNumbers()
        +
        +
        Overrides:
        +
        canWriteFormattedNumbers in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        inRoot

        +
        public boolean inRoot()
        +
      • +
      + + + +
        +
      • +

        getStaxWriter

        +
        public XMLStreamWriter getStaxWriter()
        +
        Method that allows application direct access to underlying + Stax XMLStreamWriter. Note that use of writer is + discouraged, and may interfere with processing of this writer; + however, occasionally it may be necessary. +

        + Note: writer instance will always be of type + XMLStreamWriter2 (including + Typed Access API) so upcasts are safe.

        +
      • +
      + + + +
        +
      • +

        setNextIsAttribute

        +
        public void setNextIsAttribute(boolean isAttribute)
        +
      • +
      + + + +
        +
      • +

        setNextIsUnwrapped

        +
        public void setNextIsUnwrapped(boolean isUnwrapped)
        +
      • +
      + + + +
        +
      • +

        setNextIsCData

        +
        public void setNextIsCData(boolean isCData)
        +
      • +
      + + + +
        +
      • +

        setNextName

        +
        public final void setNextName(QName name)
        +
      • +
      + + + + + + + +
        +
      • +

        startWrappedValue

        +
        public void startWrappedValue(QName wrapperName,
        +                              QName wrappedName)
        +                       throws IOException
        +
        Methdod called when a structured (collection, array, map) is being + output.
        +
        +
        Parameters:
        +
        wrapperName - Element used as wrapper around elements, if any (null if none)
        +
        wrappedName - Element used around individual content items (can not + be null)
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        finishWrappedValue

        +
        public void finishWrappedValue(QName wrapperName,
        +                               QName wrappedName)
        +                        throws IOException
        +
        Method called after a structured collection output has completed
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRepeatedFieldName

        +
        public void writeRepeatedFieldName()
        +                            throws IOException
        +
        Trivial helper method called when to add a replicated wrapper name
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        writeFieldName

        +
        public final void writeFieldName(String name)
        +                          throws IOException
        +
        +
        Specified by:
        +
        writeFieldName in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStringField

        +
        public final void writeStringField(String fieldName,
        +                                   String value)
        +                            throws IOException
        +
        +
        Overrides:
        +
        writeStringField in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStartArray

        +
        public final void writeStartArray()
        +                           throws IOException
        +
        +
        Specified by:
        +
        writeStartArray in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeEndArray

        +
        public final void writeEndArray()
        +                         throws IOException
        +
        +
        Specified by:
        +
        writeEndArray in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStartObject

        +
        public final void writeStartObject()
        +                            throws IOException
        +
        +
        Specified by:
        +
        writeStartObject in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeEndObject

        +
        public final void writeEndObject()
        +                          throws IOException
        +
        +
        Specified by:
        +
        writeEndObject in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _handleStartObject

        +
        public final void _handleStartObject()
        +                              throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _handleEndObject

        +
        public final void _handleEndObject()
        +                            throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeFieldName

        +
        public void writeFieldName(com.fasterxml.jackson.core.SerializableString name)
        +                    throws IOException
        +
        +
        Overrides:
        +
        writeFieldName in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(String text)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeString in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(char[] text,
        +                        int offset,
        +                        int len)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeString in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(com.fasterxml.jackson.core.SerializableString text)
        +                 throws IOException
        +
        +
        Overrides:
        +
        writeString in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawUTF8String

        +
        public void writeRawUTF8String(byte[] text,
        +                               int offset,
        +                               int length)
        +                        throws IOException
        +
        +
        Specified by:
        +
        writeRawUTF8String in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeUTF8String

        +
        public void writeUTF8String(byte[] text,
        +                            int offset,
        +                            int length)
        +                     throws IOException
        +
        +
        Specified by:
        +
        writeUTF8String in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(String text)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(String text,
        +                          int offset,
        +                          int len)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(char[] text,
        +                          int offset,
        +                          int len)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(com.fasterxml.jackson.core.SerializableString text)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(String text)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(String text,
        +                     int offset,
        +                     int len)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(char[] text,
        +                     int offset,
        +                     int len)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(char c)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBinary

        +
        public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
        +                        byte[] data,
        +                        int offset,
        +                        int len)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeBinary in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBinary

        +
        public int writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
        +                       InputStream data,
        +                       int dataLength)
        +                throws IOException
        +
        +
        Overrides:
        +
        writeBinary in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBoolean

        +
        public void writeBoolean(boolean value)
        +                  throws IOException
        +
        +
        Specified by:
        +
        writeBoolean in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNull

        +
        public void writeNull()
        +               throws IOException
        +
        +
        Specified by:
        +
        writeNull in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(int i)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(long l)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(double d)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(float f)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(BigDecimal dec)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(BigInteger value)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        _verifyValueWrite

        +
        protected final void _verifyValueWrite(String typeMsg)
        +                                throws IOException
        +
        +
        Specified by:
        +
        _verifyValueWrite in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        flush

        +
        public void flush()
        +           throws IOException
        +
        +
        Specified by:
        +
        flush in interface Flushable
        +
        Specified by:
        +
        flush in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        _releaseBuffers

        +
        protected void _releaseBuffers()
        +
        +
        Specified by:
        +
        _releaseBuffers in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        +
      • +
      + + + +
        +
      • +

        checkNextIsUnwrapped

        +
        protected boolean checkNextIsUnwrapped()
        +
        Method called to see if unwrapping is required; and if so, + clear the flag (so further calls will return 'false' unless + state is re-set)
        +
      • +
      + + + +
        +
      • +

        handleMissingName

        +
        protected void handleMissingName()
        +
      • +
      + + + +
        +
      • +

        _reportUnimplementedStax2

        +
        protected void _reportUnimplementedStax2(String missingMethod)
        +                                  throws IOException
        +
        Method called in case access to native Stax2 API implementation is required.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html new file mode 100644 index 000000000..8b945bacb --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html @@ -0,0 +1,615 @@ + + + + + + +UnwrappingXmlBeanSerializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class UnwrappingXmlBeanSerializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    +
    public class UnwrappingXmlBeanSerializer
    +extends XmlBeanSerializerBase
    +
    Copy of UnwrappingBeanSerializer required to extend + XmlBeanSerializerBase for XML-specific handling.
    +
    +
    Author:
    +
    Pascal Gélinas
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.databind.util.NameTransformer_nameTransformer +
      Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
      +
      + +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBaseasArraySerializer() +
      JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
      +
      booleanisUnwrappingSerializer() 
      voidserialize(Object bean, + com.fasterxml.jackson.core.JsonGenerator jgen, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
      +
      StringtoString() 
      com.fasterxml.jackson.databind.JsonSerializer<Object>unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer transformer) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithFilterId(Object filterId) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithIgnorals(Set<String> toIgnore) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter) 
      + +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, createContextual, findConvertingSerializer, getSchema, properties, resolve, usesObjectId, withIgnorals
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, replaceDelegatee
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _nameTransformer

        +
        protected final com.fasterxml.jackson.databind.util.NameTransformer _nameTransformer
        +
        Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src,
        +                                   com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
        Constructor used for creating unwrapping instance of a standard + BeanSerializer
        +
      • +
      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src,
        +                                   com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src,
        +                                   com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                                   Object filterId)
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        unwrappingSerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<Object> unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
        +
        Overrides:
        +
        unwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        isUnwrappingSerializer

        +
        public boolean isUnwrappingSerializer()
        +
        +
        Overrides:
        +
        isUnwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        withObjectIdWriter

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
        +
        Specified by:
        +
        withObjectIdWriter in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withFilterId

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withFilterId(Object filterId)
        +
        +
        Overrides:
        +
        withFilterId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withIgnorals

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withIgnorals(Set<String> toIgnore)
        +
        +
        Specified by:
        +
        withIgnorals in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        asArraySerializer

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase asArraySerializer()
        +
        JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
        +
        +
        Specified by:
        +
        asArraySerializer in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public final void serialize(Object bean,
        +                            com.fasterxml.jackson.core.JsonGenerator jgen,
        +                            com.fasterxml.jackson.databind.SerializerProvider provider)
        +                     throws IOException,
        +                            com.fasterxml.jackson.core.JsonGenerationException
        +
        Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
        +
        +
        Specified by:
        +
        serialize in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        com.fasterxml.jackson.core.JsonGenerationException
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html new file mode 100644 index 000000000..f5f47570d --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html @@ -0,0 +1,448 @@ + + + + + + +XmlBeanPropertyWriter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanPropertyWriter

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.BeanProperty, com.fasterxml.jackson.databind.util.Named, Serializable
    +
    +
    +
    +
    public class XmlBeanPropertyWriter
    +extends com.fasterxml.jackson.databind.ser.BeanPropertyWriter
    +
    Property writer sub-class used for handling element wrapping needed for serializing + collection (array, Collection; possibly Map) types.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty

        +com.fasterxml.jackson.databind.BeanProperty.Bogus, com.fasterxml.jackson.databind.BeanProperty.Std
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected QName_wrappedQName +
      Element name used for items in the collection
      +
      protected QName_wrapperQName +
      Element name used as wrapper for collection.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter

        +_accessorMethod, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _field, _includeInViews, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        +_aliases, _metadata
      • +
      +
        +
      • + + +

        Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty

        +EMPTY_FORMAT, EMPTY_INCLUDE
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped, + com.fasterxml.jackson.databind.PropertyName wrapperName, + com.fasterxml.jackson.databind.PropertyName wrappedName) 
      XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped, + com.fasterxml.jackson.databind.PropertyName wrapperName, + com.fasterxml.jackson.databind.PropertyName wrappedName, + com.fasterxml.jackson.databind.JsonSerializer<Object> serializer) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidserializeAsField(Object bean, + com.fasterxml.jackson.core.JsonGenerator jgen, + com.fasterxml.jackson.databind.SerializerProvider prov) +
      Overridden version so that we can wrap output within wrapper element if + and as necessary.
      +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter

        +_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, depositSchemaProperty, fixAccess, get, getAnnotation, getContextAnnotation, getFullName, getGenericPropertyType, getInternalSetting, getMember, getName, getPropertyType, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, removeInternalSetting, rename, serializeAsElement, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.PropertyWriter

        +findAnnotation
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        +findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _wrapperQName

        +
        protected final QName _wrapperQName
        +
        Element name used as wrapper for collection.
        +
      • +
      + + + +
        +
      • +

        _wrappedQName

        +
        protected final QName _wrappedQName
        +
        Element name used for items in the collection
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanPropertyWriter

        +
        public XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped,
        +                             com.fasterxml.jackson.databind.PropertyName wrapperName,
        +                             com.fasterxml.jackson.databind.PropertyName wrappedName)
        +
      • +
      + + + +
        +
      • +

        XmlBeanPropertyWriter

        +
        public XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped,
        +                             com.fasterxml.jackson.databind.PropertyName wrapperName,
        +                             com.fasterxml.jackson.databind.PropertyName wrappedName,
        +                             com.fasterxml.jackson.databind.JsonSerializer<Object> serializer)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        serializeAsField

        +
        public void serializeAsField(Object bean,
        +                             com.fasterxml.jackson.core.JsonGenerator jgen,
        +                             com.fasterxml.jackson.databind.SerializerProvider prov)
        +                      throws Exception
        +
        Overridden version so that we can wrap output within wrapper element if + and as necessary.
        +
        +
        Overrides:
        +
        serializeAsField in class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
        +
        Throws:
        +
        Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html new file mode 100644 index 000000000..a4603a377 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html @@ -0,0 +1,554 @@ + + + + + + +XmlBeanSerializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    +
    public class XmlBeanSerializer
    +extends XmlBeanSerializerBase
    +
    Variant of BeanSerializer for XML handling.
    +
    +
    Author:
    +
    Pascal Gélinas
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBaseasArraySerializer() +
      Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
      +
      voidserialize(Object bean, + com.fasterxml.jackson.core.JsonGenerator g, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
      +
      StringtoString() 
      com.fasterxml.jackson.databind.JsonSerializer<Object>unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer unwrapper) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithFilterId(Object filterId) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithIgnorals(Set<String> toIgnore) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter) 
      + +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, createContextual, findConvertingSerializer, getSchema, properties, resolve, usesObjectId, withIgnorals
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, replaceDelegatee
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(com.fasterxml.jackson.databind.ser.std.BeanSerializerBase src)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(XmlBeanSerializerBase src,
        +                         com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                         Object filterId)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(XmlBeanSerializerBase src,
        +                         com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        unwrappingSerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<Object> unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer unwrapper)
        +
        +
        Overrides:
        +
        unwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        withObjectIdWriter

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
        +
        Specified by:
        +
        withObjectIdWriter in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withFilterId

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withFilterId(Object filterId)
        +
        +
        Overrides:
        +
        withFilterId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withIgnorals

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withIgnorals(Set<String> toIgnore)
        +
        +
        Specified by:
        +
        withIgnorals in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        asArraySerializer

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase asArraySerializer()
        +
        Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
        +
        +
        Specified by:
        +
        asArraySerializer in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public void serialize(Object bean,
        +                      com.fasterxml.jackson.core.JsonGenerator g,
        +                      com.fasterxml.jackson.databind.SerializerProvider provider)
        +               throws IOException
        +
        Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
        +
        +
        Specified by:
        +
        serialize in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html new file mode 100644 index 000000000..605ffa203 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html @@ -0,0 +1,681 @@ + + + + + + +XmlBeanSerializerBase (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializerBase

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    UnwrappingXmlBeanSerializer, XmlBeanSerializer
    +
    +
    +
    +
    public abstract class XmlBeanSerializerBase
    +extends com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
    +
    Specific sub-class of BeanSerializerBase needed to take care + of some xml-specific aspects, such as distinction between attributes + and elements.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected int_attributeCount +
      Number of attributes to write; these will have been ordered to be the first + properties to write.
      +
      protected BitSet_cdata +
      Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment.
      +
      protected int_textPropertyIndex +
      Index of "text value" property we have, if any; can have at most + one such property.
      +
      protected QName[]_xmlNames +
      Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
      +
      static StringKEY_XML_INFO +
      Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected static boolean_isAttribute(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw) 
      protected static boolean_isCData(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw) 
      protected static int_orderAttributesFirst(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties, + com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties) +
      Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
      +
      protected void_serializeObjectId(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen, + com.fasterxml.jackson.databind.SerializerProvider provider, + com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer, + com.fasterxml.jackson.databind.ser.impl.WritableObjectId objectId) 
      protected voidserializeFields(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen0, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
      +
      protected voidserializeFieldsFiltered(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen0, + com.fasterxml.jackson.databind.SerializerProvider provider) 
      voidserializeWithType(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen, + com.fasterxml.jackson.databind.SerializerProvider provider, + com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, asArraySerializer, createContextual, findConvertingSerializer, getSchema, properties, resolve, serialize, usesObjectId, withFilterId, withIgnorals, withIgnorals, withObjectIdWriter
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, replaceDelegatee, unwrappingSerializer
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        KEY_XML_INFO

        +
        public static final String KEY_XML_INFO
        +
        Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes. + Created as separate non-interned String to ensure there are no collisions.
        +
      • +
      + + + +
        +
      • +

        _attributeCount

        +
        protected final int _attributeCount
        +
        Number of attributes to write; these will have been ordered to be the first + properties to write.
        +
      • +
      + + + +
        +
      • +

        _textPropertyIndex

        +
        protected final int _textPropertyIndex
        +
        Index of "text value" property we have, if any; can have at most + one such property.
        +
      • +
      + + + +
        +
      • +

        _xmlNames

        +
        protected final QName[] _xmlNames
        +
        Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
        +
      • +
      + + + +
        +
      • +

        _cdata

        +
        protected final BitSet _cdata
        +
        Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment. Left as null in cases where none of + element values are to be written in such a way.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        public XmlBeanSerializerBase(com.fasterxml.jackson.databind.ser.std.BeanSerializerBase src)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        protected XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                                com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        protected XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                                com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                                Object filterId)
        +
      • +
      + + + + + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        public XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                             com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        serializeFields

        +
        protected void serializeFields(Object bean,
        +                               com.fasterxml.jackson.core.JsonGenerator gen0,
        +                               com.fasterxml.jackson.databind.SerializerProvider provider)
        +                        throws IOException
        +
        Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
        +
        +
        Overrides:
        +
        serializeFields in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeFieldsFiltered

        +
        protected void serializeFieldsFiltered(Object bean,
        +                                       com.fasterxml.jackson.core.JsonGenerator gen0,
        +                                       com.fasterxml.jackson.databind.SerializerProvider provider)
        +                                throws IOException
        +
        +
        Overrides:
        +
        serializeFieldsFiltered in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeWithType

        +
        public void serializeWithType(Object bean,
        +                              com.fasterxml.jackson.core.JsonGenerator gen,
        +                              com.fasterxml.jackson.databind.SerializerProvider provider,
        +                              com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
        +                       throws IOException
        +
        +
        Overrides:
        +
        serializeWithType in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _serializeObjectId

        +
        protected void _serializeObjectId(Object bean,
        +                                  com.fasterxml.jackson.core.JsonGenerator gen,
        +                                  com.fasterxml.jackson.databind.SerializerProvider provider,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer,
        +                                  com.fasterxml.jackson.databind.ser.impl.WritableObjectId objectId)
        +                           throws IOException
        +
        +
        Overrides:
        +
        _serializeObjectId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _isAttribute

        +
        protected static boolean _isAttribute(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw)
        +
      • +
      + + + +
        +
      • +

        _isCData

        +
        protected static boolean _isCData(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw)
        +
      • +
      + + + +
        +
      • +

        _orderAttributesFirst

        +
        protected static int _orderAttributesFirst(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                           com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
        Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html new file mode 100644 index 000000000..0a89c4196 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html @@ -0,0 +1,331 @@ + + + + + + +XmlBeanSerializerModifier (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializerModifier

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlBeanSerializerModifier
    +extends com.fasterxml.jackson.databind.ser.BeanSerializerModifier
    +implements Serializable
    +
    We need a BeanSerializerModifier to replace default BeanSerializer + with XML-specific one; mostly to ensure that attribute properties are output + before element properties.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter>changeProperties(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> beanProperties) +
      First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
      +
      com.fasterxml.jackson.databind.JsonSerializer<?>modifySerializer(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + com.fasterxml.jackson.databind.JsonSerializer<?> serializer) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.BeanSerializerModifier

        +modifyArraySerializer, modifyCollectionLikeSerializer, modifyCollectionSerializer, modifyEnumSerializer, modifyKeySerializer, modifyMapLikeSerializer, modifyMapSerializer, orderProperties, updateBuilder
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializerModifier

        +
        public XmlBeanSerializerModifier()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        changeProperties

        +
        public List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> changeProperties(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                                    com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                                    List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> beanProperties)
        +
        First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
        +
        +
        Overrides:
        +
        changeProperties in class com.fasterxml.jackson.databind.ser.BeanSerializerModifier
        +
        +
      • +
      + + + +
        +
      • +

        modifySerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<?> modifySerializer(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                         com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                         com.fasterxml.jackson.databind.JsonSerializer<?> serializer)
        +
        +
        Overrides:
        +
        modifySerializer in class com.fasterxml.jackson.databind.ser.BeanSerializerModifier
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html new file mode 100644 index 000000000..c0791610c --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html @@ -0,0 +1,614 @@ + + + + + + +XmlSerializerProvider (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlSerializerProvider

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlSerializerProvider
    +extends com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
    +
    We need to override some parts of + SerializerProvider + implementation to handle oddities of XML output, like "extra" root element.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.Impl
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected XmlRootNameLookup_rootNameLookup 
      protected static QNameROOT_NAME_FOR_NULL +
      If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +_generator, _objectIdGenerators, _seenObjectIds
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.SerializerProvider

        +_attributes, _config, _dateFormat, _keySerializer, _knownSerializers, _nullKeySerializer, _nullValueSerializer, _serializationView, _serializerCache, _serializerFactory, _stdNullValueSerializer, _unknownTypeSerializer, CACHE_UNKNOWN_MAPPINGS, DEFAULT_NULL_KEY_SERIALIZER, DEFAULT_UNKNOWN_SERIALIZER
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected ToXmlGenerator_asXmlGenerator(com.fasterxml.jackson.core.JsonGenerator gen) 
      protected void_initWithRootName(ToXmlGenerator xgen, + QName rootName) 
      protected QName_rootNameFromConfig() 
      protected void_serializeXmlNull(com.fasterxml.jackson.core.JsonGenerator jgen) 
      protected void_startRootArray(ToXmlGenerator xgen, + QName rootName) 
      protected IOException_wrapAsIOE(com.fasterxml.jackson.core.JsonGenerator g, + Exception e) 
      com.fasterxml.jackson.databind.ser.DefaultSerializerProvidercopy() 
      com.fasterxml.jackson.databind.ser.DefaultSerializerProvidercreateInstance(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.ser.SerializerFactory jsf) 
      voidserializeValue(com.fasterxml.jackson.core.JsonGenerator gen, + Object value) 
      voidserializeValue(com.fasterxml.jackson.core.JsonGenerator gen, + Object value, + com.fasterxml.jackson.databind.JavaType rootType, + com.fasterxml.jackson.databind.JsonSerializer<Object> ser) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +_createObjectIdMap, _serializeNull, acceptJsonFormatVisitor, cachedSerializersCount, findObjectId, flushCachedSerializers, generateJsonSchema, getGenerator, hasSerializerFor, includeFilterInstance, includeFilterSuppressNulls, serializePolymorphic, serializerInstance, serializeValue
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.SerializerProvider

        +_createAndCacheUntypedSerializer, _createAndCacheUntypedSerializer, _createUntypedSerializer, _dateFormat, _findExplicitUntypedSerializer, _handleContextualResolvable, _handleResolvable, _reportIncompatibleRootType, canOverrideAccessModifiers, constructSpecializedType, defaultSerializeDateKey, defaultSerializeDateKey, defaultSerializeDateValue, defaultSerializeDateValue, defaultSerializeField, defaultSerializeNull, defaultSerializeValue, findContentValueSerializer, findContentValueSerializer, findKeySerializer, findKeySerializer, findNullKeySerializer, findNullValueSerializer, findPrimaryPropertySerializer, findPrimaryPropertySerializer, findTypedValueSerializer, findTypedValueSerializer, findTypeSerializer, findValueSerializer, findValueSerializer, findValueSerializer, findValueSerializer, getActiveView, getAnnotationIntrospector, getAttribute, getConfig, getDefaultNullKeySerializer, getDefaultNullValueSerializer, getDefaultPropertyFormat, getDefaultPropertyInclusion, getFilterProvider, getLocale, getSerializationView, getTimeZone, getTypeFactory, getUnknownTypeSerializer, handlePrimaryContextualization, handleSecondaryContextualization, hasSerializationFeatures, invalidTypeIdException, isEnabled, isEnabled, isUnknownTypeSerializer, mappingException, mappingException, reportBadDefinition, reportBadDefinition, reportBadDefinition, reportBadPropertyDefinition, reportBadTypeDefinition, reportMappingProblem, reportMappingProblem, setAttribute, setDefaultKeySerializer, setNullKeySerializer, setNullValueSerializer
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.DatabindContext

        +_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        ROOT_NAME_FOR_NULL

        +
        protected static final QName ROOT_NAME_FOR_NULL
        +
        If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlSerializerProvider

        +
        public XmlSerializerProvider(XmlRootNameLookup rootNames)
        +
      • +
      + + + +
        +
      • +

        XmlSerializerProvider

        +
        public XmlSerializerProvider(XmlSerializerProvider src,
        +                             com.fasterxml.jackson.databind.SerializationConfig config,
        +                             com.fasterxml.jackson.databind.ser.SerializerFactory f)
        +
      • +
      + + + +
        +
      • +

        XmlSerializerProvider

        +
        protected XmlSerializerProvider(XmlSerializerProvider src)
        +
        +
        Since:
        +
        2.8.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        copy

        +
        public com.fasterxml.jackson.databind.ser.DefaultSerializerProvider copy()
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        +
      • +
      + + + +
        +
      • +

        createInstance

        +
        public com.fasterxml.jackson.databind.ser.DefaultSerializerProvider createInstance(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                                   com.fasterxml.jackson.databind.ser.SerializerFactory jsf)
        +
        +
        Specified by:
        +
        createInstance in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        +
      • +
      + + + +
        +
      • +

        serializeValue

        +
        public void serializeValue(com.fasterxml.jackson.core.JsonGenerator gen,
        +                           Object value)
        +                    throws IOException
        +
        +
        Overrides:
        +
        serializeValue in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeValue

        +
        public void serializeValue(com.fasterxml.jackson.core.JsonGenerator gen,
        +                           Object value,
        +                           com.fasterxml.jackson.databind.JavaType rootType,
        +                           com.fasterxml.jackson.databind.JsonSerializer<Object> ser)
        +                    throws IOException
        +
        +
        Overrides:
        +
        serializeValue in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _serializeXmlNull

        +
        protected void _serializeXmlNull(com.fasterxml.jackson.core.JsonGenerator jgen)
        +                          throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _rootNameFromConfig

        +
        protected QName _rootNameFromConfig()
        +
      • +
      + + + +
        +
      • +

        _asXmlGenerator

        +
        protected ToXmlGenerator _asXmlGenerator(com.fasterxml.jackson.core.JsonGenerator gen)
        +                                  throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        _wrapAsIOE

        +
        protected IOException _wrapAsIOE(com.fasterxml.jackson.core.JsonGenerator g,
        +                                 Exception e)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html new file mode 100644 index 000000000..d24cbb254 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html @@ -0,0 +1,320 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html new file mode 100644 index 000000000..a6cb2ee76 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html @@ -0,0 +1,246 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html new file mode 100644 index 000000000..5a5f42e7b --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html @@ -0,0 +1,174 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html new file mode 100644 index 000000000..c16e3d576 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html new file mode 100644 index 000000000..c3b17710e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html new file mode 100644 index 000000000..9fed485f6 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html @@ -0,0 +1,220 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html new file mode 100644 index 000000000..bf492de46 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html new file mode 100644 index 000000000..f8ca2c10a --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html @@ -0,0 +1,169 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html new file mode 100644 index 000000000..5816ec863 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html @@ -0,0 +1,31 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.ser

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html new file mode 100644 index 000000000..be748a67e --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html @@ -0,0 +1,207 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.ser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html new file mode 100644 index 000000000..f9b3bbddb --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html @@ -0,0 +1,208 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.ser

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-use.html new file mode 100644 index 000000000..e95d0e0b5 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/ser/package-use.html @@ -0,0 +1,216 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.ser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html new file mode 100644 index 000000000..df0866eb2 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html @@ -0,0 +1,320 @@ + + + + + + +AnnotationUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class AnnotationUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class AnnotationUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AnnotationUtil

        +
        public AnnotationUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespaceAnnotation

        +
        public static String findNamespaceAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                             com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsAttributeAnnotation

        +
        public static Boolean findIsAttributeAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                                com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsTextAnnotation

        +
        public static Boolean findIsTextAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                           com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsCDataAnnotation

        +
        public static Boolean findIsCDataAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                            com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html new file mode 100644 index 000000000..558c63928 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html @@ -0,0 +1,340 @@ + + + + + + +DefaultXmlPrettyPrinter.FixedSpaceIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.FixedSpaceIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html new file mode 100644 index 000000000..3b9922c78 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html @@ -0,0 +1,280 @@ + + + + + + +DefaultXmlPrettyPrinter.Indenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Interface DefaultXmlPrettyPrinter.Indenter

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        writeIndentation

        +
        void writeIndentation(com.fasterxml.jackson.core.JsonGenerator g,
        +                      int level)
        +               throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        isInline

        +
        boolean isInline()
        +
        +
        Returns:
        +
        True if indenter is considered inline (does not add linefeeds), + false otherwise
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html new file mode 100644 index 000000000..f7a2ba4a3 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html @@ -0,0 +1,339 @@ + + + + + + +DefaultXmlPrettyPrinter.Lf2SpacesIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.Lf2SpacesIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html new file mode 100644 index 000000000..e102f00dc --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html @@ -0,0 +1,332 @@ + + + + + + +DefaultXmlPrettyPrinter.NopIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.NopIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html new file mode 100644 index 000000000..e40a712c9 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html @@ -0,0 +1,1105 @@ + + + + + + +DefaultXmlPrettyPrinter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.PrettyPrinter, com.fasterxml.jackson.core.util.Instantiatable<DefaultXmlPrettyPrinter>, XmlPrettyPrinter, Serializable
    +
    +
    +
    +
    public class DefaultXmlPrettyPrinter
    +extends Object
    +implements XmlPrettyPrinter, com.fasterxml.jackson.core.util.Instantiatable<DefaultXmlPrettyPrinter>, Serializable
    +
    Indentation to use with XML is different from JSON, because JSON + requires use of separator characters and XML just basic whitespace. +

    + Note that only a subset of methods of PrettyPrinter actually + get called by ToXmlGenerator; because of this, implementation + is bit briefer (and uglier...).

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _objectIndenter

        +
        protected DefaultXmlPrettyPrinter.Indenter _objectIndenter
        +
        By default, let's use linefeed-adding indenter for separate + object entries. We'll further configure indenter to use + system-specific linefeeds, and 2 spaces per level (as opposed to, + say, single tabs)
        +
      • +
      + + + +
        +
      • +

        _spacesInObjectEntries

        +
        protected boolean _spacesInObjectEntries
        +
        By default we will add spaces around colons used to + separate object fields and values. + If disabled, will not use spaces around colon.
        +
      • +
      + + + +
        +
      • +

        _nesting

        +
        protected transient int _nesting
        +
        Number of open levels of nesting. Used to determine amount of + indentation to use.
        +
      • +
      + + + +
        +
      • +

        _justHadStartElement

        +
        protected transient boolean _justHadStartElement
        +
        Marker flag set on start element, and cleared if an end element + is encountered. Used for suppressing indentation to allow empty + elements.
        +
        +
        Since:
        +
        2.3
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DefaultXmlPrettyPrinter

        +
        public DefaultXmlPrettyPrinter()
        +
      • +
      + + + + +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html new file mode 100644 index 000000000..dc2ae7b11 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html @@ -0,0 +1,352 @@ + + + + + + +StaxUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class StaxUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class StaxUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StaxUtil

        +
        public StaxUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        throwXmlAsIOException

        +
        @Deprecated
        +public static <T> T throwXmlAsIOException(XMLStreamException e)
        +                                               throws IOException
        +
        Deprecated. Since 2.9
        +
        Adapter method used when only IOExceptions are declared to be thrown, but + a XMLStreamException was caught. +

        + Note: dummy type variable is used for convenience, to allow caller to claim + that this method returns result of any necessary type.

        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        throwAsParseException

        +
        public static <T> T throwAsParseException(XMLStreamException e,
        +                                          com.fasterxml.jackson.core.JsonParser p)
        +                                   throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        throwAsGenerationException

        +
        public static <T> T throwAsGenerationException(XMLStreamException e,
        +                                               com.fasterxml.jackson.core.JsonGenerator g)
        +                                        throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        sanitizeXmlTypeName

        +
        public static String sanitizeXmlTypeName(String name)
        +
        Since XML names can not contain all characters JSON names can, we may + need to replace characters. Let's start with trivial replacement of + ASCII characters that can not be included.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html new file mode 100644 index 000000000..2196d7277 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html @@ -0,0 +1,291 @@ + + + + + + +TypeUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class TypeUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class TypeUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TypeUtil

        +
        public TypeUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isIndexedType

        +
        public static boolean isIndexedType(com.fasterxml.jackson.databind.JavaType type)
        +
        Helper method used for figuring out if given raw type is a collection ("indexed") type; + in which case a wrapper element is typically added.
        +
      • +
      + + + +
        +
      • +

        isIndexedType

        +
        public static boolean isIndexedType(Class<?> cls)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html new file mode 100644 index 000000000..5ba0be8f5 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html @@ -0,0 +1,395 @@ + + + + + + +XmlInfo (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class XmlInfo

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlInfo
    +extends Object
    +
    Helper container class used to contain XML specific information + we need to retain to construct proper bean serializer
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _namespace

        +
        protected final String _namespace
        +
      • +
      + + + +
        +
      • +

        _isAttribute

        +
        protected final boolean _isAttribute
        +
      • +
      + + + +
        +
      • +

        _isText

        +
        protected final boolean _isText
        +
      • +
      + + + +
        +
      • +

        _isCData

        +
        protected final boolean _isCData
        +
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getNamespace

        +
        public String getNamespace()
        +
      • +
      + + + +
        +
      • +

        isAttribute

        +
        public boolean isAttribute()
        +
      • +
      + + + +
        +
      • +

        isText

        +
        public boolean isText()
        +
      • +
      + + + +
        +
      • +

        isCData

        +
        public boolean isCData()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html new file mode 100644 index 000000000..35ba8ab08 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html @@ -0,0 +1,373 @@ + + + + + + +XmlRootNameLookup (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class XmlRootNameLookup

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlRootNameLookup
    +extends Object
    +implements Serializable
    +
    Helper class used for efficiently finding root element name used with + XML serializations.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _rootNames

        +
        protected final transient com.fasterxml.jackson.databind.util.LRUMap<com.fasterxml.jackson.databind.type.ClassKey,QName> _rootNames
        +
        For efficient operation, let's try to minimize number of times we + need to introspect root element name to use. +

        + Note: changed to transient for 2.3; no point in serializing such + state

        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlRootNameLookup

        +
        public XmlRootNameLookup()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readResolve

        +
        protected Object readResolve()
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public QName findRootName(com.fasterxml.jackson.databind.JavaType rootType,
        +                          com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public QName findRootName(Class<?> rootType,
        +                          com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      + + + +
        +
      • +

        _findRootName

        +
        protected QName _findRootName(Class<?> rootType,
        +                              com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html new file mode 100644 index 000000000..ee4b3f91f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html new file mode 100644 index 000000000..a6cecd8ca --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html new file mode 100644 index 000000000..b8f3e19ab --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html @@ -0,0 +1,221 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html new file mode 100644 index 000000000..33c22474f --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html new file mode 100644 index 000000000..e0d45c0c1 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html new file mode 100644 index 000000000..fa80ad621 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html @@ -0,0 +1,203 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html new file mode 100644 index 000000000..3abdd6e00 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.StaxUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.StaxUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html new file mode 100644 index 000000000..af9697280 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.TypeUtil (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.TypeUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html new file mode 100644 index 000000000..f38fdad18 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.XmlInfo (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.XmlInfo

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html new file mode 100644 index 000000000..9bf24621a --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html @@ -0,0 +1,177 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-frame.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-frame.html new file mode 100644 index 000000000..e7dcac8bc --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-frame.html @@ -0,0 +1,33 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.11.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.util

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-summary.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-summary.html new file mode 100644 index 000000000..902260baf --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-summary.html @@ -0,0 +1,211 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.util

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-tree.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-tree.html new file mode 100644 index 000000000..4cf8390a4 --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-tree.html @@ -0,0 +1,151 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.util

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-use.html b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-use.html new file mode 100644 index 000000000..d6fd9135c --- /dev/null +++ b/docs/javadoc/2.11/com/fasterxml/jackson/dataformat/xml/util/package-use.html @@ -0,0 +1,216 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.util

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/constant-values.html b/docs/javadoc/2.11/constant-values.html new file mode 100644 index 000000000..4e216cb9c --- /dev/null +++ b/docs/javadoc/2.11/constant-values.html @@ -0,0 +1,291 @@ + + + + + + +Constant Field Values (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

com.fasterxml.*

+ + + + +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/deprecated-list.html b/docs/javadoc/2.11/deprecated-list.html new file mode 100644 index 000000000..7842e6fb5 --- /dev/null +++ b/docs/javadoc/2.11/deprecated-list.html @@ -0,0 +1,179 @@ + + + + + + +Deprecated List (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/help-doc.html b/docs/javadoc/2.11/help-doc.html new file mode 100644 index 000000000..dd752c47d --- /dev/null +++ b/docs/javadoc/2.11/help-doc.html @@ -0,0 +1,231 @@ + + + + + + +API Help (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/index-all.html b/docs/javadoc/2.11/index-all.html new file mode 100644 index 000000000..23a827992 --- /dev/null +++ b/docs/javadoc/2.11/index-all.html @@ -0,0 +1,2144 @@ + + + + + + +Index (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I J K L M N O P R S T U V W X _  + + +

A

+
+
addVirtualWrapping(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements.
+
+
AnnotationUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
AnnotationUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
asArraySerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
+
+
asArraySerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
+
Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
+
+
+ + + +

B

+
+
beforeArrayValues(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
beforeObjectEntries(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
build() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
builder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
builder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
builder(XmlFactory) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
Builder(XmlMapper) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
+ + + +

C

+
+
canUseCharArrays() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
As of 2.4, we do have actual capability for passing char arrays + efficiently, but unfortunately + have no working mechanism for recycling buffers.
+
+
canWriteFormattedNumbers() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
changeProperties(SerializationConfig, BeanDescription, List<BeanPropertyWriter>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
+
First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
+
+
checkNextIsUnwrapped() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called to see if unwrapping is required; and if so, + clear the flag (so further calls will return 'false' unless + state is re-set)
+
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
closeCompletely() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
collectDefaults() - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Method that calculates bit set (flags) of all features that + are enabled by default.
+
+
collectDefaults() - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Method that calculates bit set (flags) of all features that + are enabled by default.
+
+
com.fasterxml.jackson.dataformat.xml - package com.fasterxml.jackson.dataformat.xml
+
+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+
com.fasterxml.jackson.dataformat.xml.annotation - package com.fasterxml.jackson.dataformat.xml.annotation
+
+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+
com.fasterxml.jackson.dataformat.xml.deser - package com.fasterxml.jackson.dataformat.xml.deser
+
 
+
com.fasterxml.jackson.dataformat.xml.jaxb - package com.fasterxml.jackson.dataformat.xml.jaxb
+
 
+
com.fasterxml.jackson.dataformat.xml.ser - package com.fasterxml.jackson.dataformat.xml.ser
+
 
+
com.fasterxml.jackson.dataformat.xml.util - package com.fasterxml.jackson.dataformat.xml.util
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling or disabling specified XML parser feature.
+
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling or disabling specified XML generator feature.
+
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
convertToArray() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
convertToString() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Helper method called by XML String deserializer to concatenate textual contents + contained in logical "Object": mostly just to skip attribute values.
+
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Note: compared to base implementation by JsonFactory, + here the copy will actually share underlying XML input and + output factories, as there is no way to make copies of those.
+
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
createChildArrayContext(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createChildObjectContext(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createContextual(DeserializationContext, BeanProperty) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
createContextual(DeserializationContext, BeanProperty) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
createGenerator(OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(OutputStream, JsonEncoding) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(File, JsonEncoding) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(XMLStreamWriter) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Factory method that wraps given XMLStreamWriter, usually to allow + incremental serialization to compose large output by serializing a sequence + of individual objects.
+
+
createInstance(SerializationConfig, SerializerFactory) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
createInstance() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
createParser(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Overridden just to prevent trying to optimize access via char array; + while nice idea, problem is that we don't have proper hooks to ensure + that temporary buffer gets recycled; so let's just use StringReader.
+
+
createParser(XMLStreamReader) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Factory method that wraps given XMLStreamReader, usually to allow + partial data-binding.
+
+
createRootContext(int, int) - Static method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createRootContext() - Static method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
+ + + +

D

+
+
decodeXmlClassName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
+
Helper method for decoding "XML safe" Java class name back into + actual class name
+
+
DEFAULT_UNKNOWN_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
If we support optional definition of element names, this is the element + name to use...
+
+
DEFAULT_UNNAMED_TEXT_PROPERTY - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
The default name placeholder for XML text segments is empty + String ("").
+
+
DEFAULT_USE_WRAPPER - Static variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
+
For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
+
+
DEFAULT_XML_MODULE - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
DEFAULT_XML_PRETTY_PRINTER - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
DefaultingXmlTypeResolverBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Sub-class of StdTypeResolverBuilder specifically used with + Default Typing.
+
+
DefaultingXmlTypeResolverBuilder(ObjectMapper.DefaultTyping, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
defaultInputFactory() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
defaultOutputFactory() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
defaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
DefaultXmlPrettyPrinter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Indentation to use with XML is different from JSON, because JSON + requires use of separator characters and XML just basic whitespace.
+
+
DefaultXmlPrettyPrinter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
DefaultXmlPrettyPrinter(DefaultXmlPrettyPrinter) - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
DefaultXmlPrettyPrinter.FixedSpaceIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
This is a very simple indenter that only every adds a + single space for indentation.
+
+
DefaultXmlPrettyPrinter.Indenter - Interface in com.fasterxml.jackson.dataformat.xml.util
+
+
Interface that defines objects that can produce indentation used + to separate object entries and array values.
+
+
DefaultXmlPrettyPrinter.Lf2SpacesIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Default linefeed-based indenter uses system-specific linefeeds and + 2 spaces for indentation per level.
+
+
DefaultXmlPrettyPrinter.NopIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Dummy implementation that adds no indentation whatsoever
+
+
deserialize(JsonParser, DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext, Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext, Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
deserializeWithType(JsonParser, DeserializationContext, TypeDeserializer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserializeWithType(JsonParser, DeserializationContext, TypeDeserializer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+
 
+
deserializeWithType(JsonParser, DeserializationContext, TypeDeserializer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for disabling specified XML parser feature.
+
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for disabling specified XML generator feature.
+
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(FromXmlParser.Feature, FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(ToXmlGenerator.Feature, ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
disable(ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
+ + + +

E

+
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling specified XML parser feature.
+
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling specified XML generator feature.
+
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(FromXmlParser.Feature, FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(ToXmlGenerator.Feature, ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
enable(ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
enabledByDefault() - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
enabledByDefault() - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
enabledIn(int) - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
enabledIn(int) - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
encodeXmlClassName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
+
Helper method for encoding regular Java class name in form that + can be used as XML element name.
+
+
expectComma() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
+ + + +

F

+
+
findIsAttributeAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findIsCDataAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findIsTextAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findNameForDeserialization(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNameForSerialization(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
findNamespace(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method that can be called to figure out generic namespace + property for an annotated object.
+
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
findNamespaceAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findRootName(AnnotatedClass) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findRootName(JavaType, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
findRootName(Class<?>, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
findWrapperName(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
finishWrappedValue(QName, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called after a structured collection output has completed
+
+
FixedSpaceIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
flush() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
FORMAT_NAME_XML - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Name used to identify XML format + (and returned by XmlFactory.getFormatName()
+
+
formatGeneratorFeaturesMask() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
formatParserFeaturesMask() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
FromXmlParser - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
JsonParser implementation that exposes XML structure as + set of JSON events that can be used for data binding.
+
+
FromXmlParser(IOContext, int, int, ObjectCodec, XMLStreamReader) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
FromXmlParser.Feature - Enum in com.fasterxml.jackson.dataformat.xml.deser
+
+
Enumeration that defines all togglable features for XML parsers.
+
+
+ + + +

G

+
+
getBigIntegerValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getBinaryValue(Base64Variant) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getCodec() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getCurrentLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that returns location of the last processed character; + usually for error reporting purposes
+
+
getCurrentLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that can be called to get the name associated with + the current event.
+
+
getCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getCurrentToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getCurrentValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getDecimalValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getDoubleValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getEmbeddedObject() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getEmptyValue(DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+
 
+
getFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
getFloatValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getFormatFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getFormatFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
getFormatGeneratorFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatName() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that returns short textual id identifying format + this factory supports.
+
+
getFormatParserFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatReadFeatureType() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatWriteFeatureType() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getIntValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getLocalName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getLongValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getMask() - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
getMask() - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
getNamespace() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
getNamespaceURI() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getNamesToWrap() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getNumberType() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getNumberValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getOutputBuffered() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Stax2 does not expose buffered content amount, so we can only return + -1 from here
+
+
getOutputTarget() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
getParent() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getParsingContext() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getStartLocation(Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getStaxReader() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that allows application direct access to underlying + Stax XMLStreamWriter.
+
+
getStaxWriter() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method that allows application direct access to underlying + Stax XMLStreamWriter.
+
+
getText() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getText(Writer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getText() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getTextCharacters() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTextLength() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTextOffset() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTokenLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
+
+
getTokenLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getValueAsString() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getValueAsString(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getXMLInputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getXMLOutputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getXmlReader() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getXMLTextElementName() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
+ + + +

H

+
+
handleMissingName() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
hasCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
hasFormat(InputAccessor) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
hasTextCharacters() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
+
+
hasXMLFormat(InputAccessor) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that tries to figure out if content seems to be in some kind + of XML format.
+
+
hasXsiNil() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
+ + + +

I

+
+
idFromValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
idFromValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
idResolver(MapperConfig<?>, JavaType, PolymorphicTypeValidator, Collection<NamedType>, boolean, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
idResolver(MapperConfig<?>, JavaType, PolymorphicTypeValidator, Collection<NamedType>, boolean, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
indentArraysWith(DefaultXmlPrettyPrinter.Indenter) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
indentObjectsWith(DefaultXmlPrettyPrinter.Indenter) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
init(JsonTypeInfo.Id, TypeIdResolver) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
init(JsonTypeInfo.Id, TypeIdResolver) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
initGenerator() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called before writing any other output, to optionally + output XML declaration.
+
+
inputFactory(XMLInputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
inRoot() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
instance(AnnotationIntrospector, AnnotationIntrospector) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isAttribute() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isCachable() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+
 
+
isCData() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isClosed() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
isEnabled(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
isEnabled(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
isEnabled(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Checked whether specified XML parser feature is enabled.
+
+
isEnabled(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Check whether specified XML generator feature is enabled.
+
+
isExpectedStartArrayToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
+
+
isIndexedType(JavaType) - Static method in class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
+
Helper method used for figuring out if given raw type is a collection ("indexed") type; + in which case a wrapper element is typically added.
+
+
isIndexedType(Class<?>) - Static method in class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
isInline() - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
isOutputAsAttribute(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
+
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
isOutputAsCData(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
+
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
isOutputAsText(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
+
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isText() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isUnwrappingSerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
+ + + +

J

+
+
JacksonXmlAnnotationIntrospector - Class in com.fasterxml.jackson.dataformat.xml
+
+
Extension of JacksonAnnotationIntrospector that is needed to support + additional xml-specific annotation that Jackson provides.
+
+
JacksonXmlAnnotationIntrospector() - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
JacksonXmlAnnotationIntrospector(boolean) - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
JacksonXmlCData - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Adding this annotation will result in value of the property to be serialized + within a CData tag.
+
+
JacksonXmlElementWrapper - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that is similar to JAXB javax.xml.bind.annotation.XmlElementWrapper, + to indicate wrapper element to use (if any) for Collection types (arrays, + java.util.Collection).
+
+
JacksonXmlModule - Class in com.fasterxml.jackson.dataformat.xml
+
+
Module that implements most functionality needed to support producing and + consuming XML instead of JSON.
+
+
JacksonXmlModule() - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
JacksonXmlProperty - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that can be used to provide XML-specific configuration + for properties, above and beyond what + JsonProperty contains.
+
+
JacksonXmlRootElement - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that can be used to define name of root element used + for the root-level object when serialized, which normally uses + name of the type (class).
+
+
JacksonXmlText - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Interface that is loosely similar to XmlValue + in that it can be used on one (and only one!) property of a POJO.
+
+
JaxbWrapper(JaxbAnnotationIntrospector) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
+ + + +

K

+
+
KEY_XML_INFO - Static variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes.
+
+
+ + + +

L

+
+
Lf2SpacesIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
+ + + +

M

+
+
modifyDeserializer(DeserializationConfig, BeanDescription, JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
modifySerializer(SerializationConfig, BeanDescription, JsonSerializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
 
+
+ + + +

N

+
+
nameForTextElement() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
nameForTextElement(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
nameForTextElement(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
newDelegatingInstance(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
newDelegatingInstance(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
next() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
nextTextValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method overridden to support more reliable deserialization of + String collections.
+
+
nextToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
NopIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
+ + + +

O

+
+
outputFactory(XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
overrideCurrentName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
overrideFormatFeatures(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
overrideFormatFeatures(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
+ + + +

P

+
+
PackageVersion - Class in com.fasterxml.jackson.dataformat.xml
+
+
Automatically generated from PackageVersion.java.in during + packageVersion-generate execution of maven-replacer-plugin in + pom.xml.
+
+
PackageVersion() - Constructor for class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
Pair(AnnotationIntrospector, AnnotationIntrospector) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
+ + + +

R

+
+
readResolve() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
readResolve() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that we need to override to actually make restoration go + through constructors etc.
+
+
readValue(XMLStreamReader, Class<T>) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
readValue(XMLStreamReader, TypeReference<T>) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
readValue(XMLStreamReader, JavaType) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
rebuild() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
repeatStartElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method used to add virtual wrapping, which just duplicates START_ELEMENT + stream points to, and its matching closing element.
+
+
requiresCustomCodec() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
+
+
requiresCustomCodec() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
+
+
reset(int, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
ROOT_NAME_FOR_NULL - Static variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
+
If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
+
+
+ + + +

S

+
+
sanitizeXmlTypeName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
+
Since XML names can not contain all characters JSON names can, we may + need to replace characters.
+
+
serialize(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
+
+
serialize(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
+
Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
+
+
serializeAsField(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Overridden version so that we can wrap output within wrapper element if + and as necessary.
+
+
serializeFields(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
+
+
serializeFieldsFiltered(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
serializeValue(JsonGenerator, Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeValue(JsonGenerator, Object, JavaType, JsonSerializer<Object>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeWithType(Object, JsonGenerator, SerializerProvider, TypeSerializer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
setCodec(ObjectCodec) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
setCurrentName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setCurrentValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations.
+
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
setDefaultUseWrapper(boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Deprecated. + +
+
+
setFormatFeatures(int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
setNamesToWrap(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setNextIsAttribute(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextIsCData(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextIsUnwrapped(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextName(QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextNameIfMissing(QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method that does same as ToXmlGenerator.setNextName(javax.xml.namespace.QName), unless + a name has already been set.
+
+
setPrettyPrinter(PrettyPrinter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setupModule(Module.SetupContext) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
setXMLInputFactory(XMLInputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
setXMLOutputFactory(XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values.
+
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Deprecated. + +
+
+
skipAttributes() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method called to skip any attributes current START_ELEMENT may have, + so that they are not returned as token.
+
+
skipEndElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
spacesInObjectEntries(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
startWrappedValue(QName, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Methdod called when a structured (collection, array, map) is being + output.
+
+
StaxUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
StaxUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
+ + + +

T

+
+
throwAsGenerationException(XMLStreamException, JsonGenerator) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
throwAsParseException(XMLStreamException, JsonParser) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
throwXmlAsIOException(XMLStreamException) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
+
Deprecated. +
Since 2.9
+
+
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
+
Overridden to provide developer readable "JsonPath" representation + of the context.
+
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
ToXmlGenerator - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
JsonGenerator that outputs JAXB-style XML output instead of JSON content.
+
+
ToXmlGenerator(IOContext, int, int, ObjectCodec, XMLStreamWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
ToXmlGenerator.Feature - Enum in com.fasterxml.jackson.dataformat.xml.ser
+
+
Enumeration that defines all togglable extra XML-specific features
+
+
typeFromId(DatabindContext, String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
typeFromId(DatabindContext, String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
typeProperty(String) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
typeProperty(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
TypeUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
TypeUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
 
+
+ + + +

U

+
+
unwrappingSerializer(NameTransformer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
unwrappingSerializer(NameTransformer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Copy of UnwrappingBeanSerializer required to extend + XmlBeanSerializerBase for XML-specific handling.
+
+
UnwrappingXmlBeanSerializer(XmlBeanSerializerBase, NameTransformer) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Constructor used for creating unwrapping instance of a standard + BeanSerializer
+
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
updateProperties(DeserializationConfig, BeanDescription, List<BeanPropertyDefinition>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
USE_PROPERTY_NAME - Static variable in annotation type com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
+
+
Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
+
+
+ + + +

V

+
+
valueOf(String) - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
VERSION - Static variable in class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
+ + + +

W

+
+
withFilterId(Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withFilterId(Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
withIgnorals(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withIgnorals(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
withObjectIdWriter(ObjectIdWriter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withObjectIdWriter(ObjectIdWriter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
WrapperHandlingDeserializer - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Delegating deserializer whose only function is to handle case of + "unwrapped" List/array deserialization from XML.
+
+
WrapperHandlingDeserializer(BeanDeserializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
WrapperHandlingDeserializer(BeanDeserializerBase, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
writeArrayValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeBinary(Base64Variant, byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeBinary(Base64Variant, InputStream, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeBoolean(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndArray() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndArray(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeEndElement(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeEndElement(XMLStreamWriter2, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for forcibly writing an end element, without going + through Jackson generator (and thus, without updating currently + active element stack)
+
+
writeEndObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndObject(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeFieldName(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeFieldName(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, String, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, char[], int, int, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, long) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, double) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, float) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigInteger) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigDecimal) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, String, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, char[], int, int, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, long) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, double) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, float) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigInteger) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigDecimal) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, byte[], int, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafNullElement(XMLStreamWriter2, String, String) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafNullElement(XMLStreamWriter2, String, String) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeNull() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(long) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(double) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(float) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(BigDecimal) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(BigInteger) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeObjectEntrySeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeObjectFieldValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writePrologLinefeed(XMLStreamWriter2) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writePrologLinefeed(XMLStreamWriter2) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for trying to write a linefeed to separate entities outside of the + root element (that is, in prolog or epilog), most often called to separate + XML declaration from the root element.
+
+
writeRaw(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(String, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(char) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawUTF8String(byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(String, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRepeatedFieldName() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Trivial helper method called when to add a replicated wrapper name
+
+
writeRootValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartArray() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStartArray(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartElement(XMLStreamWriter2, String, String) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartElement(XMLStreamWriter2, String, String) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for forcibly writing a start element, without going + through Jackson generator (and thus, without updating currently + active element stack)
+
+
writeStartObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStartObject(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeString(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeString(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeString(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStringField(String, String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeUTF8String(byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeValue(XMLStreamWriter, Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
+
+
+ + + +

X

+
+
XML_ATTRIBUTE_NAME - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_ATTRIBUTE_VALUE - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_END - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_END_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_START_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_TEXT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XmlAnnotationIntrospector - Interface in com.fasterxml.jackson.dataformat.xml
+
+
Additional extension interface used above and beyond + AnnotationIntrospector to handle XML-specific configuration.
+
+
XmlAnnotationIntrospector.JaxbWrapper - Class in com.fasterxml.jackson.dataformat.xml
+
+
Wrapper we need to adapt JaxbAnnotationIntrospector as + XmlAnnotationIntrospector: something we can not (alas!) + do in JAXB module because of dependency direction (JAXB module + has no knowledge of this module).
+
+
XmlAnnotationIntrospector.Pair - Class in com.fasterxml.jackson.dataformat.xml
+
+
Extension of AnnotationIntrospector.Pair that can + also dispatch 'XmlAnnotationIntrospector' methods.
+
+
XmlBeanDeserializerModifier - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
The main reason for a modifier is to support handling of + 'wrapped' Collection types.
+
+
XmlBeanDeserializerModifier(String) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
XmlBeanPropertyWriter - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Property writer sub-class used for handling element wrapping needed for serializing + collection (array, Collection; possibly Map) types.
+
+
XmlBeanPropertyWriter(BeanPropertyWriter, PropertyName, PropertyName) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
 
+
XmlBeanPropertyWriter(BeanPropertyWriter, PropertyName, PropertyName, JsonSerializer<Object>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
 
+
XmlBeanSerializer - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Variant of BeanSerializer for XML handling.
+
+
XmlBeanSerializer(BeanSerializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializerBase - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Specific sub-class of BeanSerializerBase needed to take care + of some xml-specific aspects, such as distinction between attributes + and elements.
+
+
XmlBeanSerializerBase(BeanSerializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, NameTransformer) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerModifier - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
We need a BeanSerializerModifier to replace default BeanSerializer + with XML-specific one; mostly to ensure that attribute properties are output + before element properties.
+
+
XmlBeanSerializerModifier() - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
 
+
xmlBuilder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlClassNameIdResolver(JavaType, TypeFactory, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
XmlFactory - Class in com.fasterxml.jackson.dataformat.xml
+
+
Factory used for constructing FromXmlParser and ToXmlGenerator + instances.
+
+
XmlFactory() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Default constructor used to create factory instances.
+
+
XmlFactory(ObjectCodec) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XMLInputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(ObjectCodec, XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(ObjectCodec, int, int, XMLInputFactory, XMLOutputFactory, String) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XmlFactory, ObjectCodec) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XmlFactoryBuilder) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Constructors used by JsonFactoryBuilder for instantiation.
+
+
XmlFactoryBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
TSFBuilder + implementation for constructing XmlFactory + instances.
+
+
XmlFactoryBuilder() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlFactoryBuilder(XmlFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlInfo - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Helper container class used to contain XML specific information + we need to retain to construct proper bean serializer
+
+
XmlInfo(Boolean, String, Boolean, Boolean) - Constructor for class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
xmlInputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlJaxbAnnotationIntrospector - Class in com.fasterxml.jackson.dataformat.xml.jaxb
+
+
Alternative AnnotationIntrospector + implementation that + builds on JaxbAnnotationIntrospector.
+
+
XmlJaxbAnnotationIntrospector() - Constructor for class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
+
XmlJaxbAnnotationIntrospector(TypeFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
 
+
XmlMapper - Class in com.fasterxml.jackson.dataformat.xml
+
+
Customized ObjectMapper that will read and write XML instead of JSON, + using XML-backed JsonFactory + implementation (XmlFactory).
+
+
XmlMapper() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XMLInputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(JacksonXmlModule) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlFactory, JacksonXmlModule) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlMapper) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper.Builder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Builder implementation for constructing XmlMapper instances.
+
+
XmlMinimalClassNameIdResolver(JavaType, TypeFactory, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
xmlOutputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlPrettyPrinter - Interface in com.fasterxml.jackson.dataformat.xml
+
+
There are some XML-specific quirks that need extra TLC when + indenting: so we will use a refinement of general purpose one.
+
+
XmlReadContext - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Extension of JsonStreamContext, which implements + core methods needed, and adds small amount of additional + state data we need.
+
+
XmlReadContext(XmlReadContext, int, int, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
XmlRootNameLookup - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Helper class used for efficiently finding root element name used with + XML serializations.
+
+
XmlRootNameLookup() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
XmlSerializerProvider - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
We need to override some parts of + SerializerProvider + implementation to handle oddities of XML output, like "extra" root element.
+
+
XmlSerializerProvider(XmlRootNameLookup) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlSerializerProvider(XmlSerializerProvider, SerializationConfig, SerializerFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlSerializerProvider(XmlSerializerProvider) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlStringDeserializer - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Custom variant used instead of "plain" StringDeserializer to handle + couple of edge cases that XML parser exposes.
+
+
XmlStringDeserializer() - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer
+
 
+
XmlTextDeserializer - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Delegating deserializer that is used in the special cases where + we may sometimes see a "plain" String value but need to map it + as if it was a property of POJO.
+
+
XmlTextDeserializer(BeanDeserializerBase, SettableBeanProperty) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
XmlTextDeserializer(BeanDeserializerBase, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
XmlTokenStream - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Simple helper class used on top of STAX XMLStreamReader to further + abstract out all irrelevant details, and to expose equivalent of flat token + stream with no "fluff" tokens (comments, processing instructions, mixed + content) all of which is just to simplify + actual higher-level conversion to JSON tokens.
+
+
XmlTokenStream(XMLStreamReader, Object, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XmlTypeResolverBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Custom specialization of StdTypeResolverBuilder; needed so that + type id property name can be modified as necessary to make it legal + XML element or attribute name.
+
+
XmlTypeResolverBuilder() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
XmlTypeResolverBuilder.XmlClassNameIdResolver - Class in com.fasterxml.jackson.dataformat.xml
+
 
+
XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver - Class in com.fasterxml.jackson.dataformat.xml
+
 
+
+ + + +

_

+
+
_allWs(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_arrayIndenter - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default, let's use only spaces to separate array values.
+
+
_asXmlGenerator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_attributeCount - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_attributeCount - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Number of attributes to write; these will have been ordered to be the first + properties to write.
+
+
_binaryValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
We will hold on to decoded binary data, for duration of + current event, so that multiple calls to + FromXmlParser.getBinaryValue(com.fasterxml.jackson.core.Base64Variant) will not need to decode data more + than once.
+
+
_byteArrayBuilder - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
ByteArrayBuilder is needed if 'getBinaryValue' is called.
+
+
_cdata - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment.
+
+
_cfgDefaultUseWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
_cfgDefaultUseWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not.
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use).
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_cfgNameForTextValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
+
Virtual name used for text segments.
+
+
_child - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_closed - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Flag that indicates whether parser is closed or not.
+
+
_columnNr - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_configureParser(JsonParser) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_constructDefaultPrettyPrinter() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_constructDefaultTypeResolverBuilder(ObjectMapper.DefaultTyping, PolymorphicTypeValidator) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
_constructIntrospector() - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
_constructStdTypeResolverBuilder() - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
+
We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
+
+
_createGenerator(Writer, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(InputStream, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(Reader, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(char[], int, int, IOContext, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(byte[], int, int, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createXmlWriter(IOContext, OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createXmlWriter(IOContext, Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_currentName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_currentState - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_currentValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_currentWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Wrapping state, if any active (null if none)
+
+
_currText - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_decodeBase64(Base64Variant) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_decorate(IOContext, OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_decorate(IOContext, Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_elementNameStack - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
To support proper serialization of arrays it is necessary to keep + stack of element names, so that we can "revert" to earlier
+
+
_findRootName(Class<?>, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
_findXmlName(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
+
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
+
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Bit flag composed of bits that indicate which + ToXmlGenerator.Features + are enabled.
+
+
_formatGeneratorFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Set of ToXmlGenerator.Features enabled, as bitmask.
+
+
_formatParserFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Set of FromXmlParser.Features enabled, as bitmask.
+
+
_getByteArrayBuilder() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_handleEndObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_handleEOF() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method called when an EOF is encountered between tokens.
+
+
_handleRepeatElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method called to handle details of repeating "virtual" + start/end elements, needed for handling 'unwrapped' lists.
+
+
_handleStartObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_initFactories(XMLInputFactory, XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initialized - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker set when ToXmlGenerator.initGenerator() has been called or not.
+
+
_initializeXmlReader(XMLStreamReader) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initializeXmlWriter(XMLStreamWriter) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initWithRootName(ToXmlGenerator, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_intr - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
_ioContext - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_ioContext - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_isAttribute(BeanPropertyWriter) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_isAttribute - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_isCData(BeanPropertyWriter) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_isCData - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_isEmpty(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_isText - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_jdkXmlInFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Hiding place for JDK-serialization unthawed factories...
+
+
_jdkXmlOutFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Hiding place for JDK-serialization unthawed factories...
+
+
_justHadStartElement - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
Marker flag set on start element, and cleared if an end element + is encountered.
+
+
_lineNr - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_localName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_mayBeLeaf - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
We need special handling to keep track of whether a value + may be exposed as simple leaf value.
+
+
_mixedText - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
If true we have a START_ELEMENT with mixed text
+
+
_nameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
+
+
_namespace - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_namespaceURI - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_namesToWrap - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_namesToWrap - Variable in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
+
(Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
+
+
_namesToWrap - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_nameTransformer - Variable in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
+
+
_nesting - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
Number of open levels of nesting.
+
+
_nextAttributeIndex - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Index of the next attribute of the current START_ELEMENT + to return (as field name and value pair), if any; -1 + when no attributes to return
+
+
_nextIsAttribute - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag that indicates whether next name to write + implies an attribute (true) or element (false)
+
+
_nextIsCData - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag used to indicate that the next write of a (property) + value should be as CData
+
+
_nextIsUnwrapped - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag used to indicate that the next write of a (property) + value should be done without using surrounding start/end + elements.
+
+
_nextLocalName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
In cases where we need to 'inject' a virtual END_ELEMENT, we may also + need to restore START_ELEMENT afterwards; if so, this is where names + are held.
+
+
_nextName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Element or attribute name to use for next output call.
+
+
_nextNamespaceURI - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_nextToken - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_objectCodec - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_objectIndenter - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default, let's use linefeed-adding indenter for separate + object entries.
+
+
_orderAttributesFirst(BeanPropertyWriter[], BeanPropertyWriter[]) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
+
+
_originalXmlWriter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_parent - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_parsingContext - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Information about parser context, context in which + the next token is to be parsed (root, array, object).
+
+
_releaseBuffers() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method called to release internal buffers owned by the base + parser.
+
+
_releaseBuffers() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_repeatElement - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Flag used to indicate that given element should be "replayed".
+
+
_reportUnimplementedStax2(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called in case access to native Stax2 API implementation is required.
+
+
_rootNameFromConfig() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_rootNameLookup - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_rootNames - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
+
For efficient operation, let's try to minimize number of times we + need to introspect root element name to use.
+
+
_serializeObjectId(Object, JsonGenerator, SerializerProvider, TypeSerializer, WritableObjectId) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_serializeXmlNull(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_sourceReference - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_spacesInObjectEntries - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default we will add spaces around colons used to + separate object fields and values.
+
+
_startRootArray(ToXmlGenerator, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_stax2Emulation - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag set if the underlying stream writer has to emulate + Stax2 API: this is problematic if trying to use ToXmlGenerator.writeRaw(java.lang.String) calls.
+
+
_textPropertyIndex - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Index of "text value" property we have, if any; can have at most + one such property.
+
+
_textValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_type - Variable in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_valueInstantiator - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
_verifyDeserType(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_verifyDeserType(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
_verifyValueWrite(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_wrapAsIOE(JsonGenerator, Exception) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_wrappedName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
+
Name of property that requires wrapping
+
+
_wrappedQName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Element name used for items in the collection
+
+
_wrapperQName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Element name used as wrapper for collection.
+
+
_xmlGeneratorFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlInputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlInputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Stax factory for creating underlying input stream readers; + `null` for "use default instance with default settings"
+
+
_xmlModule - Variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
_xmlNames - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
+
+
_xmlOutputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlOutputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Stax factory for creating underlying output stream writers; + `null` for "use default instance with default settings"
+
+
_xmlParserFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlPrettyPrinter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
We may need to use XML-specific indentation as well
+
+
_xmlPrimary - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
_xmlReader - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_xmlSecondary - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
_xmlTextProperty - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
+
Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
+
+
_xmlTextPropertyIndex - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
+
Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
+
+
_xmlTokens - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_xmlWriter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_xsiNilFound - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Marker used to indicate presence of `xsi:nil="true"' in current START_ELEMENT.
+
+
+A B C D E F G H I J K L M N O P R S T U V W X _ 
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/index.html b/docs/javadoc/2.11/index.html new file mode 100644 index 000000000..fdf747406 --- /dev/null +++ b/docs/javadoc/2.11/index.html @@ -0,0 +1,76 @@ + + + + + + +Jackson-dataformat-XML 2.11.0 API + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/javadoc/2.11/overview-frame.html b/docs/javadoc/2.11/overview-frame.html new file mode 100644 index 000000000..0ac7455b6 --- /dev/null +++ b/docs/javadoc/2.11/overview-frame.html @@ -0,0 +1,27 @@ + + + + + + +Overview List (Jackson-dataformat-XML 2.11.0 API) + + + + + +
All Classes
+
+

Packages

+ +
+

 

+ + diff --git a/docs/javadoc/2.11/overview-summary.html b/docs/javadoc/2.11/overview-summary.html new file mode 100644 index 000000000..b8bd35175 --- /dev/null +++ b/docs/javadoc/2.11/overview-summary.html @@ -0,0 +1,168 @@ + + + + + + +Overview (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Jackson-dataformat-XML 2.11.0 API

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
com.fasterxml.jackson.dataformat.xml +
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
com.fasterxml.jackson.dataformat.xml.annotation +
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
com.fasterxml.jackson.dataformat.xml.deser 
com.fasterxml.jackson.dataformat.xml.jaxb 
com.fasterxml.jackson.dataformat.xml.ser 
com.fasterxml.jackson.dataformat.xml.util 
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/overview-tree.html b/docs/javadoc/2.11/overview-tree.html new file mode 100644 index 000000000..51e7802ce --- /dev/null +++ b/docs/javadoc/2.11/overview-tree.html @@ -0,0 +1,366 @@ + + + + + + +Class Hierarchy (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Annotation Type Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/package-list b/docs/javadoc/2.11/package-list new file mode 100644 index 000000000..9915bc315 --- /dev/null +++ b/docs/javadoc/2.11/package-list @@ -0,0 +1,6 @@ +com.fasterxml.jackson.dataformat.xml +com.fasterxml.jackson.dataformat.xml.annotation +com.fasterxml.jackson.dataformat.xml.deser +com.fasterxml.jackson.dataformat.xml.jaxb +com.fasterxml.jackson.dataformat.xml.ser +com.fasterxml.jackson.dataformat.xml.util diff --git a/docs/javadoc/2.11/script.js b/docs/javadoc/2.11/script.js new file mode 100644 index 000000000..b34635693 --- /dev/null +++ b/docs/javadoc/2.11/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/javadoc/2.11/serialized-form.html b/docs/javadoc/2.11/serialized-form.html new file mode 100644 index 000000000..5edbc5f46 --- /dev/null +++ b/docs/javadoc/2.11/serialized-form.html @@ -0,0 +1,638 @@ + + + + + + +Serialized Form (Jackson-dataformat-XML 2.11.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.11/stylesheet.css b/docs/javadoc/2.11/stylesheet.css new file mode 100644 index 000000000..98055b22d --- /dev/null +++ b/docs/javadoc/2.11/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/docs/javadoc/2.12/allclasses-frame.html b/docs/javadoc/2.12/allclasses-frame.html new file mode 100644 index 000000000..a1e69eaf8 --- /dev/null +++ b/docs/javadoc/2.12/allclasses-frame.html @@ -0,0 +1,67 @@ + + + + + + +All Classes (Jackson-dataformat-XML 2.12.0 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.12/allclasses-noframe.html b/docs/javadoc/2.12/allclasses-noframe.html new file mode 100644 index 000000000..5dd3e738c --- /dev/null +++ b/docs/javadoc/2.12/allclasses-noframe.html @@ -0,0 +1,67 @@ + + + + + + +All Classes (Jackson-dataformat-XML 2.12.0 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html new file mode 100644 index 000000000..9a2bd29c3 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.html @@ -0,0 +1,392 @@ + + + + + + +DefaultingXmlTypeResolverBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class DefaultingXmlTypeResolverBuilder

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>, Serializable
    +
    +
    +
    +
    public class DefaultingXmlTypeResolverBuilder
    +extends com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder
    +implements Serializable
    +
    Sub-class of StdTypeResolverBuilder specifically used with + Default Typing. +

    + Composition/sub-classing gets quite tricky here: ideally we would just + extend XmlTypeResolverBuilder but unfortunately inheritance hierarchy + does not allow this.

    +
    +
    Since:
    +
    2.10
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder

        +_appliesFor, _subtypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +_customIdResolver, _defaultImpl, _idType, _includeAs, _typeIdVisible, _typeProperty
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      DefaultingXmlTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping t, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.TypeIdResolveridResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, + com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, + Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, + boolean forSer, + boolean forDeser) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilderinit(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType, + com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuildertypeProperty(String typeIdPropName) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder

        +buildTypeDeserializer, buildTypeSerializer, construct, subTypeValidator, useForType
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +allowPrimitiveTypes, defaultImpl, defineDefaultImpl, getDefaultImpl, getTypeProperty, inclusion, isTypeIdVisible, noTypeInfoBuilder, reportInvalidBaseType, typeIdVisibility, verifyBaseTypeValidity
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DefaultingXmlTypeResolverBuilder

        +
        public DefaultingXmlTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping t,
        +                                        com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
        +                                                                                com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes)
        +
        +
        Specified by:
        +
        init in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        init in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        typeProperty

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder typeProperty(String typeIdPropName)
        +
        +
        Specified by:
        +
        typeProperty in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        typeProperty in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        idResolver

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config,
        +                                                                            com.fasterxml.jackson.databind.JavaType baseType,
        +                                                                            com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator,
        +                                                                            Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes,
        +                                                                            boolean forSer,
        +                                                                            boolean forDeser)
        +
        +
        Overrides:
        +
        idResolver in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html new file mode 100644 index 000000000..25135d367 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.html @@ -0,0 +1,619 @@ + + + + + + +JacksonXmlAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class JacksonXmlAnnotationIntrospector

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector, Serializable
    +
    +
    +
    +
    public class JacksonXmlAnnotationIntrospector
    +extends com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
    +implements XmlAnnotationIntrospector
    +
    Extension of JacksonAnnotationIntrospector that is needed to support + additional xml-specific annotation that Jackson provides. Note, however, that + there is no JAXB annotation support here; that is provided with + separate introspector (see + JaxbAnnotationIntrospector).
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected boolean_cfgDefaultUseWrapper 
      static booleanDEFAULT_USE_WRAPPER +
      For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

        +_annotationsInside, _cfgConstructorPropertiesImpliesCreator
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder_constructStdTypeResolverBuilder() +
      We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
      +
      protected com.fasterxml.jackson.databind.PropertyName_findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a) 
      com.fasterxml.jackson.databind.PropertyNamefindNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a) 
      com.fasterxml.jackson.databind.PropertyNamefindNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a) 
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      com.fasterxml.jackson.databind.PropertyNamefindRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac) 
      com.fasterxml.jackson.databind.PropertyNamefindWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann) 
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

        +_classIfExplicit, _classIfExplicit, _constructNoTypeResolverBuilder, _constructVirtualProperty, _constructVirtualProperty, _findConstructorName, _findTypeResolver, _isIgnorable, _propertyName, findAndAddVirtualProperties, findAutoDetectVisibility, findClassDescription, findContentDeserializer, findContentSerializer, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentConverter, findDeserializationContentType, findDeserializationConverter, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumAliases, findEnumValue, findEnumValues, findFilterId, findFormat, findImplicitPropertyName, findInjectableValue, findInjectableValueId, findKeyDeserializer, findKeySerializer, findMergeInfo, findNamingStrategy, findNullSerializer, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPropertyAccess, findPropertyAliases, findPropertyContentTypeResolver, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnoralByName, findPropertyIgnorals, findPropertyInclusion, findPropertyInclusionByName, findPropertyIndex, findPropertyTypeResolver, findReferenceType, findRenameByField, findSerializationContentConverter, findSerializationContentType, findSerializationConverter, findSerializationKeyType, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializer, findSetterInfo, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsKey, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isIgnorableType, isTypeId, readResolve, refineDeserializationType, refineSerializationType, resolveSetterConflict, setConstructorPropertiesImpliesCreator, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findIgnoreUnknownProperties, findPropertiesToIgnore, findSerializationInclusion, findSerializationInclusionForContent, nopInstance, pair
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_USE_WRAPPER

        +
        public static final boolean DEFAULT_USE_WRAPPER
        +
        For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        _cfgDefaultUseWrapper

        +
        protected boolean _cfgDefaultUseWrapper
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JacksonXmlAnnotationIntrospector

        +
        public JacksonXmlAnnotationIntrospector()
        +
      • +
      + + + +
        +
      • +

        JacksonXmlAnnotationIntrospector

        +
        public JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findWrapperName

        +
        public com.fasterxml.jackson.databind.PropertyName findWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        +
        Overrides:
        +
        findWrapperName in class com.fasterxml.jackson.databind.AnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public com.fasterxml.jackson.databind.PropertyName findRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac)
        +
        +
        Overrides:
        +
        findRootName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + + + + +
        +
      • +

        findNameForSerialization

        +
        public com.fasterxml.jackson.databind.PropertyName findNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
        +
        Overrides:
        +
        findNameForSerialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        findNameForDeserialization

        +
        public com.fasterxml.jackson.databind.PropertyName findNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
        +
        Overrides:
        +
        findNameForDeserialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        _constructStdTypeResolverBuilder

        +
        protected com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder _constructStdTypeResolverBuilder()
        +
        We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
        +
        +
        Overrides:
        +
        _constructStdTypeResolverBuilder in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        _findXmlName

        +
        protected com.fasterxml.jackson.databind.PropertyName _findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html new file mode 100644 index 000000000..987a511ba --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.html @@ -0,0 +1,488 @@ + + + + + + +JacksonXmlModule (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class JacksonXmlModule

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class JacksonXmlModule
    +extends com.fasterxml.jackson.databind.module.SimpleModule
    +implements Serializable
    +
    Module that implements most functionality needed to support producing and + consuming XML instead of JSON, used by XmlMapper for registering + handlers for XML-specific processing. +

    + NOTE: please do NOT register this directly on XmlMapper: mapper + registers an instance (either one explicitly given in constructor, or, if none, + one it configures) and attempts to re-register is unlikely to work as + you'd expect.

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module

        +com.fasterxml.jackson.databind.Module.SetupContext
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected boolean_cfgDefaultUseWrapper +
      Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not.
      +
      protected String_cfgNameForTextElement +
      Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use).
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        +_abstractTypes, _deserializerModifier, _deserializers, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JacksonXmlModule() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.AnnotationIntrospector_constructIntrospector() 
      voidsetDefaultUseWrapper(boolean state) +
      Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations.
      +
      voidsetupModule(com.fasterxml.jackson.databind.Module.SetupContext context) 
      voidsetXMLTextElementName(String name) +
      Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values.
      +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        +_checkNotNull, addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, getTypeId, registerSubtypes, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setValueInstantiators, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.Module

        +getDependencies
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _cfgDefaultUseWrapper

        +
        protected boolean _cfgDefaultUseWrapper
        +
        Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not. + If enabled, wrapping is used by default; if false, it is not. +

        + Note that JAXB annotation introspector always assumes "do not wrap by default". + Jackson annotations have different default due to backwards compatibility.

        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
        Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use). Defaults to empty String, but + may be changed for interoperability reasons: JAXB, for example, uses + "value" as name.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JacksonXmlModule

        +
        public JacksonXmlModule()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setupModule

        +
        public void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
        +
        +
        Overrides:
        +
        setupModule in class com.fasterxml.jackson.databind.module.SimpleModule
        +
        +
      • +
      + + + +
        +
      • +

        setDefaultUseWrapper

        +
        public void setDefaultUseWrapper(boolean state)
        +
        Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations. + See JacksonXmlElementWrapper + for details. +

        + Note that method MUST be called before registering the module; otherwise change + will not have any effect.

        +
        +
        Parameters:
        +
        state - Whether to enable or disable "use wrapper for non-annotated List properties"
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values. Default name is empty String + (""); but some frameworks use other names: JAXB, for example, uses + "value". +

        + Note that method MUST be called before registering the module; otherwise change + will not have any effect.

        +
        +
        Parameters:
        +
        name - Virtual name to use when exposing XML character data sections
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _constructIntrospector

        +
        protected com.fasterxml.jackson.databind.AnnotationIntrospector _constructIntrospector()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/PackageVersion.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/PackageVersion.html new file mode 100644 index 000000000..b377b286d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/PackageVersion.html @@ -0,0 +1,321 @@ + + + + + + +PackageVersion (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class PackageVersion

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned
    +
    +
    +
    +
    public final class PackageVersion
    +extends Object
    +implements com.fasterxml.jackson.core.Versioned
    +
    Automatically generated from PackageVersion.java.in during + packageVersion-generate execution of maven-replacer-plugin in + pom.xml.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        VERSION

        +
        public static final com.fasterxml.jackson.core.Version VERSION
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PackageVersion

        +
        public PackageVersion()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html new file mode 100644 index 000000000..86869ef0a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.JaxbWrapper.html @@ -0,0 +1,443 @@ + + + + + + +XmlAnnotationIntrospector.JaxbWrapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlAnnotationIntrospector.JaxbWrapper

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector_intr 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JaxbWrapper(com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector i) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _intr

        +
        protected final com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector _intr
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JaxbWrapper

        +
        public JaxbWrapper(com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector i)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html new file mode 100644 index 000000000..3fc55f1c0 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.Pair.html @@ -0,0 +1,513 @@ + + + + + + +XmlAnnotationIntrospector.Pair (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlAnnotationIntrospector.Pair

+
+
+ +
+ +
+
+
    +
  • + + + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Pair(com.fasterxml.jackson.databind.AnnotationIntrospector p, + com.fasterxml.jackson.databind.AnnotationIntrospector s) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      static XmlAnnotationIntrospector.Pairinstance(com.fasterxml.jackson.databind.AnnotationIntrospector a1, + com.fasterxml.jackson.databind.AnnotationIntrospector a2) 
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair

        +_explicitClassOrOb, _isExplicitClassOrOb, allIntrospectors, allIntrospectors, create, findAndAddVirtualProperties, findAutoDetectVisibility, findClassDescription, findContentDeserializer, findContentSerializer, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentConverter, findDeserializationContentType, findDeserializationConverter, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumAliases, findEnumValue, findEnumValues, findFilterId, findFormat, findIgnoreUnknownProperties, findImplicitPropertyName, findInjectableValue, findInjectableValueId, findKeyDeserializer, findKeySerializer, findMergeInfo, findNameForDeserialization, findNameForSerialization, findNamingStrategy, findNullSerializer, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findPropertyAccess, findPropertyAliases, findPropertyContentTypeResolver, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnoralByName, findPropertyIgnorals, findPropertyInclusion, findPropertyInclusionByName, findPropertyIndex, findPropertyTypeResolver, findReferenceType, findRenameByField, findRootName, findSerializationContentConverter, findSerializationContentType, findSerializationConverter, findSerializationInclusion, findSerializationInclusionForContent, findSerializationKeyType, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializer, findSetterInfo, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, findWrapperName, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isIgnorableType, isTypeId, refineDeserializationType, refineSerializationType, resolveSetterConflict, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, hasAsKey, nopInstance, pair
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Pair

        +
        public Pair(com.fasterxml.jackson.databind.AnnotationIntrospector p,
        +            com.fasterxml.jackson.databind.AnnotationIntrospector s)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        instance

        +
        public static XmlAnnotationIntrospector.Pair instance(com.fasterxml.jackson.databind.AnnotationIntrospector a1,
        +                                                      com.fasterxml.jackson.databind.AnnotationIntrospector a2)
        +
      • +
      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html new file mode 100644 index 000000000..a8c11cbd2 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlAnnotationIntrospector.html @@ -0,0 +1,348 @@ + + + + + + +XmlAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Interface XmlAnnotationIntrospector

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeInterface and Description
      static class XmlAnnotationIntrospector.JaxbWrapper +
      Wrapper we need to adapt JaxbAnnotationIntrospector as + XmlAnnotationIntrospector: something we can not (alas!) + do in JAXB module because of dependency direction (JAXB module + has no knowledge of this module).
      +
      static class XmlAnnotationIntrospector.Pair +
      Extension of AnnotationIntrospector.Pair that can + also dispatch 'XmlAnnotationIntrospector' methods.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) 
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
      • +
      + + + +
        +
      • +

        setDefaultUseWrapper

        +
        void setDefaultUseWrapper(boolean b)
        +
        +
        Since:
        +
        2.7
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactory.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactory.html new file mode 100644 index 000000000..adfe53825 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactory.html @@ -0,0 +1,1535 @@ + + + + + + +XmlFactory (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlFactory

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class XmlFactory
    +extends com.fasterxml.jackson.core.JsonFactory
    +
    Factory used for constructing FromXmlParser and ToXmlGenerator + instances. +

    + Implements JsonFactory since interface for constructing XML backed + parsers and generators is quite similar to dealing with JSON.

    +
    +
    Author:
    +
    Tatu Saloranta (tatu.saloranta@iki.fi)
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _xmlParserFeatures

        +
        protected int _xmlParserFeatures
        +
      • +
      + + + +
        +
      • +

        _xmlGeneratorFeatures

        +
        protected int _xmlGeneratorFeatures
        +
      • +
      + + + +
        +
      • +

        _xmlInputFactory

        +
        protected transient XMLInputFactory _xmlInputFactory
        +
      • +
      + + + +
        +
      • +

        _xmlOutputFactory

        +
        protected transient XMLOutputFactory _xmlOutputFactory
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
      • +
      + + + +
        +
      • +

        _jdkXmlInFactory

        +
        protected transient String _jdkXmlInFactory
        +
        Hiding place for JDK-serialization unthawed factories...
        +
      • +
      + + + +
        +
      • +

        _jdkXmlOutFactory

        +
        protected transient String _jdkXmlOutFactory
        +
        Hiding place for JDK-serialization unthawed factories...
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlFactory

        +
        public XmlFactory()
        +
        Default constructor used to create factory instances. + Creation of a factory instance is a light-weight operation, + but it is still a good idea to reuse limited number of + factory instances (and quite often just a single instance): + factories are used as context for storing some reused + processing objects (such as symbol tables parsers use) + and this reuse only works within context of a single + factory instance.
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        public XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc)
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc,
        +                     int xpFeatures,
        +                     int xgFeatures,
        +                     XMLInputFactory xmlIn,
        +                     XMLOutputFactory xmlOut,
        +                     String nameForTextElem)
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(XmlFactory src,
        +                     com.fasterxml.jackson.core.ObjectCodec oc)
        +
        +
        Since:
        +
        2.2.1
        +
        +
      • +
      + + + +
        +
      • +

        XmlFactory

        +
        protected XmlFactory(XmlFactoryBuilder b)
        +
        Constructors used by JsonFactoryBuilder for instantiation.
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        rebuild

        +
        public XmlFactoryBuilder rebuild()
        +
        +
        Overrides:
        +
        rebuild in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + + + + + +
        +
      • +

        copy

        +
        public XmlFactory copy()
        +
        Note: compared to base implementation by JsonFactory, + here the copy will actually share underlying XML input and + output factories, as there is no way to make copies of those.
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Overrides:
        +
        version in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        readResolve

        +
        protected Object readResolve()
        +
        Method that we need to override to actually make restoration go + through constructors etc.
        +
        +
        Overrides:
        +
        readResolve in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        getXMLTextElementName

        +
        public String getXMLTextElementName()
        +
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public final XmlFactory configure(FromXmlParser.Feature f,
        +                                  boolean state)
        +
        Method for enabling or disabling specified XML parser feature.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        isEnabled

        +
        public final boolean isEnabled(FromXmlParser.Feature f)
        +
        Checked whether specified XML parser feature is enabled.
        +
      • +
      + + + +
        +
      • +

        getFormatParserFeatures

        +
        public int getFormatParserFeatures()
        +
        +
        Overrides:
        +
        getFormatParserFeatures in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatGeneratorFeatures

        +
        public int getFormatGeneratorFeatures()
        +
        +
        Overrides:
        +
        getFormatGeneratorFeatures in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public final XmlFactory configure(ToXmlGenerator.Feature f,
        +                                  boolean state)
        +
        Method for enabling or disabling specified XML generator feature.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        isEnabled

        +
        public final boolean isEnabled(ToXmlGenerator.Feature f)
        +
        Check whether specified XML generator feature is enabled.
        +
      • +
      + + + +
        +
      • +

        getXMLInputFactory

        +
        public XMLInputFactory getXMLInputFactory()
        +
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        setXMLInputFactory

        +
        @Deprecated
        +public void setXMLInputFactory(XMLInputFactory f)
        +
        Deprecated. Since 2.12 -- should be set as part of build process + (either in builder, or constructor)
        +
      • +
      + + + +
        +
      • +

        getXMLOutputFactory

        +
        public XMLOutputFactory getXMLOutputFactory()
        +
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        setXMLOutputFactory

        +
        @Deprecated
        +public void setXMLOutputFactory(XMLOutputFactory f)
        +
        Deprecated. Since 2.12 -- should be set as part of build process + (either in builder, or constructor)
        +
      • +
      + + + +
        +
      • +

        getFormatName

        +
        public String getFormatName()
        +
        Method that returns short textual id identifying format + this factory supports. +

        + Note: sub-classes should override this method; default + implementation will return null for all sub-classes

        +
        +
        Overrides:
        +
        getFormatName in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        hasFormat

        +
        public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
        +                                                          throws IOException
        +
        +
        Overrides:
        +
        hasFormat in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        requiresCustomCodec

        +
        public boolean requiresCustomCodec()
        +
        XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
        +
        +
        Overrides:
        +
        requiresCustomCodec in class com.fasterxml.jackson.core.JsonFactory
        +
        Returns:
        +
        True since XML format does require support from codec
        +
        +
      • +
      + + + +
        +
      • +

        canUseCharArrays

        +
        public boolean canUseCharArrays()
        +
        As of 2.4, we do have actual capability for passing char arrays + efficiently, but unfortunately + have no working mechanism for recycling buffers. So we have to + admit that can not make efficient use.
        +
        +
        Overrides:
        +
        canUseCharArrays in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatReadFeatureType

        +
        public Class<FromXmlParser.Feature> getFormatReadFeatureType()
        +
        +
        Overrides:
        +
        getFormatReadFeatureType in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        getFormatWriteFeatureType

        +
        public Class<ToXmlGenerator.Feature> getFormatWriteFeatureType()
        +
        +
        Overrides:
        +
        getFormatWriteFeatureType in class com.fasterxml.jackson.core.JsonFactory
        +
        +
      • +
      + + + +
        +
      • +

        createParser

        +
        public com.fasterxml.jackson.core.JsonParser createParser(String content)
        +                                                   throws IOException
        +
        Overridden just to prevent trying to optimize access via char array; + while nice idea, problem is that we don't have proper hooks to ensure + that temporary buffer gets recycled; so let's just use StringReader.
        +
        +
        Overrides:
        +
        createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        createGenerator

        +
        public ToXmlGenerator createGenerator(OutputStream out,
        +                                      com.fasterxml.jackson.core.JsonEncoding enc)
        +                               throws IOException
        +
        +
        Overrides:
        +
        createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        createGenerator

        +
        public ToXmlGenerator createGenerator(File f,
        +                                      com.fasterxml.jackson.core.JsonEncoding enc)
        +                               throws IOException
        +
        +
        Overrides:
        +
        createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(InputStream in,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(Reader r,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(char[] data,
        +                                      int offset,
        +                                      int len,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt,
        +                                      boolean recycleBuffer)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createParser

        +
        protected FromXmlParser _createParser(byte[] data,
        +                                      int offset,
        +                                      int len,
        +                                      com.fasterxml.jackson.core.io.IOContext ctxt)
        +                               throws IOException
        +
        +
        Overrides:
        +
        _createParser in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _createGenerator

        +
        protected com.fasterxml.jackson.core.JsonGenerator _createGenerator(Writer out,
        +                                                                    com.fasterxml.jackson.core.io.IOContext ctxt)
        +                                                             throws IOException
        +
        +
        Overrides:
        +
        _createGenerator in class com.fasterxml.jackson.core.JsonFactory
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        hasXMLFormat

        +
        public static com.fasterxml.jackson.core.format.MatchStrength hasXMLFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
        +                                                                    throws IOException
        +
        Method that tries to figure out if content seems to be in some kind + of XML format. + Note that implementation here is not nearly as robust as what underlying + Stax parser will do; the idea is to first support common encodings, + then expand as needed (for example, it is not all that hard to support + UTF-16; but it is some work and not needed quite yet)
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html new file mode 100644 index 000000000..640e3ba3f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.html @@ -0,0 +1,706 @@ + + + + + + +XmlFactoryBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlFactoryBuilder

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlFactoryBuilder
    +extends com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
    +
    TSFBuilder + implementation for constructing XmlFactory + instances.
    +
    +
    Since:
    +
    3.0
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html new file mode 100644 index 000000000..3318ac1b3 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.Builder.html @@ -0,0 +1,404 @@ + + + + + + +XmlMapper.Builder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlMapper.Builder

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    XmlMapper
    +
    +
    +
    +
    public static class XmlMapper.Builder
    +extends com.fasterxml.jackson.databind.cfg.MapperBuilder<XmlMapper,XmlMapper.Builder>
    +
    Builder implementation for constructing XmlMapper instances.
    +
    +
    Since:
    +
    2.10
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.html new file mode 100644 index 000000000..fd3e2e591 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlMapper.html @@ -0,0 +1,860 @@ + + + + + + +XmlMapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlMapper

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Serializable
    +
    +
    +
    +
    public class XmlMapper
    +extends com.fasterxml.jackson.databind.ObjectMapper
    +
    Customized ObjectMapper that will read and write XML instead of JSON, + using XML-backed JsonFactory + implementation (XmlFactory). +

    + Mapper itself overrides some aspects of functionality to try to handle + data binding aspects as similar to JAXB as possible. +

    + Note that most of configuration should be done by pre-constructing + JacksonXmlModule explicitly, instead of relying on default settings.

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class XmlMapper.Builder +
      Builder implementation for constructing XmlMapper instances.
      +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder, com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected JacksonXmlModule_xmlModule 
      protected static JacksonXmlModuleDEFAULT_XML_MODULE 
      protected static DefaultXmlPrettyPrinterDEFAULT_XML_PRETTY_PRINTER 
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +_coercionConfigs, _configOverrides, _deserializationConfig, _deserializationContext, _injectableValues, _jsonFactory, _mixIns, _registeredModuleTypes, _rootDeserializers, _serializationConfig, _serializerFactory, _serializerProvider, _subtypeResolver, _typeFactory, DEFAULT_ANNOTATION_INTROSPECTOR, DEFAULT_BASE
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?>_constructDefaultTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      static XmlMapper.Builderbuilder() 
      static XmlMapper.Builderbuilder(XmlFactory streamFactory) 
      com.fasterxml.jackson.databind.ObjectMapperconfigure(FromXmlParser.Feature f, + boolean state) 
      com.fasterxml.jackson.databind.ObjectMapperconfigure(ToXmlGenerator.Feature f, + boolean state) 
      XmlMappercopy() 
      com.fasterxml.jackson.databind.ObjectMapperdisable(FromXmlParser.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperdisable(ToXmlGenerator.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperenable(FromXmlParser.Feature f) 
      com.fasterxml.jackson.databind.ObjectMapperenable(ToXmlGenerator.Feature f) 
      XmlFactorygetFactory() 
      <T> TreadValue(XMLStreamReader r, + Class<T> valueType) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      <T> TreadValue(XMLStreamReader r, + com.fasterxml.jackson.databind.JavaType valueType) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      <T> TreadValue(XMLStreamReader r, + com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) +
      Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
      +
      XmlMappersetDefaultUseWrapper(boolean state) +
      Deprecated.  + +
      +
      protected voidsetXMLTextElementName(String name) +
      Deprecated.  + +
      +
      com.fasterxml.jackson.core.Versionversion() 
      voidwriteValue(XMLStreamWriter w0, + Object value) +
      Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
      +
      static XmlMapper.BuilderxmlBuilder() 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ObjectMapper

        +_assertNotNull, _checkInvalidCopy, _configAndWriteValue, _convert, _findRootDeserializer, _initForReading, _initForReading, _newReader, _newReader, _newWriter, _newWriter, _newWriter, _readMapAndClose, _readTreeAndClose, _readValue, _serializerProvider, _verifyNoTrailingTokens, _verifySchemaType, _writeValueAndClose, acceptJsonFormatVisitor, acceptJsonFormatVisitor, activateDefaultTyping, activateDefaultTyping, activateDefaultTyping, activateDefaultTypingAsProperty, addHandler, addMixIn, addMixInAnnotations, canDeserialize, canDeserialize, canSerialize, canSerialize, clearProblemHandlers, coercionConfigDefaults, coercionConfigFor, coercionConfigFor, configOverride, configure, configure, configure, configure, configure, constructType, constructType, convertValue, convertValue, convertValue, createArrayNode, createDeserializationContext, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createNonBlockingByteArrayParser, createObjectNode, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, deactivateDefaultTyping, defaultClassIntrospector, disable, disable, disable, disable, disable, disable, disable, disableDefaultTyping, enable, enable, enable, enable, enable, enable, enable, enableDefaultTyping, enableDefaultTyping, enableDefaultTyping, enableDefaultTypingAsProperty, findAndRegisterModules, findMixInClassFor, findModules, findModules, generateJsonSchema, getDateFormat, getDeserializationConfig, getDeserializationContext, getInjectableValues, getJsonFactory, getNodeFactory, getPolymorphicTypeValidator, getPropertyNamingStrategy, getRegisteredModuleIds, getSerializationConfig, getSerializerFactory, getSerializerProvider, getSerializerProviderInstance, getSubtypeResolver, getTypeFactory, getVisibilityChecker, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, missingNode, mixInCount, nullNode, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, reader, readerFor, readerFor, readerFor, readerForArrayOf, readerForListOf, readerForMapOf, readerForUpdating, readerWithView, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, readValues, registerModule, registerModules, registerModules, registerSubtypes, registerSubtypes, registerSubtypes, setAccessorNaming, setAnnotationIntrospector, setAnnotationIntrospectors, setBase64Variant, setConfig, setConfig, setConstructorDetector, setDateFormat, setDefaultLeniency, setDefaultMergeable, setDefaultPrettyPrinter, setDefaultPropertyInclusion, setDefaultPropertyInclusion, setDefaultSetterInfo, setDefaultTyping, setDefaultVisibility, setFilterProvider, setFilters, setHandlerInstantiator, setInjectableValues, setLocale, setMixInAnnotations, setMixInResolver, setMixIns, setNodeFactory, setPolymorphicTypeValidator, setPropertyInclusion, setPropertyNamingStrategy, setSerializationInclusion, setSerializerFactory, setSerializerProvider, setSubtypeResolver, setTimeZone, setTypeFactory, setVisibility, setVisibility, setVisibilityChecker, tokenStreamFactory, treeAsTokens, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithType, writerWithType, writerWithType, writerWithView, writeTree, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + + + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        copy

        +
        public XmlMapper copy()
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Overrides:
        +
        version in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + +
        +
      • +

        _constructDefaultTypeResolverBuilder

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> _constructDefaultTypeResolverBuilder(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability,
        +                                                                                                              com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
        +
        Overrides:
        +
        _constructDefaultTypeResolverBuilder in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getFactory

        +
        public XmlFactory getFactory()
        +
        +
        Overrides:
        +
        getFactory in class com.fasterxml.jackson.databind.ObjectMapper
        +
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public com.fasterxml.jackson.databind.ObjectMapper configure(ToXmlGenerator.Feature f,
        +                                                             boolean state)
        +
      • +
      + + + +
        +
      • +

        configure

        +
        public com.fasterxml.jackson.databind.ObjectMapper configure(FromXmlParser.Feature f,
        +                                                             boolean state)
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       Class<T> valueType)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        readValue

        +
        public <T> T readValue(XMLStreamReader r,
        +                       com.fasterxml.jackson.databind.JavaType valueType)
        +                throws IOException
        +
        Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      + + + +
        +
      • +

        writeValue

        +
        public void writeValue(XMLStreamWriter w0,
        +                       Object value)
        +                throws IOException
        +
        Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.4
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html new file mode 100644 index 000000000..82828571f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.html @@ -0,0 +1,606 @@ + + + + + + +XmlPrettyPrinter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Interface XmlPrettyPrinter

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    com.fasterxml.jackson.core.PrettyPrinter
    +
    +
    +
    All Known Implementing Classes:
    +
    DefaultXmlPrettyPrinter
    +
    +
    +
    +
    public interface XmlPrettyPrinter
    +extends com.fasterxml.jackson.core.PrettyPrinter
    +
    There are some XML-specific quirks that need extra TLC when + indenting: so we will use a refinement of general purpose one.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from interface com.fasterxml.jackson.core.PrettyPrinter

        +DEFAULT_ROOT_VALUE_SEPARATOR, DEFAULT_SEPARATORS
      • +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      voidwriteEndElement(org.codehaus.stax2.XMLStreamWriter2 sw, + int nrOfEntries) +
      Method for forcibly writing an end element, without going + through Jackson generator (and thus, without updating currently + active element stack)
      +
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + org.codehaus.stax2.typed.Base64Variant base64variant, + byte[] data, + int offset, + int len) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + BigDecimal value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + BigInteger value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + boolean value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + char[] buffer, + int offset, + int len, + boolean isCData) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + double value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + float value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + int value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + long value) 
      voidwriteLeafElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName, + String text, + boolean isCData) 
      voidwriteLeafNullElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName) 
      voidwritePrologLinefeed(org.codehaus.stax2.XMLStreamWriter2 sw) +
      Method for trying to write a linefeed to separate entities outside of the + root element (that is, in prolog or epilog), most often called to separate + XML declaration from the root element.
      +
      voidwriteStartElement(org.codehaus.stax2.XMLStreamWriter2 sw, + String nsURI, + String localName) +
      Method for forcibly writing a start element, without going + through Jackson generator (and thus, without updating currently + active element stack)
      +
      +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.core.PrettyPrinter

        +beforeArrayValues, beforeObjectEntries, writeArrayValueSeparator, writeEndArray, writeEndObject, writeObjectEntrySeparator, writeObjectFieldValueSeparator, writeRootValueSeparator, writeStartArray, writeStartObject
      • +
      +
    • +
    +
  • +
+
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html new file mode 100644 index 000000000..5682f1696 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlClassNameIdResolver.html @@ -0,0 +1,361 @@ + + + + + + +XmlTypeResolverBuilder.XmlClassNameIdResolver (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder.XmlClassNameIdResolver

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    +
    +
    +
    Enclosing class:
    +
    XmlTypeResolverBuilder
    +
    +
    +
    +
    protected static class XmlTypeResolverBuilder.XmlClassNameIdResolver
    +extends com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_subTypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +_baseType, _typeFactory
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.type.TypeFactory typeFactory, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlClassNameIdResolver

        +
        public XmlClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
        +                              com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
        +                              com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        idFromValue

        +
        public String idFromValue(Object value)
        +
        +
        Specified by:
        +
        idFromValue in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        idFromValue in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        +
      • +
      + + + +
        +
      • +

        typeFromId

        +
        public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context,
        +                                                          String id)
        +                                                   throws IOException
        +
        +
        Specified by:
        +
        typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        typeFromId in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html new file mode 100644 index 000000000..09f31cd6e --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html @@ -0,0 +1,380 @@ + + + + + + +XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    +
    +
    +
    Enclosing class:
    +
    XmlTypeResolverBuilder
    +
    +
    +
    +
    protected static class XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
    +extends com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver

        +_basePackageName, _basePackagePrefix
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_subTypeValidator
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +_baseType, _typeFactory
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlMinimalClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.type.TypeFactory typeFactory, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      StringidFromValue(Object value) 
      com.fasterxml.jackson.databind.JavaTypetypeFromId(com.fasterxml.jackson.databind.DatabindContext context, + String id) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver

        +_typeFromId, construct, getMechanism
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver

        +_idFrom, getDescForKnownTypeIds, idFromValueAndType, registerSubtype
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase

        +idFromBaseType, init
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlMinimalClassNameIdResolver

        +
        public XmlMinimalClassNameIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
        +                                     com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
        +                                     com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        idFromValue

        +
        public String idFromValue(Object value)
        +
        +
        Specified by:
        +
        idFromValue in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        idFromValue in class com.fasterxml.jackson.databind.jsontype.impl.MinimalClassNameIdResolver
        +
        +
      • +
      + + + +
        +
      • +

        typeFromId

        +
        public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context,
        +                                                          String id)
        +                                                   throws IOException
        +
        +
        Specified by:
        +
        typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
        +
        Overrides:
        +
        typeFromId in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html new file mode 100644 index 000000000..a7df61290 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.html @@ -0,0 +1,420 @@ + + + + + + +XmlTypeResolverBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml
+

Class XmlTypeResolverBuilder

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
    +
    +
    +
    +
    public class XmlTypeResolverBuilder
    +extends com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
    +
    Custom specialization of StdTypeResolverBuilder; needed so that + type id property name can be modified as necessary to make it legal + XML element or attribute name.
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +_customIdResolver, _defaultImpl, _idType, _includeAs, _typeIdVisible, _typeProperty
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected static StringdecodeXmlClassName(String className) +
      Helper method for decoding "XML safe" Java class name back into + actual class name
      +
      protected static StringencodeXmlClassName(String className) +
      Helper method for encoding regular Java class name in form that + can be used as XML element name.
      +
      protected com.fasterxml.jackson.databind.jsontype.TypeIdResolveridResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, + com.fasterxml.jackson.databind.JavaType baseType, + com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, + Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, + boolean forSer, + boolean forDeser) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilderinit(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType, + com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes) 
      com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuildertypeProperty(String typeIdPropName) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

        +allowPrimitiveTypes, buildTypeDeserializer, buildTypeSerializer, defaultImpl, defineDefaultImpl, getDefaultImpl, getTypeProperty, inclusion, isTypeIdVisible, noTypeInfoBuilder, reportInvalidBaseType, subTypeValidator, typeIdVisibility, verifyBaseTypeValidity
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTypeResolverBuilder

        +
        public XmlTypeResolverBuilder()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
        +                                                                                com.fasterxml.jackson.databind.jsontype.TypeIdResolver idRes)
        +
        +
        Specified by:
        +
        init in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        init in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        typeProperty

        +
        public com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder typeProperty(String typeIdPropName)
        +
        +
        Specified by:
        +
        typeProperty in interface com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>
        +
        Overrides:
        +
        typeProperty in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        idResolver

        +
        protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config,
        +                                                                            com.fasterxml.jackson.databind.JavaType baseType,
        +                                                                            com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator,
        +                                                                            Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes,
        +                                                                            boolean forSer,
        +                                                                            boolean forDeser)
        +
        +
        Overrides:
        +
        idResolver in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
        +
        +
      • +
      + + + +
        +
      • +

        encodeXmlClassName

        +
        protected static String encodeXmlClassName(String className)
        +
        Helper method for encoding regular Java class name in form that + can be used as XML element name.
        +
      • +
      + + + +
        +
      • +

        decodeXmlClassName

        +
        protected static String decodeXmlClassName(String className)
        +
        Helper method for decoding "XML safe" Java class name back into + actual class name
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html new file mode 100644 index 000000000..88aa65286 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.html @@ -0,0 +1,227 @@ + + + + + + +JacksonXmlCData (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlCData

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      booleanvalue +
      Whether the property text should always be within a CDATA section + when serialized.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        value

        +
        public abstract boolean value
        +
        Whether the property text should always be within a CDATA section + when serialized. Has no meaning for deserialization; content may come from + any legal character data section (CDATA or regular text segment).
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html new file mode 100644 index 000000000..162966bfb --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.html @@ -0,0 +1,321 @@ + + + + + + +JacksonXmlElementWrapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlElementWrapper

+
+
+
+
    +
  • +
    +
    +
    @Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlElementWrapper
    +
    Annotation that is similar to JAXB javax.xml.bind.annotation.XmlElementWrapper, + to indicate wrapper element to use (if any) for Collection types (arrays, + Collection). If defined, a separate container (wrapper) element + is used; if not, entries are written without wrapping.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeFields and Description
      static StringUSE_PROPERTY_NAME +
      Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
      +
      +
    • +
    + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      StringlocalName 
      Stringnamespace 
      booleanuseWrapping +
      Optional property that can be used to explicitly disable wrapping, + usually via mix-ins, or when using AnnotationIntrospector + pairs.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        USE_PROPERTY_NAME

        +
        public static final String USE_PROPERTY_NAME
        +
        Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        useWrapping

        +
        public abstract boolean useWrapping
        +
        Optional property that can be used to explicitly disable wrapping, + usually via mix-ins, or when using AnnotationIntrospector + pairs.
        +
        +
        Since:
        +
        2.1
        +
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html new file mode 100644 index 000000000..82944cf87 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.html @@ -0,0 +1,281 @@ + + + + + + +JacksonXmlProperty (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlProperty

+
+
+
+
    +
  • +
    +
    +
    @Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlProperty
    +
    Annotation that can be used to provide XML-specific configuration + for properties, above and beyond what + JsonProperty contains. + It is mainly an alternative to using JAXB annotations. +

    + Note that annotation may be used on +

      +
    • Fields +
    • +
    • Setter and getter methods +
    • +
    • Arguments (parameters) of "Creators" -- annotated constructors and/or + static factory methods +
    • +
    + but it can NOT be used on argument/parameter of setter methods (or rather + while compiler allows that, will have no effect) -- setter method itself + needs to be annotated. +

    + Note that since 2.12 there is no need to use this property over + JsonProperty just to define XML namespace, + as @JsonProperty has namespace property.

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        isAttribute

        +
        public abstract boolean isAttribute
        +
        +
        Default:
        +
        false
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html new file mode 100644 index 000000000..e2fab9941 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.html @@ -0,0 +1,254 @@ + + + + + + +JacksonXmlRootElement (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlRootElement

+
+
+
+
    +
  • +
    +
    +
    @Target(value={ANNOTATION_TYPE,TYPE})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlRootElement
    +
    Annotation that can be used to define name of root element used + for the root-level object when serialized, which normally uses + name of the type (class). It is similar to JAXB XmlRootElement + and basically an alias for standard Jackson annotation + JsonRootName (which you should + usually use instead). +

    + Note that annotation has no effect on non-root elements: regular property + values and so on; their name is derived from getter/setter/field, not + from type itself. +

    + NOTE! Since 2.4 this annotation is usually not necessary and you should use + JsonRootName instead. + About the only expected usage may be to have different root name for XML + content than other formats.

    +
  • +
+
+
+
    +
  • + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        namespace

        +
        public abstract String namespace
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
      +
    • + + +
        +
      • +

        localName

        +
        public abstract String localName
        +
        +
        Default:
        +
        ""
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html new file mode 100644 index 000000000..b57bd1cef --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.html @@ -0,0 +1,238 @@ + + + + + + +JacksonXmlText (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.annotation
+

Annotation Type JacksonXmlText

+
+
+
+
    +
  • +
    +
    +
    @Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
    + @Retention(value=RUNTIME)
    +public @interface JacksonXmlText
    +
    Interface that is loosely similar to XmlValue + in that it can be used on one (and only one!) property of a POJO. + It will result in value of the property be serialized without element wrapper, + as long as there are no element-wrapped other properties (attribute-valued + properties are acceptable). + It is also somewhat similar to core Jackson JsonValue annotation; but + has to be separate as JsonValue does not allow any other + properties. +

    + Note that only one such property is allowed on a POJO: if multiple properties + are annotated, behavior is not defined. +

    + Internally properties annotated will be considered to be properties with + no name (that is, with marker "" (empty String)).

    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      booleanvalue +
      Whether serialization of the property should always be done as basic + XML text or not; if true, will be, if false, not.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        value

        +
        public abstract boolean value
        +
        Whether serialization of the property should always be done as basic + XML text or not; if true, will be, if false, not.
        +
        +
        Default:
        +
        true
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html new file mode 100644 index 000000000..9289823c1 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlCData.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html new file mode 100644 index 000000000..6546d997f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlElementWrapper.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html new file mode 100644 index 000000000..0685a0cdf --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlProperty.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html new file mode 100644 index 000000000..2eb50956b --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlRootElement.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html new file mode 100644 index 000000000..72b470794 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/class-use/JacksonXmlText.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html new file mode 100644 index 000000000..005ccb98d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-frame.html @@ -0,0 +1,25 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.annotation

+
+

Annotation Types

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html new file mode 100644 index 000000000..4cf9f4d56 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-summary.html @@ -0,0 +1,191 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.annotation

+
+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+

See: Description

+
+
+ + + + +

Package com.fasterxml.jackson.dataformat.xml.annotation Description

+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html new file mode 100644 index 000000000..6052fc7e0 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.annotation Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.annotation

+Package Hierarchies: + +
+
+

Annotation Type Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html new file mode 100644 index 000000000..c2258dbf4 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/annotation/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.annotation (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.annotation

+
+
No usage of com.fasterxml.jackson.dataformat.xml.annotation
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html new file mode 100644 index 000000000..b790c6c52 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/DefaultingXmlTypeResolverBuilder.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder

+
+
No usage of com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html new file mode 100644 index 000000000..a2bbcaa77 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlAnnotationIntrospector.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector

+
+
No usage of com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html new file mode 100644 index 000000000..66ba8d37d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/JacksonXmlModule.html @@ -0,0 +1,189 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.JacksonXmlModule

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html new file mode 100644 index 000000000..68c2c359e --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/PackageVersion.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.PackageVersion (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.PackageVersion

+
+
No usage of com.fasterxml.jackson.dataformat.xml.PackageVersion
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html new file mode 100644 index 000000000..373a19fd5 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.JaxbWrapper.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html new file mode 100644 index 000000000..7bb8aef3e --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.Pair.html @@ -0,0 +1,171 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html new file mode 100644 index 000000000..b6c2b0c45 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlAnnotationIntrospector.html @@ -0,0 +1,232 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html new file mode 100644 index 000000000..f1d7479c1 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactory.html @@ -0,0 +1,255 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlFactory (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlFactory

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html new file mode 100644 index 000000000..b2846e51b --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlFactoryBuilder.html @@ -0,0 +1,245 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html new file mode 100644 index 000000000..ebdb94336 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.Builder.html @@ -0,0 +1,212 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html new file mode 100644 index 000000000..73766b231 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlMapper.html @@ -0,0 +1,192 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlMapper (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlMapper

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html new file mode 100644 index 000000000..fd8c6b94a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlPrettyPrinter.html @@ -0,0 +1,193 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html new file mode 100644 index 000000000..25924074d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlClassNameIdResolver.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html new file mode 100644 index 000000000..93853be51 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html new file mode 100644 index 000000000..2df855453 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/class-use/XmlTypeResolverBuilder.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder

+
+
No usage of com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html new file mode 100644 index 000000000..c2bdd0f93 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.Feature.html @@ -0,0 +1,428 @@ + + + + + + +FromXmlParser.Feature (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Enum FromXmlParser.Feature

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.FormatFeature, com.fasterxml.jackson.core.util.JacksonFeature, Serializable, Comparable<FromXmlParser.Feature>
    +
    +
    +
    Enclosing class:
    +
    FromXmlParser
    +
    +
    +
    +
    public static enum FromXmlParser.Feature
    +extends Enum<FromXmlParser.Feature>
    +implements com.fasterxml.jackson.core.FormatFeature
    +
    Enumeration that defines all togglable features for XML parsers.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        EMPTY_ELEMENT_AS_NULL

        +
        public static final FromXmlParser.Feature EMPTY_ELEMENT_AS_NULL
        +
        Feature that indicates whether XML Empty elements (ones where there are + no separate start and end tages, but just one tag that ends with "/>") + are exposed as JsonToken.VALUE_NULL) or not. If they are not + returned as `null` tokens, they will be returned as JsonToken.VALUE_STRING + tokens with textual value of "" (empty String). +

        + Default setting was true (for backwards compatibility from 2.9 to 2.11 (inclusive) + but was changed in 2.12 to be false (see [dataformat-xml#411] for details)

        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static FromXmlParser.Feature[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (FromXmlParser.Feature c : FromXmlParser.Feature.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static FromXmlParser.Feature valueOf(String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum type has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        collectDefaults

        +
        public static int collectDefaults()
        +
        Method that calculates bit set (flags) of all features that + are enabled by default.
        +
      • +
      + + + +
        +
      • +

        enabledByDefault

        +
        public boolean enabledByDefault()
        +
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      + + + +
        +
      • +

        getMask

        +
        public int getMask()
        +
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      + + + +
        +
      • +

        enabledIn

        +
        public boolean enabledIn(int flags)
        +
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html new file mode 100644 index 000000000..1a9bc5393 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.html @@ -0,0 +1,1827 @@ + + + + + + +FromXmlParser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class FromXmlParser

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Closeable, AutoCloseable
    +
    +
    +
    +
    public class FromXmlParser
    +extends com.fasterxml.jackson.core.base.ParserMinimalBase
    +
    JsonParser implementation that exposes XML structure as + set of JSON events that can be used for data binding.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class FromXmlParser.Feature +
      Enumeration that defines all togglable features for XML parsers.
      +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser

        +com.fasterxml.jackson.core.JsonParser.NumberType
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected byte[]_binaryValue +
      We will hold on to decoded binary data, for duration of + current event, so that multiple calls to + getBinaryValue(com.fasterxml.jackson.core.Base64Variant) will not need to decode data more + than once.
      +
      protected com.fasterxml.jackson.core.util.ByteArrayBuilder_byteArrayBuilder +
      ByteArrayBuilder is needed if 'getBinaryValue' is called.
      +
      protected String_cfgNameForTextElement +
      In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
      +
      protected boolean_closed +
      Flag that indicates whether parser is closed or not.
      +
      protected String_currText 
      protected int_formatFeatures +
      Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
      +
      protected com.fasterxml.jackson.core.io.IOContext_ioContext 
      protected boolean_mayBeLeaf +
      We need special handling to keep track of whether a value + may be exposed as simple leaf value.
      +
      protected com.fasterxml.jackson.core.JsonToken_nextToken 
      protected BigInteger_numberBigInt 
      protected int_numberInt 
      protected long_numberLong 
      protected int_numTypesValid +
      Bitfield that indicates which numeric representations + have been calculated for the current type
      +
      protected com.fasterxml.jackson.core.ObjectCodec_objectCodec 
      protected XmlReadContext_parsingContext +
      Information about parser context, context in which + the next token is to be parsed (root, array, object).
      +
      protected XmlTokenStream_xmlTokens 
      static StringDEFAULT_UNNAMED_TEXT_PROPERTY +
      The default name placeholder for XML text segments is empty + String ("").
      +
      protected static com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability>XML_READ_CAPABILITIES +
      XML format has some peculiarities, indicated via new (2.12) capability + system.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

        +_currToken, _lastClearedToken, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_TAB, MAX_ERROR_TOKEN_LENGTH, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MIN_INT_D, MIN_INT_L, MIN_LONG_D, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.JsonParser

        +_features, _requestPayload, DEFAULT_READ_CAPABILITIES
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FromXmlParser(com.fasterxml.jackson.core.io.IOContext ctxt, + int genericParserFeatures, + int xmlFeatures, + com.fasterxml.jackson.core.ObjectCodec codec, + XMLStreamReader xmlReader) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      protected void_checkNumericValue(int expType) 
      protected BigDecimal_convertNumberToBigDecimal() 
      protected void_convertNumberToBigInteger() 
      protected double_convertNumberToDouble() 
      protected float_convertNumberToFloat() 
      protected void_convertNumberToInt() 
      protected void_convertNumberToLong() 
      protected byte[]_decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant) 
      protected com.fasterxml.jackson.core.util.ByteArrayBuilder_getByteArrayBuilder() 
      protected void_handleEOF() +
      Method called when an EOF is encountered between tokens.
      +
      protected int_isIntNumber(String text) 
      protected int_nextToken() 
      protected void_releaseBuffers() +
      Method called to release internal buffers owned by the base + parser.
      +
      protected void_skipEndElement() 
      voidaddVirtualWrapping(Set<String> namesToWrap) +
      Deprecated. 
      +
      voidaddVirtualWrapping(Set<String> namesToWrap0, + boolean caseInsensitive) +
      Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements.
      +
      booleancanReadObjectId() 
      booleancanReadTypeId() 
      voidclose() 
      FromXmlParserconfigure(FromXmlParser.Feature f, + boolean state) 
      FromXmlParserdisable(FromXmlParser.Feature f) 
      FromXmlParserenable(FromXmlParser.Feature f) 
      BigIntegergetBigIntegerValue() 
      byte[]getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant) 
      com.fasterxml.jackson.core.ObjectCodecgetCodec() 
      com.fasterxml.jackson.core.JsonLocationgetCurrentLocation() +
      Method that returns location of the last processed character; + usually for error reporting purposes
      +
      StringgetCurrentName() +
      Method that can be called to get the name associated with + the current event.
      +
      BigDecimalgetDecimalValue() 
      doublegetDoubleValue() 
      ObjectgetEmbeddedObject() 
      floatgetFloatValue() 
      intgetFormatFeatures() 
      intgetIntValue() 
      longgetLongValue() 
      com.fasterxml.jackson.core.JsonParser.NumberTypegetNumberType() 
      NumbergetNumberValue() 
      XmlReadContextgetParsingContext() 
      com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability>getReadCapabilities() 
      XMLStreamReadergetStaxReader() +
      Method that allows application direct access to underlying + Stax XMLStreamWriter.
      +
      StringgetText() 
      intgetText(Writer writer) 
      char[]getTextCharacters() 
      intgetTextLength() 
      intgetTextOffset() 
      com.fasterxml.jackson.core.JsonLocationgetTokenLocation() +
      Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
      +
      booleanhasTextCharacters() +
      XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
      +
      booleanisClosed() 
      booleanisEnabled(FromXmlParser.Feature f) 
      booleanisExpectedNumberIntToken() +
      Since xml representation can not really distinguish between different + scalar types (numbers, booleans) -- they are all just Character Data, + without schema -- we can try to infer type from intent here.
      +
      booleanisExpectedStartArrayToken() +
      Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
      +
      booleanisNaN() 
      StringnextTextValue() +
      Method overridden to support more reliable deserialization of + String collections.
      +
      com.fasterxml.jackson.core.JsonTokennextToken() 
      voidoverrideCurrentName(String name) 
      com.fasterxml.jackson.core.JsonParseroverrideFormatFeatures(int values, + int mask) 
      booleanrequiresCustomCodec() +
      XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
      +
      voidsetCodec(com.fasterxml.jackson.core.ObjectCodec c) 
      voidsetXMLTextElementName(String name) 
      com.fasterxml.jackson.core.Versionversion() 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

        +_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.core.JsonParser

        +_codec, _constructError, _reportUnsupportedOperation, canParseAsync, canUseSchema, configure, currentName, disable, enable, finishToken, getBinaryValue, getBooleanValue, getByteValue, getCurrentValue, getFeatureMask, getInputSource, getNonBlockingInputFeeder, getNumberValueExact, getObjectId, getSchema, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, overrideStdFeatures, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, setCurrentValue, setFeatureMask, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError, setSchema
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_UNNAMED_TEXT_PROPERTY

        +
        public static final String DEFAULT_UNNAMED_TEXT_PROPERTY
        +
        The default name placeholder for XML text segments is empty + String ("").
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        XML_READ_CAPABILITIES

        +
        protected static final com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> XML_READ_CAPABILITIES
        +
        XML format has some peculiarities, indicated via new (2.12) capability + system.
        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        _cfgNameForTextElement

        +
        protected String _cfgNameForTextElement
        +
        In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name. +

        + Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use). Defaults to empty String, but + may be changed for inter-operability reasons: JAXB, for example, uses + "value" as name.

        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _objectCodec

        +
        protected com.fasterxml.jackson.core.ObjectCodec _objectCodec
        +
      • +
      + + + +
        +
      • +

        _closed

        +
        protected boolean _closed
        +
        Flag that indicates whether parser is closed or not. Gets + set when parser is either closed by explicit call + (close()) or when end-of-input is reached.
        +
      • +
      + + + +
        +
      • +

        _ioContext

        +
        protected final com.fasterxml.jackson.core.io.IOContext _ioContext
        +
      • +
      + + + +
        +
      • +

        _parsingContext

        +
        protected XmlReadContext _parsingContext
        +
        Information about parser context, context in which + the next token is to be parsed (root, array, object).
        +
      • +
      + + + + + + + +
        +
      • +

        _mayBeLeaf

        +
        protected boolean _mayBeLeaf
        +
        We need special handling to keep track of whether a value + may be exposed as simple leaf value.
        +
      • +
      + + + +
        +
      • +

        _nextToken

        +
        protected com.fasterxml.jackson.core.JsonToken _nextToken
        +
      • +
      + + + +
        +
      • +

        _currText

        +
        protected String _currText
        +
      • +
      + + + +
        +
      • +

        _byteArrayBuilder

        +
        protected com.fasterxml.jackson.core.util.ByteArrayBuilder _byteArrayBuilder
        +
        ByteArrayBuilder is needed if 'getBinaryValue' is called. If so, + we better reuse it for remainder of content.
        +
      • +
      + + + + + + + +
        +
      • +

        _numTypesValid

        +
        protected int _numTypesValid
        +
        Bitfield that indicates which numeric representations + have been calculated for the current type
        +
      • +
      + + + +
        +
      • +

        _numberInt

        +
        protected int _numberInt
        +
      • +
      + + + +
        +
      • +

        _numberLong

        +
        protected long _numberLong
        +
      • +
      + + + +
        +
      • +

        _numberBigInt

        +
        protected BigInteger _numberBigInt
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FromXmlParser

        +
        public FromXmlParser(com.fasterxml.jackson.core.io.IOContext ctxt,
        +                     int genericParserFeatures,
        +                     int xmlFeatures,
        +                     com.fasterxml.jackson.core.ObjectCodec codec,
        +                     XMLStreamReader xmlReader)
        +              throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        version

        +
        public com.fasterxml.jackson.core.Version version()
        +
        +
        Specified by:
        +
        version in interface com.fasterxml.jackson.core.Versioned
        +
        Specified by:
        +
        version in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getCodec

        +
        public com.fasterxml.jackson.core.ObjectCodec getCodec()
        +
        +
        Specified by:
        +
        getCodec in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        setCodec

        +
        public void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
        +
        +
        Specified by:
        +
        setCodec in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        setXMLTextElementName

        +
        public void setXMLTextElementName(String name)
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        requiresCustomCodec

        +
        public boolean requiresCustomCodec()
        +
        XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
        +
        +
        Overrides:
        +
        requiresCustomCodec in class com.fasterxml.jackson.core.JsonParser
        +
        Returns:
        +
        True since XML format does require support from codec
        +
        +
      • +
      + + + +
        +
      • +

        canReadObjectId

        +
        public boolean canReadObjectId()
        +
        +
        Overrides:
        +
        canReadObjectId in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        canReadTypeId

        +
        public boolean canReadTypeId()
        +
        +
        Overrides:
        +
        canReadTypeId in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getReadCapabilities

        +
        public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> getReadCapabilities()
        +
        +
        Overrides:
        +
        getReadCapabilities in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        getFormatFeatures

        +
        public int getFormatFeatures()
        +
        +
        Overrides:
        +
        getFormatFeatures in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        overrideFormatFeatures

        +
        public com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values,
        +                                                                    int mask)
        +
        +
        Overrides:
        +
        overrideFormatFeatures in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getStaxReader

        +
        public XMLStreamReader getStaxReader()
        +
        Method that allows application direct access to underlying + Stax XMLStreamWriter. Note that use of writer is + discouraged, and may interfere with processing of this writer; + however, occasionally it may be necessary. +

        + Note: writer instance will always be of type + XMLStreamWriter2 (including + Typed Access API) so upcasts are safe.

        +
      • +
      + + + +
        +
      • +

        addVirtualWrapping

        +
        public void addVirtualWrapping(Set<String> namesToWrap0,
        +                               boolean caseInsensitive)
        +
        Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements. This is needed for supporting + handling of so-called "unwrapped" array types, something + XML mappings like JAXB often use. +

        + NOTE: this method is considered part of internal implementation + interface, and it is NOT guaranteed to remain unchanged + between minor versions (it is however expected not to change in + patch versions). So if you have to use it, be prepared for + possible additional work.

        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        addVirtualWrapping

        +
        @Deprecated
        +public void addVirtualWrapping(Set<String> namesToWrap)
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        getCurrentName

        +
        public String getCurrentName()
        +                      throws IOException
        +
        Method that can be called to get the name associated with + the current event.
        +
        +
        Specified by:
        +
        getCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        overrideCurrentName

        +
        public void overrideCurrentName(String name)
        +
        +
        Specified by:
        +
        overrideCurrentName in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + + + + + +
        +
      • +

        isClosed

        +
        public boolean isClosed()
        +
        +
        Specified by:
        +
        isClosed in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getParsingContext

        +
        public XmlReadContext getParsingContext()
        +
        +
        Specified by:
        +
        getParsingContext in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getTokenLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
        +
        Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
        +
        +
        Specified by:
        +
        getTokenLocation in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getCurrentLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
        +
        Method that returns location of the last processed character; + usually for error reporting purposes
        +
        +
        Specified by:
        +
        getCurrentLocation in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        isExpectedStartArrayToken

        +
        public boolean isExpectedStartArrayToken()
        +
        Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
        +
        +
        Overrides:
        +
        isExpectedStartArrayToken in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        isExpectedNumberIntToken

        +
        public boolean isExpectedNumberIntToken()
        +
        Since xml representation can not really distinguish between different + scalar types (numbers, booleans) -- they are all just Character Data, + without schema -- we can try to infer type from intent here. + The main benefit is avoiding checks for coercion.
        +
        +
        Overrides:
        +
        isExpectedNumberIntToken in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        nextToken

        +
        public com.fasterxml.jackson.core.JsonToken nextToken()
        +                                               throws IOException
        +
        +
        Specified by:
        +
        nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        nextTextValue

        +
        public String nextTextValue()
        +                     throws IOException
        +
        Method overridden to support more reliable deserialization of + String collections.
        +
        +
        Overrides:
        +
        nextTextValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public String getText()
        +               throws IOException
        +
        +
        Specified by:
        +
        getText in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextCharacters

        +
        public char[] getTextCharacters()
        +                         throws IOException
        +
        +
        Specified by:
        +
        getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextLength

        +
        public int getTextLength()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getTextOffset

        +
        public int getTextOffset()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        hasTextCharacters

        +
        public boolean hasTextCharacters()
        +
        XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
        +
        +
        Specified by:
        +
        hasTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public int getText(Writer writer)
        +            throws IOException
        +
        +
        Overrides:
        +
        getText in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getEmbeddedObject

        +
        public Object getEmbeddedObject()
        +                         throws IOException
        +
        +
        Overrides:
        +
        getEmbeddedObject in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getBinaryValue

        +
        public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant b64variant)
        +                      throws IOException
        +
        +
        Specified by:
        +
        getBinaryValue in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _decodeBase64

        +
        protected byte[] _decodeBase64(com.fasterxml.jackson.core.Base64Variant b64variant)
        +                        throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        isNaN

        +
        public boolean isNaN()
        +
        +
        Overrides:
        +
        isNaN in class com.fasterxml.jackson.core.JsonParser
        +
        +
      • +
      + + + +
        +
      • +

        getNumberType

        +
        public com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
        +                                                               throws IOException
        +
        +
        Specified by:
        +
        getNumberType in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getNumberValue

        +
        public Number getNumberValue()
        +                      throws IOException
        +
        +
        Specified by:
        +
        getNumberValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getIntValue

        +
        public int getIntValue()
        +                throws IOException
        +
        +
        Specified by:
        +
        getIntValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getLongValue

        +
        public long getLongValue()
        +                  throws IOException
        +
        +
        Specified by:
        +
        getLongValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getBigIntegerValue

        +
        public BigInteger getBigIntegerValue()
        +                              throws IOException
        +
        +
        Specified by:
        +
        getBigIntegerValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getFloatValue

        +
        public float getFloatValue()
        +                    throws IOException
        +
        +
        Specified by:
        +
        getFloatValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getDoubleValue

        +
        public double getDoubleValue()
        +                      throws IOException
        +
        +
        Specified by:
        +
        getDoubleValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        getDecimalValue

        +
        public BigDecimal getDecimalValue()
        +                           throws IOException
        +
        +
        Specified by:
        +
        getDecimalValue in class com.fasterxml.jackson.core.JsonParser
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _checkNumericValue

        +
        protected final void _checkNumericValue(int expType)
        +                                 throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _isIntNumber

        +
        protected final int _isIntNumber(String text)
        +
      • +
      + + + +
        +
      • +

        _convertNumberToInt

        +
        protected void _convertNumberToInt()
        +                            throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _convertNumberToLong

        +
        protected void _convertNumberToLong()
        +                             throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _convertNumberToBigInteger

        +
        protected void _convertNumberToBigInteger()
        +                                   throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _convertNumberToFloat

        +
        protected float _convertNumberToFloat()
        +                               throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _convertNumberToDouble

        +
        protected double _convertNumberToDouble()
        +                                 throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        _handleEOF

        +
        protected void _handleEOF()
        +                   throws com.fasterxml.jackson.core.JsonParseException
        +
        Method called when an EOF is encountered between tokens. + If so, it may be a legitimate EOF, but only iff there + is no open non-root context.
        +
        +
        Specified by:
        +
        _handleEOF in class com.fasterxml.jackson.core.base.ParserMinimalBase
        +
        Throws:
        +
        com.fasterxml.jackson.core.JsonParseException
        +
        +
      • +
      + + + +
        +
      • +

        _releaseBuffers

        +
        protected void _releaseBuffers()
        +                        throws IOException
        +
        Method called to release internal buffers owned by the base + parser.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _getByteArrayBuilder

        +
        protected com.fasterxml.jackson.core.util.ByteArrayBuilder _getByteArrayBuilder()
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html new file mode 100644 index 000000000..71ee1f1a3 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.html @@ -0,0 +1,560 @@ + + + + + + +WrapperHandlingDeserializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class WrapperHandlingDeserializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ResolvableDeserializer, com.fasterxml.jackson.databind.deser.ValueInstantiator.Gettable, Serializable
    +
    +
    +
    +
    public class WrapperHandlingDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
    +
    Delegating deserializer whose only function is to handle case of + "unwrapped" List/array deserialization from XML.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected boolean_caseInsensitive 
      protected Set<String>_namesToWrap +
      (Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
      +
      protected com.fasterxml.jackson.databind.JavaType_type 
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +_delegatee
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected void_configureParser(com.fasterxml.jackson.core.JsonParser p) 
      protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase_verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser) 
      com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.BeanProperty property) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + Object intoValue) 
      ObjectdeserializeWithType(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) 
      protected com.fasterxml.jackson.databind.JsonDeserializer<?>newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkTextualNull, _coerceBooleanFromInt, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserializeWithType, getEmptyAccessPattern, getEmptyValue, getNullValue, unwrappingDeserializer
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _namesToWrap

        +
        protected final Set<String> _namesToWrap
        +
        (Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
        +
      • +
      + + + +
        +
      • +

        _type

        +
        protected final com.fasterxml.jackson.databind.JavaType _type
        +
      • +
      + + + +
        +
      • +

        _caseInsensitive

        +
        protected final boolean _caseInsensitive
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        WrapperHandlingDeserializer

        +
        public WrapperHandlingDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate)
        +
      • +
      + + + +
        +
      • +

        WrapperHandlingDeserializer

        +
        public WrapperHandlingDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                                   Set<String> namesToWrap)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newDelegatingInstance

        +
        protected com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0)
        +
        +
        Specified by:
        +
        newDelegatingInstance in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        +
      • +
      + + + +
        +
      • +

        createContextual

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                                                           com.fasterxml.jackson.databind.BeanProperty property)
        +                                                                    throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Specified by:
        +
        createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
        +
        Overrides:
        +
        createContextual in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                          Object intoValue)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeWithType

        +
        public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
        +                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
        +                           throws IOException
        +
        +
        Overrides:
        +
        deserializeWithType in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _configureParser

        +
        protected final void _configureParser(com.fasterxml.jackson.core.JsonParser p)
        +                               throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _verifyDeserType

        +
        protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase _verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html new file mode 100644 index 000000000..99b000169 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.html @@ -0,0 +1,364 @@ + + + + + + +XmlBeanDeserializerModifier (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlBeanDeserializerModifier

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlBeanDeserializerModifier
    +extends com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
    +implements Serializable
    +
    The main reason for a modifier is to support handling of + 'wrapped' Collection types.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected String_cfgNameForTextValue +
      Virtual name used for text segments.
      +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      com.fasterxml.jackson.databind.JsonDeserializer<?>modifyDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + com.fasterxml.jackson.databind.JsonDeserializer<?> deser0) 
      List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition>updateProperties(com.fasterxml.jackson.databind.DeserializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> propDefs) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier

        +modifyArrayDeserializer, modifyCollectionDeserializer, modifyCollectionLikeDeserializer, modifyEnumDeserializer, modifyKeyDeserializer, modifyMapDeserializer, modifyMapLikeDeserializer, modifyReferenceDeserializer, updateBuilder
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _cfgNameForTextValue

        +
        protected String _cfgNameForTextValue
        +
        Virtual name used for text segments.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanDeserializerModifier

        +
        public XmlBeanDeserializerModifier(String nameForTextValue)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        updateProperties

        +
        public List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> updateProperties(com.fasterxml.jackson.databind.DeserializationConfig config,
        +                                                                                               com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                                               List<com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition> propDefs)
        +
        +
        Overrides:
        +
        updateProperties in class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
        +
        +
      • +
      + + + +
        +
      • +

        modifyDeserializer

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> modifyDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config,
        +                                                                             com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                             com.fasterxml.jackson.databind.JsonDeserializer<?> deser0)
        +
        +
        Overrides:
        +
        modifyDeserializer in class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.html new file mode 100644 index 000000000..01e62531f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.html @@ -0,0 +1,472 @@ + + + + + + +XmlDeserializationContext (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlDeserializationContext

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlDeserializationContext
    +extends com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
    +
    XML-specific DeserializationContext needed to override certain + handlers.
    +
    +
    Since:
    +
    2.12
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext

        +com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.Impl
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext

        +_objectIds
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.DeserializationContext

        +_arrayBuilders, _attributes, _cache, _config, _currentType, _dateFormat, _factory, _featureFlags, _injectableValues, _objectBuffer, _parser, _readCapabilities, _view
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlDeserializationContext(com.fasterxml.jackson.databind.deser.DeserializerFactory df) +
      Default constructor for a blueprint object, which will use the standard + DeserializerCache, given factory.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      XmlDeserializationContextcopy() 
      com.fasterxml.jackson.databind.deser.DefaultDeserializationContextcreateDummyInstance(com.fasterxml.jackson.databind.DeserializationConfig config) 
      com.fasterxml.jackson.databind.deser.DefaultDeserializationContextcreateInstance(com.fasterxml.jackson.databind.DeserializationConfig config, + com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.InjectableValues values) 
      StringextractScalarFromObject(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.JsonDeserializer<?> deser, + Class<?> scalarType) 
      ObjectreadRootValue(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.JavaType valueType, + com.fasterxml.jackson.databind.JsonDeserializer<Object> deser, + Object valueToUpdate) 
      com.fasterxml.jackson.databind.deser.DefaultDeserializationContextwith(com.fasterxml.jackson.databind.deser.DeserializerFactory factory) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext

        +_unwrapAndDeserialize, checkUnresolvedObjectId, createReadableObjectId, deserializerInstance, findObjectId, keyDeserializerInstance, tryToResolveUnresolvedObjectId
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.DeserializationContext

        +_getDateFormat, _isCompatible, _shapeForToken, canOverrideAccessModifiers, constructCalendar, constructSpecializedType, constructType, endOfInputException, findClass, findCoercionAction, findCoercionFromBlankString, findContextualValueDeserializer, findInjectableValue, findKeyDeserializer, findNonContextualValueDeserializer, findRootValueDeserializer, getActiveView, getAnnotationIntrospector, getArrayBuilders, getAttribute, getBase64Variant, getConfig, getContextualType, getDateFormat, getDefaultPropertyFormat, getDeserializationFeatures, getFactory, getLocale, getNodeFactory, getParser, getTimeZone, getTypeFactory, handleBadMerge, handleInstantiationProblem, handleMissingInstantiator, handleMissingTypeId, handlePrimaryContextualization, handleSecondaryContextualization, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnknownProperty, handleUnknownTypeId, handleWeirdKey, handleWeirdNativeValue, handleWeirdNumberValue, handleWeirdStringValue, hasDeserializationFeatures, hasSomeOfFeatures, hasValueDeserializerFor, instantiationException, instantiationException, invalidTypeIdException, isEnabled, isEnabled, isEnabled, leaseObjectBuffer, mappingException, mappingException, mappingException, mappingException, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadMerge, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportMappingException, reportMissingContent, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnknownProperty, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, unknownTypeException, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenException, wrongTokenException
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.DatabindContext

        +_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlDeserializationContext

        +
        public XmlDeserializationContext(com.fasterxml.jackson.databind.deser.DeserializerFactory df)
        +
        Default constructor for a blueprint object, which will use the standard + DeserializerCache, given factory.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        copy

        +
        public XmlDeserializationContext copy()
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
        +
        +
      • +
      + + + +
        +
      • +

        createInstance

        +
        public com.fasterxml.jackson.databind.deser.DefaultDeserializationContext createInstance(com.fasterxml.jackson.databind.DeserializationConfig config,
        +                                                                                         com.fasterxml.jackson.core.JsonParser p,
        +                                                                                         com.fasterxml.jackson.databind.InjectableValues values)
        +
        +
        Specified by:
        +
        createInstance in class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
        +
        +
      • +
      + + + +
        +
      • +

        createDummyInstance

        +
        public com.fasterxml.jackson.databind.deser.DefaultDeserializationContext createDummyInstance(com.fasterxml.jackson.databind.DeserializationConfig config)
        +
        +
        Specified by:
        +
        createDummyInstance in class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
        +
        +
      • +
      + + + +
        +
      • +

        with

        +
        public com.fasterxml.jackson.databind.deser.DefaultDeserializationContext with(com.fasterxml.jackson.databind.deser.DeserializerFactory factory)
        +
        +
        Specified by:
        +
        with in class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
        +
        +
      • +
      + + + +
        +
      • +

        readRootValue

        +
        public Object readRootValue(com.fasterxml.jackson.core.JsonParser p,
        +                            com.fasterxml.jackson.databind.JavaType valueType,
        +                            com.fasterxml.jackson.databind.JsonDeserializer<Object> deser,
        +                            Object valueToUpdate)
        +                     throws IOException
        +
        +
        Overrides:
        +
        readRootValue in class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        extractScalarFromObject

        +
        public String extractScalarFromObject(com.fasterxml.jackson.core.JsonParser p,
        +                                      com.fasterxml.jackson.databind.JsonDeserializer<?> deser,
        +                                      Class<?> scalarType)
        +                               throws IOException
        +
        +
        Overrides:
        +
        extractScalarFromObject in class com.fasterxml.jackson.databind.DeserializationContext
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html new file mode 100644 index 000000000..a0b91d3ee --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.html @@ -0,0 +1,703 @@ + + + + + + +XmlReadContext (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlReadContext

+
+
+ +
+
    +
  • +
    +
    +
    public final class XmlReadContext
    +extends com.fasterxml.jackson.core.JsonStreamContext
    +
    Extension of JsonStreamContext, which implements + core methods needed, and adds small amount of additional + state data we need. +

    + Almost same as standard JsonReaderContext, but + custom version needed to be able to keep track of names + of properties that need wrapping; this is needed to + support wrapped/unwrapped Collection/array values.

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _lineNr

        +
        protected int _lineNr
        +
      • +
      + + + +
        +
      • +

        _columnNr

        +
        protected int _columnNr
        +
      • +
      + + + +
        +
      • +

        _currentName

        +
        protected String _currentName
        +
      • +
      + + + +
        +
      • +

        _currentValue

        +
        protected Object _currentValue
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        _namesToWrap

        +
        protected Set<String> _namesToWrap
        +
      • +
      + + + +
        +
      • +

        _wrappedName

        +
        protected String _wrappedName
        +
        Name of property that requires wrapping
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlReadContext

        +
        public XmlReadContext(XmlReadContext parent,
        +                      int type,
        +                      int lineNr,
        +                      int colNr)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        reset

        +
        protected final void reset(int type,
        +                           int lineNr,
        +                           int colNr)
        +
      • +
      + + + +
        +
      • +

        getCurrentValue

        +
        public Object getCurrentValue()
        +
        +
        Overrides:
        +
        getCurrentValue in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        setCurrentValue

        +
        public void setCurrentValue(Object v)
        +
        +
        Overrides:
        +
        setCurrentValue in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        createRootContext

        +
        public static XmlReadContext createRootContext(int lineNr,
        +                                               int colNr)
        +
      • +
      + + + +
        +
      • +

        createRootContext

        +
        public static XmlReadContext createRootContext()
        +
      • +
      + + + +
        +
      • +

        createChildArrayContext

        +
        public final XmlReadContext createChildArrayContext(int lineNr,
        +                                                    int colNr)
        +
      • +
      + + + +
        +
      • +

        createChildObjectContext

        +
        public final XmlReadContext createChildObjectContext(int lineNr,
        +                                                     int colNr)
        +
      • +
      + + + +
        +
      • +

        getCurrentName

        +
        public final String getCurrentName()
        +
        +
        Specified by:
        +
        getCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        hasCurrentName

        +
        public boolean hasCurrentName()
        +
        +
        Overrides:
        +
        hasCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        getParent

        +
        public final XmlReadContext getParent()
        +
        +
        Specified by:
        +
        getParent in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      + + + +
        +
      • +

        getStartLocation

        +
        public final com.fasterxml.jackson.core.JsonLocation getStartLocation(Object srcRef)
        +
        +
        Overrides:
        +
        getStartLocation in class com.fasterxml.jackson.core.JsonStreamContext
        +
        Returns:
        +
        Location pointing to the point where the context + start marker was found
        +
        +
      • +
      + + + +
        +
      • +

        valueStarted

        +
        public final void valueStarted()
        +
        Method called to mark start of new value, mostly to update `index` + for Array and Root contexts.
        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        setCurrentName

        +
        public void setCurrentName(String name)
        +
      • +
      + + + +
        +
      • +

        setNamesToWrap

        +
        public void setNamesToWrap(Set<String> namesToWrap)
        +
      • +
      + + + +
        +
      • +

        shouldWrap

        +
        public boolean shouldWrap(String localName)
        +
      • +
      + + + +
        +
      • +

        convertToArray

        +
        protected void convertToArray()
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public final String toString()
        +
        Overridden to provide developer readable "JsonPath" representation + of the context.
        +
        +
        Overrides:
        +
        toString in class com.fasterxml.jackson.core.JsonStreamContext
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html new file mode 100644 index 000000000..aeb9118cf --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTextDeserializer.html @@ -0,0 +1,552 @@ + + + + + + +XmlTextDeserializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlTextDeserializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ResolvableDeserializer, com.fasterxml.jackson.databind.deser.ValueInstantiator.Gettable, Serializable
    +
    +
    +
    +
    public class XmlTextDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
    +
    Delegating deserializer that is used in the special cases where + we may sometimes see a "plain" String value but need to map it + as if it was a property of POJO. The impedance is introduced by + heuristic conversion from XML events into rough JSON equivalents; + and this is one work-around that can only be done after the fact.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.databind.deser.ValueInstantiator_valueInstantiator 
      protected com.fasterxml.jackson.databind.deser.SettableBeanProperty_xmlTextProperty +
      Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
      +
      protected int_xmlTextPropertyIndex +
      Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +_delegatee
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate, + int textPropIndex) 
      XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate, + com.fasterxml.jackson.databind.deser.SettableBeanProperty prop) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase_verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser) 
      com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.BeanProperty property) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt) 
      Objectdeserialize(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + Object bean) 
      ObjectdeserializeWithType(com.fasterxml.jackson.core.JsonParser p, + com.fasterxml.jackson.databind.DeserializationContext ctxt, + com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) 
      protected com.fasterxml.jackson.databind.JsonDeserializer<?>newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer

        +findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkTextualNull, _coerceBooleanFromInt, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserializeWithType, getEmptyAccessPattern, getEmptyValue, getNullValue, unwrappingDeserializer
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _xmlTextPropertyIndex

        +
        protected final int _xmlTextPropertyIndex
        +
        Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
        +
      • +
      + + + +
        +
      • +

        _xmlTextProperty

        +
        protected final com.fasterxml.jackson.databind.deser.SettableBeanProperty _xmlTextProperty
        +
        Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
        +
      • +
      + + + +
        +
      • +

        _valueInstantiator

        +
        protected final com.fasterxml.jackson.databind.deser.ValueInstantiator _valueInstantiator
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTextDeserializer

        +
        public XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                           com.fasterxml.jackson.databind.deser.SettableBeanProperty prop)
        +
      • +
      + + + +
        +
      • +

        XmlTextDeserializer

        +
        public XmlTextDeserializer(com.fasterxml.jackson.databind.deser.BeanDeserializerBase delegate,
        +                           int textPropIndex)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newDelegatingInstance

        +
        protected com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatingInstance(com.fasterxml.jackson.databind.JsonDeserializer<?> newDelegatee0)
        +
        +
        Specified by:
        +
        newDelegatingInstance in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        +
      • +
      + + + +
        +
      • +

        createContextual

        +
        public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                                                           com.fasterxml.jackson.databind.BeanProperty property)
        +                                                                    throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Specified by:
        +
        createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
        +
        Overrides:
        +
        createContextual in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public Object deserialize(com.fasterxml.jackson.core.JsonParser p,
        +                          com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                          Object bean)
        +                   throws IOException
        +
        +
        Overrides:
        +
        deserialize in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeWithType

        +
        public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
        +                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
        +                           throws IOException
        +
        +
        Overrides:
        +
        deserializeWithType in class com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _verifyDeserType

        +
        protected com.fasterxml.jackson.databind.deser.BeanDeserializerBase _verifyDeserType(com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html new file mode 100644 index 000000000..9c1acd2ab --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.html @@ -0,0 +1,1044 @@ + + + + + + +XmlTokenStream (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.deser
+

Class XmlTokenStream

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlTokenStream
    +extends Object
    +
    Simple helper class used on top of STAX XMLStreamReader to further + abstract out all irrelevant details, and to expose equivalent of flat token + stream with no "fluff" tokens (comments, processing instructions, mixed + content) all of which is just to simplify + actual higher-level conversion to JSON tokens. +

    + Beyond initial idea there are also couple of other detours like ability + to "replay" some tokens, add virtual wrappers (ironically to support "unwrapped" + array values), and to unroll "Objects" into String values in some cases.

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        XML_START_ELEMENT

        +
        public static final int XML_START_ELEMENT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + +
        +
      • +

        XML_ATTRIBUTE_NAME

        +
        public static final int XML_ATTRIBUTE_NAME
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        XML_ATTRIBUTE_VALUE

        +
        public static final int XML_ATTRIBUTE_VALUE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + +
        +
      • +

        XML_DELAYED_START_ELEMENT

        +
        public static final int XML_DELAYED_START_ELEMENT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _xmlReader

        +
        protected final org.codehaus.stax2.XMLStreamReader2 _xmlReader
        +
      • +
      + + + +
        +
      • +

        _sourceReference

        +
        protected final Object _sourceReference
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _currentState

        +
        protected int _currentState
        +
      • +
      + + + +
        +
      • +

        _attributeCount

        +
        protected int _attributeCount
        +
      • +
      + + + +
        +
      • +

        _xsiNilFound

        +
        protected boolean _xsiNilFound
        +
        Marker used to indicate presence of `xsi:nil="true"' in current START_ELEMENT.
        +
        +
        Since:
        +
        2.10
        +
        +
      • +
      + + + +
        +
      • +

        _startElementAfterText

        +
        protected boolean _startElementAfterText
        +
        Flag set true if current event is XML_TEXT and there is START_ELEMENT
        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        _nextAttributeIndex

        +
        protected int _nextAttributeIndex
        +
        Index of the next attribute of the current START_ELEMENT + to return (as field name and value pair), if any; -1 + when no attributes to return
        +
      • +
      + + + +
        +
      • +

        _localName

        +
        protected String _localName
        +
      • +
      + + + +
        +
      • +

        _namespaceURI

        +
        protected String _namespaceURI
        +
      • +
      + + + +
        +
      • +

        _textValue

        +
        protected String _textValue
        +
        Current text value for TEXT_VALUE returned
        +
      • +
      + + + +
        +
      • +

        _repeatCurrentToken

        +
        protected boolean _repeatCurrentToken
        +
        Marker flag set if caller wants to "push back" current token so + that next call to next() should simply be given what was + already read.
        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        _repeatElement

        +
        protected int _repeatElement
        +
        Flag used to indicate that given element should be "replayed".
        +
      • +
      + + + +
        +
      • +

        _currentWrapper

        +
        protected com.fasterxml.jackson.dataformat.xml.deser.ElementWrapper _currentWrapper
        +
        Wrapping state, if any active (null if none)
        +
      • +
      + + + +
        +
      • +

        _nextLocalName

        +
        protected String _nextLocalName
        +
        In cases where we need to 'inject' a virtual END_ELEMENT, we may also + need to restore START_ELEMENT afterwards; if so, this is where names + are held.
        +
      • +
      + + + +
        +
      • +

        _nextNamespaceURI

        +
        protected String _nextNamespaceURI
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlTokenStream

        +
        public XmlTokenStream(XMLStreamReader xmlReader,
        +                      Object sourceRef,
        +                      int formatFeatures)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        initialize

        +
        public int initialize()
        +               throws XMLStreamException
        +
        Second part of initialization, to be called immediately after construction
        +
        +
        Throws:
        +
        XMLStreamException
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        getXmlReader

        +
        public org.codehaus.stax2.XMLStreamReader2 getXmlReader()
        +
      • +
      + + + +
        +
      • +

        setFormatFeatures

        +
        protected void setFormatFeatures(int f)
        +
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getCurrentToken

        +
        public int getCurrentToken()
        +
      • +
      + + + +
        +
      • +

        getText

        +
        public String getText()
        +
      • +
      + + + +
        +
      • +

        getLocalName

        +
        public String getLocalName()
        +
        Accessor for local name of current named event (that is, + XML_START_ELEMENT or XML_ATTRIBUTE_NAME). +

        + NOTE: name NOT accessible on XML_END_ELEMENT

        +
      • +
      + + + +
        +
      • +

        getNamespaceURI

        +
        public String getNamespaceURI()
        +
      • +
      + + + +
        +
      • +

        hasXsiNil

        +
        public boolean hasXsiNil()
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getCurrentLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
        +
      • +
      + + + +
        +
      • +

        getTokenLocation

        +
        public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
        +
      • +
      + + + +
        +
      • +

        repeatStartElement

        +
        protected void repeatStartElement()
        +
        Method used to add virtual wrapping, which just duplicates START_ELEMENT + stream points to, and its matching closing element.
        +
      • +
      + + + +
        +
      • +

        pushbackCurrentToken

        +
        protected void pushbackCurrentToken()
        +
        Method that can be called to ask stream to literally just return current token + with the next call to next(), without more work.
        +
        +
        Since:
        +
        2.12
        +
        +
      • +
      + + + +
        +
      • +

        skipAttributes

        +
        protected void skipAttributes()
        +
        Method called to skip any attributes current START_ELEMENT may have, + so that they are not returned as token.
        +
        +
        Since:
        +
        2.1
        +
        +
      • +
      + + + +
        +
      • +

        _handleRepeatElement

        +
        protected int _handleRepeatElement()
        +                            throws XMLStreamException
        +
        Method called to handle details of repeating "virtual" + start/end elements, needed for handling 'unwrapped' lists.
        +
        +
        Throws:
        +
        XMLStreamException
        +
        +
      • +
      + + + +
        +
      • +

        _allWs

        +
        protected static boolean _allWs(String str)
        +
      • +
      + + + +
        +
      • +

        _currentStateDesc

        +
        protected String _currentStateDesc()
        +
      • +
      + + + +
        +
      • +

        _stateDesc

        +
        protected String _stateDesc(int state)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html new file mode 100644 index 000000000..4d5adb9a9 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.Feature.html @@ -0,0 +1,320 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html new file mode 100644 index 000000000..dd7ade731 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/FromXmlParser.html @@ -0,0 +1,229 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html new file mode 100644 index 000000000..c9de5677d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/WrapperHandlingDeserializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html new file mode 100644 index 000000000..8bfb930e1 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlBeanDeserializerModifier.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlDeserializationContext.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlDeserializationContext.html new file mode 100644 index 000000000..67a46e1ad --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlDeserializationContext.html @@ -0,0 +1,166 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html new file mode 100644 index 000000000..4c3704b38 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlReadContext.html @@ -0,0 +1,227 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html new file mode 100644 index 000000000..f9dde7f9f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTextDeserializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html new file mode 100644 index 000000000..4562f5403 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/class-use/XmlTokenStream.html @@ -0,0 +1,166 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html new file mode 100644 index 000000000..faf916213 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-frame.html @@ -0,0 +1,31 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.deser

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html new file mode 100644 index 000000000..7d7d14085 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-summary.html @@ -0,0 +1,211 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.deser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html new file mode 100644 index 000000000..f20d5cc40 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-tree.html @@ -0,0 +1,197 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.deser Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.deser

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-use.html new file mode 100644 index 000000000..bcb994fde --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/deser/package-use.html @@ -0,0 +1,220 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.deser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.deser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html new file mode 100644 index 000000000..e06b3da0f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.html @@ -0,0 +1,497 @@ + + + + + + +XmlJaxbAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.jaxb
+

Class XmlJaxbAnnotationIntrospector

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector, Serializable
    +
    +
    +
    Deprecated.  +
    Since 2.12 (as per above notes)
    +
    +
    +
    @Deprecated
    +public class XmlJaxbAnnotationIntrospector
    +extends com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
    +implements XmlAnnotationIntrospector
    +
    Alternative AnnotationIntrospector + implementation that + builds on JaxbAnnotationIntrospector. +

    + NOTE: since version 2.4, it may NOT be necessary to use this class; + instead, plain JaxbAnnotationIntrospector should fully work. + With previous versions some aspects were not fully working and this + class was necessary.

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector

        +_dataHandlerDeserializer, _dataHandlerSerializer, _ignoreXmlIDREF, _jaxbPackageName, _nonNillableInclusion, _typeFactory, _xmlValueName, DEFAULT_IGNORE_XMLIDREF, DEFAULT_NAME_FOR_XML_VALUE, FORMAT_INT, FORMAT_STRING, MARKER_FOR_DEFAULT
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      StringfindNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Deprecated. 
      +
      Method that can be called to figure out generic namespace + property for an annotated object.
      +
      BooleanisOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Deprecated. 
      +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
      +
      BooleanisOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Deprecated. 
      +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
      +
      BooleanisOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann) +
      Deprecated. 
      +
      Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
      +
      voidsetDefaultUseWrapper(boolean b) +
      Deprecated. 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector

        +_converter, _decapitalize, _doFindDeserializationType, _findContentAdapter, _fullDeserializationType, _fullSerializationType, _getTypeFromXmlElement, _okNameForGetter, _okNameForMutator, _propertyNameToString, _rawDeserializationType, _rawSerializationType, _stdManglePropertyName, _typeResolverFromXmlElements, findAccessType, findAutoDetectVisibility, findContentDeserializer, findContentSerializer, findDeserializationContentConverter, findDeserializationConverter, findDeserializer, findEnumValues, findFormat, findImplicitPropertyName, findKeyDeserializer, findNameForDeserialization, findNameForSerialization, findObjectIdInfo, findObjectReferenceInfo, findPropertyContentTypeResolver, findPropertyInclusion, findPropertyTypeResolver, findRootName, findSerializationContentConverter, findSerializationConverter, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializer, findSubtypes, findTypeName, findTypeResolver, findWrapperName, getNameUsedForXmlValue, getNonNillableInclusion, getTypeFactory, hasAsValueAnnotation, hasIgnoreMarker, hasRequiredMarker, isIgnorableType, isJAXBAnnotation, refineDeserializationType, refineSerializationType, setNameUsedForXmlValue, setNonNillableInclusion, version
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

        +_findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findAndAddVirtualProperties, findClassDescription, findCreatorAnnotation, findCreatorBinding, findDefaultEnumValue, findDeserializationContentType, findDeserializationKeyType, findDeserializationType, findEnumAliases, findEnumValue, findFilterId, findIgnoreUnknownProperties, findInjectableValue, findInjectableValueId, findKeySerializer, findMergeInfo, findNamingStrategy, findNullSerializer, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findPropertyAccess, findPropertyAliases, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnoralByName, findPropertyIgnorals, findPropertyInclusionByName, findPropertyIndex, findReferenceType, findRenameByField, findSerializationContentType, findSerializationInclusion, findSerializationInclusionForContent, findSerializationKeyType, findSerializationTyping, findSetterInfo, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsKey, hasAsValue, hasCreatorAnnotation, isAnnotationBundle, isTypeId, nopInstance, pair, resolveSetterConflict
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlJaxbAnnotationIntrospector

        +
        @Deprecated
        +public XmlJaxbAnnotationIntrospector()
        +
        Deprecated. 
        +
      • +
      + + + +
        +
      • +

        XmlJaxbAnnotationIntrospector

        +
        public XmlJaxbAnnotationIntrospector(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
        +
        Deprecated. 
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespace

        +
        public String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Deprecated. 
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method that can be called to figure out generic namespace + property for an annotated object.
        +
        +
        Specified by:
        +
        findNamespace in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        findNamespace in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        Returns:
        +
        Null if annotated thing does not define any + namespace information; non-null namespace (which may + be empty String) otherwise
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsAttribute

        +
        public Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Deprecated. 
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
        +
        +
        Specified by:
        +
        isOutputAsAttribute in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        isOutputAsAttribute in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsText

        +
        public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Deprecated. 
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
        +
        +
        Specified by:
        +
        isOutputAsText in interface XmlAnnotationIntrospector
        +
        Overrides:
        +
        isOutputAsText in class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
        +
        +
      • +
      + + + +
        +
      • +

        isOutputAsCData

        +
        public Boolean isOutputAsCData(com.fasterxml.jackson.databind.introspect.Annotated ann)
        +
        Deprecated. 
        +
        Description copied from interface: XmlAnnotationIntrospector
        +
        Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
        +
        +
        Specified by:
        +
        isOutputAsCData in interface XmlAnnotationIntrospector
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html new file mode 100644 index 000000000..27eb58bf3 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/class-use/XmlJaxbAnnotationIntrospector.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector

+
+
No usage of com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html new file mode 100644 index 000000000..f326f24ae --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.jaxb

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html new file mode 100644 index 000000000..b018247bf --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-summary.html @@ -0,0 +1,146 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.jaxb

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html new file mode 100644 index 000000000..517f72ef2 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-tree.html @@ -0,0 +1,147 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.jaxb Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.jaxb

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html new file mode 100644 index 000000000..d7af63feb --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/jaxb/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.jaxb (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.jaxb

+
+
No usage of com.fasterxml.jackson.dataformat.xml.jaxb
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-frame.html new file mode 100644 index 000000000..7b640b437 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-frame.html @@ -0,0 +1,38 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-summary.html new file mode 100644 index 000000000..7f993f321 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-summary.html @@ -0,0 +1,269 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml

+
+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+

See: Description

+
+
+ + + + +

Package com.fasterxml.jackson.dataformat.xml Description

+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-tree.html new file mode 100644 index 000000000..a9ad8b31b --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-tree.html @@ -0,0 +1,228 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-use.html new file mode 100644 index 000000000..6fcd0d60d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/package-use.html @@ -0,0 +1,270 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html new file mode 100644 index 000000000..69af53f75 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.Feature.html @@ -0,0 +1,471 @@ + + + + + + +ToXmlGenerator.Feature (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Enum ToXmlGenerator.Feature

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.FormatFeature, com.fasterxml.jackson.core.util.JacksonFeature, Serializable, Comparable<ToXmlGenerator.Feature>
    +
    +
    +
    Enclosing class:
    +
    ToXmlGenerator
    +
    +
    +
    +
    public static enum ToXmlGenerator.Feature
    +extends Enum<ToXmlGenerator.Feature>
    +implements com.fasterxml.jackson.core.FormatFeature
    +
    Enumeration that defines all togglable extra XML-specific features
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        WRITE_XML_DECLARATION

        +
        public static final ToXmlGenerator.Feature WRITE_XML_DECLARATION
        +
        Feature that controls whether XML declaration should be written before + when generator is initialized (true) or not (false)
        +
      • +
      + + + +
        +
      • +

        WRITE_XML_1_1

        +
        public static final ToXmlGenerator.Feature WRITE_XML_1_1
        +
        Feature that controls whether output should be done as XML 1.1; if so, + certain aspects may differ from default (1.0) processing: for example, + XML declaration will be automatically added (regardless of setting + WRITE_XML_DECLARATION) as this is required for reader to + know to use 1.1 compliant handling. XML 1.1 can be used to allow quoted + control characters (Ascii codes 0 through 31) as well as additional linefeeds + and name characters.
        +
      • +
      + + + +
        +
      • +

        WRITE_NULLS_AS_XSI_NIL

        +
        public static final ToXmlGenerator.Feature WRITE_NULLS_AS_XSI_NIL
        +
        Feature that controls whether serialization of Java null values adds + XML attribute of `xsi:nil`, as defined by XML Schema (see + this article + for details) or not. + If enabled, `xsi:nil` attribute will be added to the empty element; if disabled, + it will not. +

        + Feature is disabled by default for backwards compatibility.

        +
        +
        Since:
        +
        2.10
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static ToXmlGenerator.Feature[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (ToXmlGenerator.Feature c : ToXmlGenerator.Feature.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static ToXmlGenerator.Feature valueOf(String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum type has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        collectDefaults

        +
        public static int collectDefaults()
        +
        Method that calculates bit set (flags) of all features that + are enabled by default.
        +
      • +
      + + + +
        +
      • +

        enabledByDefault

        +
        public boolean enabledByDefault()
        +
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        enabledByDefault in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      + + + +
        +
      • +

        getMask

        +
        public int getMask()
        +
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        getMask in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      + + + +
        +
      • +

        enabledIn

        +
        public boolean enabledIn(int flags)
        +
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.FormatFeature
        +
        Specified by:
        +
        enabledIn in interface com.fasterxml.jackson.core.util.JacksonFeature
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html new file mode 100644 index 000000000..6facb7fc5 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.html @@ -0,0 +1,1828 @@ + + + + + + +ToXmlGenerator (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class ToXmlGenerator

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.Versioned, Closeable, Flushable, AutoCloseable
    +
    +
    +
    +
    public class ToXmlGenerator
    +extends com.fasterxml.jackson.core.base.GeneratorBase
    +
    JsonGenerator that outputs JAXB-style XML output instead of JSON content. + Operation requires calling code (usually either standard Jackson serializers, + or in some cases (like BeanSerializer) customized ones) to do + additional configuration calls beyond regular JsonGenerator API, + mostly to pass namespace information.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class ToXmlGenerator.Feature +
      Enumeration that defines all togglable extra XML-specific features
      +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected LinkedList<QName>_elementNameStack +
      To support proper serialization of arrays it is necessary to keep + stack of element names, so that we can "revert" to earlier
      +
      protected int_formatFeatures +
      Bit flag composed of bits that indicate which + ToXmlGenerator.Features + are enabled.
      +
      protected boolean_initialized +
      Marker set when initGenerator() has been called or not.
      +
      protected com.fasterxml.jackson.core.io.IOContext_ioContext 
      protected boolean_nextIsAttribute +
      Marker flag that indicates whether next name to write + implies an attribute (true) or element (false)
      +
      protected boolean_nextIsCData +
      Marker flag used to indicate that the next write of a (property) + value should be as CData
      +
      protected boolean_nextIsUnwrapped +
      Marker flag used to indicate that the next write of a (property) + value should be done without using surrounding start/end + elements.
      +
      protected QName_nextName +
      Element or attribute name to use for next output call.
      +
      protected XMLStreamWriter_originalXmlWriter 
      protected boolean_stax2Emulation +
      Marker flag set if the underlying stream writer has to emulate + Stax2 API: this is problematic if trying to use writeRaw(java.lang.String) calls.
      +
      protected XmlPrettyPrinter_xmlPrettyPrinter +
      We may need to use XML-specific indentation as well
      +
      protected org.codehaus.stax2.XMLStreamWriter2_xmlWriter 
      protected static StringDEFAULT_UNKNOWN_ELEMENT +
      If we support optional definition of element names, this is the element + name to use...
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.base.GeneratorBase

        +_cfgNumbersAsStrings, _closed, _features, _objectCodec, _writeContext, DERIVED_FEATURES_MASK, MAX_BIG_DECIMAL_SCALE, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST, WRITE_BINARY, WRITE_BOOLEAN, WRITE_NULL, WRITE_NUMBER, WRITE_RAW, WRITE_STRING
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.core.JsonGenerator

        +_cfgPrettyPrinter, DEFAULT_BINARY_WRITE_CAPABILITIES, DEFAULT_TEXTUAL_WRITE_CAPABILITIES, DEFAULT_WRITE_CAPABILITIES
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ToXmlGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, + int stdFeatures, + int xmlFeatures, + com.fasterxml.jackson.core.ObjectCodec codec, + XMLStreamWriter sw) 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_UNKNOWN_ELEMENT

        +
        protected static final String DEFAULT_UNKNOWN_ELEMENT
        +
        If we support optional definition of element names, this is the element + name to use...
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        _xmlWriter

        +
        protected final org.codehaus.stax2.XMLStreamWriter2 _xmlWriter
        +
      • +
      + + + +
        +
      • +

        _originalXmlWriter

        +
        protected final XMLStreamWriter _originalXmlWriter
        +
      • +
      + + + +
        +
      • +

        _stax2Emulation

        +
        protected final boolean _stax2Emulation
        +
        Marker flag set if the underlying stream writer has to emulate + Stax2 API: this is problematic if trying to use writeRaw(java.lang.String) calls.
        +
      • +
      + + + +
        +
      • +

        _ioContext

        +
        protected final com.fasterxml.jackson.core.io.IOContext _ioContext
        +
      • +
      + + + +
        +
      • +

        _formatFeatures

        +
        protected int _formatFeatures
        +
        Bit flag composed of bits that indicate which + ToXmlGenerator.Features + are enabled.
        +
      • +
      + + + +
        +
      • +

        _xmlPrettyPrinter

        +
        protected XmlPrettyPrinter _xmlPrettyPrinter
        +
        We may need to use XML-specific indentation as well
        +
      • +
      + + + +
        +
      • +

        _initialized

        +
        protected boolean _initialized
        +
        Marker set when initGenerator() has been called or not.
        +
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        _nextName

        +
        protected QName _nextName
        +
        Element or attribute name to use for next output call. + Assigned by either code that initiates serialization + or bean serializer.
        +
      • +
      + + + +
        +
      • +

        _nextIsAttribute

        +
        protected boolean _nextIsAttribute
        +
        Marker flag that indicates whether next name to write + implies an attribute (true) or element (false)
        +
      • +
      + + + +
        +
      • +

        _nextIsUnwrapped

        +
        protected boolean _nextIsUnwrapped
        +
        Marker flag used to indicate that the next write of a (property) + value should be done without using surrounding start/end + elements. Flag is to be cleared once unwrapping has been triggered + once.
        +
      • +
      + + + +
        +
      • +

        _nextIsCData

        +
        protected boolean _nextIsCData
        +
        Marker flag used to indicate that the next write of a (property) + value should be as CData
        +
      • +
      + + + +
        +
      • +

        _elementNameStack

        +
        protected LinkedList<QName> _elementNameStack
        +
        To support proper serialization of arrays it is necessary to keep + stack of element names, so that we can "revert" to earlier
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ToXmlGenerator

        +
        public ToXmlGenerator(com.fasterxml.jackson.core.io.IOContext ctxt,
        +                      int stdFeatures,
        +                      int xmlFeatures,
        +                      com.fasterxml.jackson.core.ObjectCodec codec,
        +                      XMLStreamWriter sw)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        initGenerator

        +
        public void initGenerator()
        +                   throws IOException
        +
        Method called before writing any other output, to optionally + output XML declaration.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _constructDefaultPrettyPrinter

        +
        protected com.fasterxml.jackson.core.PrettyPrinter _constructDefaultPrettyPrinter()
        +
        +
        Overrides:
        +
        _constructDefaultPrettyPrinter in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        +
      • +
      + + + +
        +
      • +

        setPrettyPrinter

        +
        public com.fasterxml.jackson.core.JsonGenerator setPrettyPrinter(com.fasterxml.jackson.core.PrettyPrinter pp)
        +
        +
        Overrides:
        +
        setPrettyPrinter in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getOutputTarget

        +
        public Object getOutputTarget()
        +
        +
        Overrides:
        +
        getOutputTarget in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getOutputBuffered

        +
        public int getOutputBuffered()
        +
        Stax2 does not expose buffered content amount, so we can only return + -1 from here
        +
        +
        Overrides:
        +
        getOutputBuffered in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getFormatFeatures

        +
        public int getFormatFeatures()
        +
        +
        Overrides:
        +
        getFormatFeatures in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        overrideFormatFeatures

        +
        public com.fasterxml.jackson.core.JsonGenerator overrideFormatFeatures(int values,
        +                                                                       int mask)
        +
        +
        Overrides:
        +
        overrideFormatFeatures in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        canWriteFormattedNumbers

        +
        public boolean canWriteFormattedNumbers()
        +
        +
        Overrides:
        +
        canWriteFormattedNumbers in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        getWriteCapabilities

        +
        public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamWriteCapability> getWriteCapabilities()
        +
        +
        Overrides:
        +
        getWriteCapabilities in class com.fasterxml.jackson.core.JsonGenerator
        +
        +
      • +
      + + + +
        +
      • +

        inRoot

        +
        public boolean inRoot()
        +
      • +
      + + + +
        +
      • +

        getStaxWriter

        +
        public XMLStreamWriter getStaxWriter()
        +
        Method that allows application direct access to underlying + Stax XMLStreamWriter. Note that use of writer is + discouraged, and may interfere with processing of this writer; + however, occasionally it may be necessary. +

        + Note: writer instance will always be of type + XMLStreamWriter2 (including + Typed Access API) so upcasts are safe.

        +
      • +
      + + + +
        +
      • +

        setNextIsAttribute

        +
        public void setNextIsAttribute(boolean isAttribute)
        +
      • +
      + + + +
        +
      • +

        setNextIsUnwrapped

        +
        public void setNextIsUnwrapped(boolean isUnwrapped)
        +
      • +
      + + + +
        +
      • +

        setNextIsCData

        +
        public void setNextIsCData(boolean isCData)
        +
      • +
      + + + +
        +
      • +

        setNextName

        +
        public final void setNextName(QName name)
        +
      • +
      + + + + + + + +
        +
      • +

        startWrappedValue

        +
        public void startWrappedValue(QName wrapperName,
        +                              QName wrappedName)
        +                       throws IOException
        +
        Methdod called when a structured (collection, array, map) is being + output.
        +
        +
        Parameters:
        +
        wrapperName - Element used as wrapper around elements, if any (null if none)
        +
        wrappedName - Element used around individual content items (can not + be null)
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        finishWrappedValue

        +
        public void finishWrappedValue(QName wrapperName,
        +                               QName wrappedName)
        +                        throws IOException
        +
        Method called after a structured collection output has completed
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRepeatedFieldName

        +
        public void writeRepeatedFieldName()
        +                            throws IOException
        +
        Trivial helper method called when to add a replicated wrapper name
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.2
        +
        +
      • +
      + + + +
        +
      • +

        writeFieldName

        +
        public final void writeFieldName(String name)
        +                          throws IOException
        +
        +
        Specified by:
        +
        writeFieldName in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStringField

        +
        public final void writeStringField(String fieldName,
        +                                   String value)
        +                            throws IOException
        +
        +
        Overrides:
        +
        writeStringField in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStartArray

        +
        public final void writeStartArray()
        +                           throws IOException
        +
        +
        Specified by:
        +
        writeStartArray in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeEndArray

        +
        public final void writeEndArray()
        +                         throws IOException
        +
        +
        Specified by:
        +
        writeEndArray in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeStartObject

        +
        public final void writeStartObject()
        +                            throws IOException
        +
        +
        Specified by:
        +
        writeStartObject in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeEndObject

        +
        public final void writeEndObject()
        +                          throws IOException
        +
        +
        Specified by:
        +
        writeEndObject in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _handleStartObject

        +
        public final void _handleStartObject()
        +                              throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _handleEndObject

        +
        public final void _handleEndObject()
        +                            throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeFieldName

        +
        public void writeFieldName(com.fasterxml.jackson.core.SerializableString name)
        +                    throws IOException
        +
        +
        Overrides:
        +
        writeFieldName in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(String text)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeString in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(char[] text,
        +                        int offset,
        +                        int len)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeString in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeString

        +
        public void writeString(com.fasterxml.jackson.core.SerializableString text)
        +                 throws IOException
        +
        +
        Overrides:
        +
        writeString in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawUTF8String

        +
        public void writeRawUTF8String(byte[] text,
        +                               int offset,
        +                               int length)
        +                        throws IOException
        +
        +
        Specified by:
        +
        writeRawUTF8String in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeUTF8String

        +
        public void writeUTF8String(byte[] text,
        +                            int offset,
        +                            int length)
        +                     throws IOException
        +
        +
        Specified by:
        +
        writeUTF8String in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(String text)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(String text,
        +                          int offset,
        +                          int len)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(char[] text,
        +                          int offset,
        +                          int len)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRawValue

        +
        public void writeRawValue(com.fasterxml.jackson.core.SerializableString text)
        +                   throws IOException
        +
        +
        Overrides:
        +
        writeRawValue in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(String text)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(String text,
        +                     int offset,
        +                     int len)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(char[] text,
        +                     int offset,
        +                     int len)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeRaw

        +
        public void writeRaw(char c)
        +              throws IOException
        +
        +
        Specified by:
        +
        writeRaw in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBinary

        +
        public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
        +                        byte[] data,
        +                        int offset,
        +                        int len)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeBinary in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBinary

        +
        public int writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant,
        +                       InputStream data,
        +                       int dataLength)
        +                throws IOException
        +
        +
        Overrides:
        +
        writeBinary in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeBoolean

        +
        public void writeBoolean(boolean value)
        +                  throws IOException
        +
        +
        Specified by:
        +
        writeBoolean in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNull

        +
        public void writeNull()
        +               throws IOException
        +
        +
        Specified by:
        +
        writeNull in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(int i)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(long l)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(double d)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(float f)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(BigDecimal dec)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        writeNumber

        +
        public void writeNumber(BigInteger value)
        +                 throws IOException
        +
        +
        Specified by:
        +
        writeNumber in class com.fasterxml.jackson.core.JsonGenerator
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        _verifyValueWrite

        +
        protected final void _verifyValueWrite(String typeMsg)
        +                                throws IOException
        +
        +
        Specified by:
        +
        _verifyValueWrite in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        flush

        +
        public void flush()
        +           throws IOException
        +
        +
        Specified by:
        +
        flush in interface Flushable
        +
        Specified by:
        +
        flush in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        _releaseBuffers

        +
        protected void _releaseBuffers()
        +
        +
        Specified by:
        +
        _releaseBuffers in class com.fasterxml.jackson.core.base.GeneratorBase
        +
        +
      • +
      + + + +
        +
      • +

        checkNextIsUnwrapped

        +
        protected boolean checkNextIsUnwrapped()
        +
        Method called to see if unwrapping is required; and if so, + clear the flag (so further calls will return 'false' unless + state is re-set)
        +
      • +
      + + + +
        +
      • +

        handleMissingName

        +
        protected void handleMissingName()
        +
      • +
      + + + +
        +
      • +

        _reportUnimplementedStax2

        +
        protected void _reportUnimplementedStax2(String missingMethod)
        +                                  throws IOException
        +
        Method called in case access to native Stax2 API implementation is required.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html new file mode 100644 index 000000000..e4d343ba8 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.html @@ -0,0 +1,655 @@ + + + + + + +UnwrappingXmlBeanSerializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class UnwrappingXmlBeanSerializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    +
    public class UnwrappingXmlBeanSerializer
    +extends XmlBeanSerializerBase
    +
    Copy of UnwrappingBeanSerializer required to extend + XmlBeanSerializerBase for XML-specific handling.
    +
    +
    Author:
    +
    Pascal Gélinas
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.databind.util.NameTransformer_nameTransformer +
      Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
      +
      + +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBaseasArraySerializer() +
      JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
      +
      booleanisUnwrappingSerializer() 
      voidserialize(Object bean, + com.fasterxml.jackson.core.JsonGenerator jgen, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
      +
      StringtoString() 
      com.fasterxml.jackson.databind.JsonSerializer<Object>unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer transformer) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithByNameInclusion(Set<String> toIgnore, + Set<String> toInclude) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithFilterId(Object filterId) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithProperties(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties, + com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties) 
      + +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, createContextual, findConvertingSerializer, getSchema, properties, resolve, usesObjectId, withIgnorals, withIgnorals
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, replaceDelegatee
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _nameTransformer

        +
        protected final com.fasterxml.jackson.databind.util.NameTransformer _nameTransformer
        +
        Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src,
        +                                   com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
        Constructor used for creating unwrapping instance of a standard + BeanSerializer
        +
      • +
      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src,
        +                                   com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src,
        +                                   com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                                   Object filterId)
        +
      • +
      + + + + + + + +
        +
      • +

        UnwrappingXmlBeanSerializer

        +
        protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src,
        +                                      com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                      com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        unwrappingSerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<Object> unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
        +
        Overrides:
        +
        unwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        isUnwrappingSerializer

        +
        public boolean isUnwrappingSerializer()
        +
        +
        Overrides:
        +
        isUnwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        withObjectIdWriter

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
        +
        Specified by:
        +
        withObjectIdWriter in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withFilterId

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withFilterId(Object filterId)
        +
        +
        Overrides:
        +
        withFilterId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withByNameInclusion

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withByNameInclusion(Set<String> toIgnore,
        +                                                                                        Set<String> toInclude)
        +
        +
        Specified by:
        +
        withByNameInclusion in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withProperties

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withProperties(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                                                                   com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
        +
        Specified by:
        +
        withProperties in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        asArraySerializer

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase asArraySerializer()
        +
        JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
        +
        +
        Specified by:
        +
        asArraySerializer in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public final void serialize(Object bean,
        +                            com.fasterxml.jackson.core.JsonGenerator jgen,
        +                            com.fasterxml.jackson.databind.SerializerProvider provider)
        +                     throws IOException,
        +                            com.fasterxml.jackson.core.JsonGenerationException
        +
        Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
        +
        +
        Specified by:
        +
        serialize in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        com.fasterxml.jackson.core.JsonGenerationException
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html new file mode 100644 index 000000000..597b7ad78 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanPropertyWriter.html @@ -0,0 +1,448 @@ + + + + + + +XmlBeanPropertyWriter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanPropertyWriter

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.BeanProperty, com.fasterxml.jackson.databind.util.Named, Serializable
    +
    +
    +
    +
    public class XmlBeanPropertyWriter
    +extends com.fasterxml.jackson.databind.ser.BeanPropertyWriter
    +
    Property writer sub-class used for handling element wrapping needed for serializing + collection (array, Collection; possibly Map) types.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty

        +com.fasterxml.jackson.databind.BeanProperty.Bogus, com.fasterxml.jackson.databind.BeanProperty.Std
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected QName_wrappedQName +
      Element name used for items in the collection
      +
      protected QName_wrapperQName +
      Element name used as wrapper for collection.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter

        +_accessorMethod, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _field, _includeInViews, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        +_aliases, _metadata
      • +
      +
        +
      • + + +

        Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty

        +EMPTY_FORMAT, EMPTY_INCLUDE
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped, + com.fasterxml.jackson.databind.PropertyName wrapperName, + com.fasterxml.jackson.databind.PropertyName wrappedName) 
      XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped, + com.fasterxml.jackson.databind.PropertyName wrapperName, + com.fasterxml.jackson.databind.PropertyName wrappedName, + com.fasterxml.jackson.databind.JsonSerializer<Object> serializer) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidserializeAsField(Object bean, + com.fasterxml.jackson.core.JsonGenerator jgen, + com.fasterxml.jackson.databind.SerializerProvider prov) +
      Overridden version so that we can wrap output within wrapper element if + and as necessary.
      +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter

        +_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, depositSchemaProperty, fixAccess, get, getAnnotation, getContextAnnotation, getFullName, getGenericPropertyType, getInternalSetting, getMember, getName, getPropertyType, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, removeInternalSetting, rename, serializeAsElement, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.PropertyWriter

        +findAnnotation
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        +findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _wrapperQName

        +
        protected final QName _wrapperQName
        +
        Element name used as wrapper for collection.
        +
      • +
      + + + +
        +
      • +

        _wrappedQName

        +
        protected final QName _wrappedQName
        +
        Element name used for items in the collection
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanPropertyWriter

        +
        public XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped,
        +                             com.fasterxml.jackson.databind.PropertyName wrapperName,
        +                             com.fasterxml.jackson.databind.PropertyName wrappedName)
        +
      • +
      + + + +
        +
      • +

        XmlBeanPropertyWriter

        +
        public XmlBeanPropertyWriter(com.fasterxml.jackson.databind.ser.BeanPropertyWriter wrapped,
        +                             com.fasterxml.jackson.databind.PropertyName wrapperName,
        +                             com.fasterxml.jackson.databind.PropertyName wrappedName,
        +                             com.fasterxml.jackson.databind.JsonSerializer<Object> serializer)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        serializeAsField

        +
        public void serializeAsField(Object bean,
        +                             com.fasterxml.jackson.core.JsonGenerator jgen,
        +                             com.fasterxml.jackson.databind.SerializerProvider prov)
        +                      throws Exception
        +
        Overridden version so that we can wrap output within wrapper element if + and as necessary.
        +
        +
        Overrides:
        +
        serializeAsField in class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
        +
        Throws:
        +
        Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html new file mode 100644 index 000000000..671011c1c --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.html @@ -0,0 +1,599 @@ + + + + + + +XmlBeanSerializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    +
    public class XmlBeanSerializer
    +extends XmlBeanSerializerBase
    +
    Variant of BeanSerializer for XML handling.
    +
    +
    Author:
    +
    Pascal Gélinas
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBaseasArraySerializer() +
      Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
      +
      voidserialize(Object bean, + com.fasterxml.jackson.core.JsonGenerator g, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
      +
      StringtoString() 
      com.fasterxml.jackson.databind.JsonSerializer<Object>unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer unwrapper) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithByNameInclusion(Set<String> toIgnore, + Set<String> toInclude) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithFilterId(Object filterId) 
      com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter) 
      protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBasewithProperties(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties, + com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties) 
      + +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, createContextual, findConvertingSerializer, getSchema, properties, resolve, usesObjectId, withIgnorals, withIgnorals
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, replaceDelegatee
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(com.fasterxml.jackson.databind.ser.std.BeanSerializerBase src)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(XmlBeanSerializerBase src,
        +                         com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                         Object filterId)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializer

        +
        public XmlBeanSerializer(XmlBeanSerializerBase src,
        +                         com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + + + + + +
        +
      • +

        XmlBeanSerializer

        +
        protected XmlBeanSerializer(XmlBeanSerializerBase src,
        +                            com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                            com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        unwrappingSerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<Object> unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer unwrapper)
        +
        +
        Overrides:
        +
        unwrappingSerializer in class com.fasterxml.jackson.databind.JsonSerializer<Object>
        +
        +
      • +
      + + + +
        +
      • +

        withObjectIdWriter

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withObjectIdWriter(com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
        +
        Specified by:
        +
        withObjectIdWriter in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withFilterId

        +
        public com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withFilterId(Object filterId)
        +
        +
        Overrides:
        +
        withFilterId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withByNameInclusion

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withByNameInclusion(Set<String> toIgnore,
        +                                                                                        Set<String> toInclude)
        +
        +
        Specified by:
        +
        withByNameInclusion in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        withProperties

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase withProperties(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                                                                   com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
        +
        Specified by:
        +
        withProperties in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        asArraySerializer

        +
        protected com.fasterxml.jackson.databind.ser.std.BeanSerializerBase asArraySerializer()
        +
        Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
        +
        +
        Specified by:
        +
        asArraySerializer in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public void serialize(Object bean,
        +                      com.fasterxml.jackson.core.JsonGenerator g,
        +                      com.fasterxml.jackson.databind.SerializerProvider provider)
        +               throws IOException
        +
        Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
        +
        +
        Specified by:
        +
        serialize in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html new file mode 100644 index 000000000..b024697fd --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.html @@ -0,0 +1,700 @@ + + + + + + +XmlBeanSerializerBase (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializerBase

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer, Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    UnwrappingXmlBeanSerializer, XmlBeanSerializer
    +
    +
    +
    +
    public abstract class XmlBeanSerializerBase
    +extends com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
    +
    Specific sub-class of BeanSerializerBase needed to take care + of some xml-specific aspects, such as distinction between attributes + and elements.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +com.fasterxml.jackson.databind.JsonSerializer.None
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected int_attributeCount +
      Number of attributes to write; these will have been ordered to be the first + properties to write.
      +
      protected BitSet_cdata +
      Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment.
      +
      protected int_textPropertyIndex +
      Index of "text value" property we have, if any; can have at most + one such property.
      +
      protected QName[]_xmlNames +
      Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
      +
      static StringKEY_XML_INFO +
      Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes.
      +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_anyGetterWriter, _beanType, _filteredProps, _objectIdWriter, _propertyFilterId, _props, _serializationShape, _typeId, NAME_FOR_OBJECT_REF, NO_PROPS
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_handledType
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected static boolean_isAttribute(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw) 
      protected static boolean_isCData(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw) 
      protected static int_orderAttributesFirst(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties, + com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties) +
      Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
      +
      protected void_serializeObjectId(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen, + com.fasterxml.jackson.databind.SerializerProvider provider, + com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer, + com.fasterxml.jackson.databind.ser.impl.WritableObjectId objectId) 
      protected voidserializeFields(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen0, + com.fasterxml.jackson.databind.SerializerProvider provider) +
      Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
      +
      protected voidserializeFieldsFiltered(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen0, + com.fasterxml.jackson.databind.SerializerProvider provider) 
      voidserializeWithType(Object bean, + com.fasterxml.jackson.core.JsonGenerator gen, + com.fasterxml.jackson.databind.SerializerProvider provider, + com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase

        +_customTypeId, _serializeWithObjectId, _serializeWithObjectId, _typeIdDef, acceptJsonFormatVisitor, asArraySerializer, createContextual, findConvertingSerializer, getSchema, properties, resolve, serialize, usesObjectId, withByNameInclusion, withFilterId, withIgnorals, withIgnorals, withObjectIdWriter, withProperties
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        +_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        +getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, replaceDelegatee, unwrappingSerializer
      • +
      + +
        +
      • + + +

        Methods inherited from interface com.fasterxml.jackson.databind.jsonschema.SchemaAware

        +getSchema
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        KEY_XML_INFO

        +
        public static final String KEY_XML_INFO
        +
        Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes. + Created as separate non-interned String to ensure there are no collisions.
        +
      • +
      + + + +
        +
      • +

        _attributeCount

        +
        protected final int _attributeCount
        +
        Number of attributes to write; these will have been ordered to be the first + properties to write.
        +
      • +
      + + + +
        +
      • +

        _textPropertyIndex

        +
        protected final int _textPropertyIndex
        +
        Index of "text value" property we have, if any; can have at most + one such property.
        +
      • +
      + + + +
        +
      • +

        _xmlNames

        +
        protected final QName[] _xmlNames
        +
        Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
        +
      • +
      + + + +
        +
      • +

        _cdata

        +
        protected final BitSet _cdata
        +
        Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment. Left as null in cases where none of + element values are to be written in such a way.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        public XmlBeanSerializerBase(com.fasterxml.jackson.databind.ser.std.BeanSerializerBase src)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        protected XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                                com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        protected XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                                com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter objectIdWriter,
        +                                Object filterId)
        +
      • +
      + + + + + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        public XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                             com.fasterxml.jackson.databind.util.NameTransformer transformer)
        +
      • +
      + + + +
        +
      • +

        XmlBeanSerializerBase

        +
        protected XmlBeanSerializerBase(XmlBeanSerializerBase src,
        +                                com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        serializeFields

        +
        protected void serializeFields(Object bean,
        +                               com.fasterxml.jackson.core.JsonGenerator gen0,
        +                               com.fasterxml.jackson.databind.SerializerProvider provider)
        +                        throws IOException
        +
        Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
        +
        +
        Overrides:
        +
        serializeFields in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeFieldsFiltered

        +
        protected void serializeFieldsFiltered(Object bean,
        +                                       com.fasterxml.jackson.core.JsonGenerator gen0,
        +                                       com.fasterxml.jackson.databind.SerializerProvider provider)
        +                                throws IOException
        +
        +
        Overrides:
        +
        serializeFieldsFiltered in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeWithType

        +
        public void serializeWithType(Object bean,
        +                              com.fasterxml.jackson.core.JsonGenerator gen,
        +                              com.fasterxml.jackson.databind.SerializerProvider provider,
        +                              com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
        +                       throws IOException
        +
        +
        Overrides:
        +
        serializeWithType in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _serializeObjectId

        +
        protected void _serializeObjectId(Object bean,
        +                                  com.fasterxml.jackson.core.JsonGenerator gen,
        +                                  com.fasterxml.jackson.databind.SerializerProvider provider,
        +                                  com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer,
        +                                  com.fasterxml.jackson.databind.ser.impl.WritableObjectId objectId)
        +                           throws IOException
        +
        +
        Overrides:
        +
        _serializeObjectId in class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _isAttribute

        +
        protected static boolean _isAttribute(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw)
        +
      • +
      + + + +
        +
      • +

        _isCData

        +
        protected static boolean _isCData(com.fasterxml.jackson.databind.ser.BeanPropertyWriter bpw)
        +
      • +
      + + + +
        +
      • +

        _orderAttributesFirst

        +
        protected static int _orderAttributesFirst(com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] properties,
        +                                           com.fasterxml.jackson.databind.ser.BeanPropertyWriter[] filteredProperties)
        +
        Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html new file mode 100644 index 000000000..2391d1d5a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerModifier.html @@ -0,0 +1,331 @@ + + + + + + +XmlBeanSerializerModifier (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlBeanSerializerModifier

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlBeanSerializerModifier
    +extends com.fasterxml.jackson.databind.ser.BeanSerializerModifier
    +implements Serializable
    +
    We need a BeanSerializerModifier to replace default BeanSerializer + with XML-specific one; mostly to ensure that attribute properties are output + before element properties.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter>changeProperties(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> beanProperties) +
      First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
      +
      com.fasterxml.jackson.databind.JsonSerializer<?>modifySerializer(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.BeanDescription beanDesc, + com.fasterxml.jackson.databind.JsonSerializer<?> serializer) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.BeanSerializerModifier

        +modifyArraySerializer, modifyCollectionLikeSerializer, modifyCollectionSerializer, modifyEnumSerializer, modifyKeySerializer, modifyMapLikeSerializer, modifyMapSerializer, orderProperties, updateBuilder
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlBeanSerializerModifier

        +
        public XmlBeanSerializerModifier()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        changeProperties

        +
        public List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> changeProperties(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                                    com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                                    List<com.fasterxml.jackson.databind.ser.BeanPropertyWriter> beanProperties)
        +
        First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
        +
        +
        Overrides:
        +
        changeProperties in class com.fasterxml.jackson.databind.ser.BeanSerializerModifier
        +
        +
      • +
      + + + +
        +
      • +

        modifySerializer

        +
        public com.fasterxml.jackson.databind.JsonSerializer<?> modifySerializer(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                         com.fasterxml.jackson.databind.BeanDescription beanDesc,
        +                                                                         com.fasterxml.jackson.databind.JsonSerializer<?> serializer)
        +
        +
        Overrides:
        +
        modifySerializer in class com.fasterxml.jackson.databind.ser.BeanSerializerModifier
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html new file mode 100644 index 000000000..39aafea19 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.html @@ -0,0 +1,648 @@ + + + + + + +XmlSerializerProvider (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.ser
+

Class XmlSerializerProvider

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlSerializerProvider
    +extends com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
    +
    We need to override some parts of + SerializerProvider + implementation to handle oddities of XML output, like "extra" root element.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.Impl
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected XmlRootNameLookup_rootNameLookup 
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +_generator, _objectIdGenerators, _seenObjectIds
      • +
      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.SerializerProvider

        +_attributes, _config, _dateFormat, _keySerializer, _knownSerializers, _nullKeySerializer, _nullValueSerializer, _serializationView, _serializerCache, _serializerFactory, _stdNullValueSerializer, _unknownTypeSerializer, CACHE_UNKNOWN_MAPPINGS, DEFAULT_NULL_KEY_SERIALIZER, DEFAULT_UNKNOWN_SERIALIZER
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected ToXmlGenerator_asXmlGenerator(com.fasterxml.jackson.core.JsonGenerator gen) 
      protected void_initWithRootName(ToXmlGenerator xgen, + QName rootName) 
      protected QName_rootNameFromConfig() 
      protected void_serializeXmlNull(com.fasterxml.jackson.core.JsonGenerator gen) 
      protected void_startRootArray(ToXmlGenerator xgen, + QName rootName) 
      protected IOException_wrapAsIOE(com.fasterxml.jackson.core.JsonGenerator g, + Exception e) 
      com.fasterxml.jackson.databind.ser.DefaultSerializerProvidercopy() 
      com.fasterxml.jackson.databind.ser.DefaultSerializerProvidercreateInstance(com.fasterxml.jackson.databind.SerializationConfig config, + com.fasterxml.jackson.databind.ser.SerializerFactory jsf) 
      voidserializePolymorphic(com.fasterxml.jackson.core.JsonGenerator gen, + Object value, + com.fasterxml.jackson.databind.JavaType rootType, + com.fasterxml.jackson.databind.JsonSerializer<Object> valueSer, + com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) 
      voidserializeValue(com.fasterxml.jackson.core.JsonGenerator gen, + Object value) 
      voidserializeValue(com.fasterxml.jackson.core.JsonGenerator gen, + Object value, + com.fasterxml.jackson.databind.JavaType rootType) 
      voidserializeValue(com.fasterxml.jackson.core.JsonGenerator gen, + Object value, + com.fasterxml.jackson.databind.JavaType rootType, + com.fasterxml.jackson.databind.JsonSerializer<Object> ser) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider

        +_createObjectIdMap, _serializeNull, acceptJsonFormatVisitor, cachedSerializersCount, findObjectId, flushCachedSerializers, generateJsonSchema, getGenerator, hasSerializerFor, includeFilterInstance, includeFilterSuppressNulls, serializerInstance
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.SerializerProvider

        +_createAndCacheUntypedSerializer, _createAndCacheUntypedSerializer, _createUntypedSerializer, _dateFormat, _findExplicitUntypedSerializer, _handleContextualResolvable, _handleResolvable, _reportIncompatibleRootType, canOverrideAccessModifiers, constructSpecializedType, defaultSerializeDateKey, defaultSerializeDateKey, defaultSerializeDateValue, defaultSerializeDateValue, defaultSerializeField, defaultSerializeNull, defaultSerializeValue, findContentValueSerializer, findContentValueSerializer, findKeySerializer, findKeySerializer, findNullKeySerializer, findNullValueSerializer, findPrimaryPropertySerializer, findPrimaryPropertySerializer, findTypedValueSerializer, findTypedValueSerializer, findTypeSerializer, findValueSerializer, findValueSerializer, findValueSerializer, findValueSerializer, getActiveView, getAnnotationIntrospector, getAttribute, getConfig, getDefaultNullKeySerializer, getDefaultNullValueSerializer, getDefaultPropertyFormat, getDefaultPropertyInclusion, getFilterProvider, getLocale, getSerializationView, getTimeZone, getTypeFactory, getUnknownTypeSerializer, handlePrimaryContextualization, handleSecondaryContextualization, hasSerializationFeatures, invalidTypeIdException, isEnabled, isEnabled, isUnknownTypeSerializer, mappingException, mappingException, reportBadDefinition, reportBadDefinition, reportBadDefinition, reportBadPropertyDefinition, reportBadTypeDefinition, reportMappingProblem, reportMappingProblem, setAttribute, setDefaultKeySerializer, setNullKeySerializer, setNullValueSerializer
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.DatabindContext

        +_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlSerializerProvider

        +
        public XmlSerializerProvider(XmlRootNameLookup rootNames)
        +
      • +
      + + + +
        +
      • +

        XmlSerializerProvider

        +
        public XmlSerializerProvider(XmlSerializerProvider src,
        +                             com.fasterxml.jackson.databind.SerializationConfig config,
        +                             com.fasterxml.jackson.databind.ser.SerializerFactory f)
        +
      • +
      + + + +
        +
      • +

        XmlSerializerProvider

        +
        protected XmlSerializerProvider(XmlSerializerProvider src)
        +
        +
        Since:
        +
        2.8.9
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        copy

        +
        public com.fasterxml.jackson.databind.ser.DefaultSerializerProvider copy()
        +
        +
        Overrides:
        +
        copy in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        +
      • +
      + + + +
        +
      • +

        createInstance

        +
        public com.fasterxml.jackson.databind.ser.DefaultSerializerProvider createInstance(com.fasterxml.jackson.databind.SerializationConfig config,
        +                                                                                   com.fasterxml.jackson.databind.ser.SerializerFactory jsf)
        +
        +
        Specified by:
        +
        createInstance in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        +
      • +
      + + + +
        +
      • +

        serializeValue

        +
        public void serializeValue(com.fasterxml.jackson.core.JsonGenerator gen,
        +                           Object value)
        +                    throws IOException
        +
        +
        Overrides:
        +
        serializeValue in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeValue

        +
        public void serializeValue(com.fasterxml.jackson.core.JsonGenerator gen,
        +                           Object value,
        +                           com.fasterxml.jackson.databind.JavaType rootType)
        +                    throws IOException
        +
        +
        Overrides:
        +
        serializeValue in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializeValue

        +
        public void serializeValue(com.fasterxml.jackson.core.JsonGenerator gen,
        +                           Object value,
        +                           com.fasterxml.jackson.databind.JavaType rootType,
        +                           com.fasterxml.jackson.databind.JsonSerializer<Object> ser)
        +                    throws IOException
        +
        +
        Overrides:
        +
        serializeValue in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        serializePolymorphic

        +
        public void serializePolymorphic(com.fasterxml.jackson.core.JsonGenerator gen,
        +                                 Object value,
        +                                 com.fasterxml.jackson.databind.JavaType rootType,
        +                                 com.fasterxml.jackson.databind.JsonSerializer<Object> valueSer,
        +                                 com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
        +                          throws IOException
        +
        +
        Overrides:
        +
        serializePolymorphic in class com.fasterxml.jackson.databind.ser.DefaultSerializerProvider
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        _serializeXmlNull

        +
        protected void _serializeXmlNull(com.fasterxml.jackson.core.JsonGenerator gen)
        +                          throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        _rootNameFromConfig

        +
        protected QName _rootNameFromConfig()
        +
      • +
      + + + +
        +
      • +

        _asXmlGenerator

        +
        protected ToXmlGenerator _asXmlGenerator(com.fasterxml.jackson.core.JsonGenerator gen)
        +                                  throws com.fasterxml.jackson.databind.JsonMappingException
        +
        +
        Throws:
        +
        com.fasterxml.jackson.databind.JsonMappingException
        +
        +
      • +
      + + + +
        +
      • +

        _wrapAsIOE

        +
        protected IOException _wrapAsIOE(com.fasterxml.jackson.core.JsonGenerator g,
        +                                 Exception e)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html new file mode 100644 index 000000000..39c2a405a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.Feature.html @@ -0,0 +1,320 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html new file mode 100644 index 000000000..f2cc0b8d0 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/ToXmlGenerator.html @@ -0,0 +1,246 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html new file mode 100644 index 000000000..84af749a3 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/UnwrappingXmlBeanSerializer.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html new file mode 100644 index 000000000..3b964a976 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanPropertyWriter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html new file mode 100644 index 000000000..79ac3f019 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializer.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html new file mode 100644 index 000000000..1e260db37 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerBase.html @@ -0,0 +1,232 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html new file mode 100644 index 000000000..0c1b186dd --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlBeanSerializerModifier.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier

+
+
No usage of com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html new file mode 100644 index 000000000..5bfeaa695 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/class-use/XmlSerializerProvider.html @@ -0,0 +1,169 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html new file mode 100644 index 000000000..d21bf5b9f --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-frame.html @@ -0,0 +1,31 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.ser

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html new file mode 100644 index 000000000..ec4bafd60 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-summary.html @@ -0,0 +1,207 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.ser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html new file mode 100644 index 000000000..be37fd9bb --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-tree.html @@ -0,0 +1,208 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.ser Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.ser

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-use.html new file mode 100644 index 000000000..b51b6ad7c --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/ser/package-use.html @@ -0,0 +1,216 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.ser (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.ser

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html new file mode 100644 index 000000000..6d30c9059 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/AnnotationUtil.html @@ -0,0 +1,320 @@ + + + + + + +AnnotationUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class AnnotationUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class AnnotationUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AnnotationUtil

        +
        public AnnotationUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findNamespaceAnnotation

        +
        public static String findNamespaceAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                             com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsAttributeAnnotation

        +
        public static Boolean findIsAttributeAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                                com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsTextAnnotation

        +
        public static Boolean findIsTextAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                           com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      + + + +
        +
      • +

        findIsCDataAnnotation

        +
        public static Boolean findIsCDataAnnotation(com.fasterxml.jackson.databind.AnnotationIntrospector ai,
        +                                            com.fasterxml.jackson.databind.introspect.AnnotatedMember prop)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.html new file mode 100644 index 000000000..8745b2642 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.html @@ -0,0 +1,359 @@ + + + + + + +CaseInsensitiveNameSet (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class CaseInsensitiveNameSet

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html new file mode 100644 index 000000000..6424a74ba --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html @@ -0,0 +1,340 @@ + + + + + + +DefaultXmlPrettyPrinter.FixedSpaceIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.FixedSpaceIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html new file mode 100644 index 000000000..a8baca734 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Indenter.html @@ -0,0 +1,280 @@ + + + + + + +DefaultXmlPrettyPrinter.Indenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Interface DefaultXmlPrettyPrinter.Indenter

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        writeIndentation

        +
        void writeIndentation(com.fasterxml.jackson.core.JsonGenerator g,
        +                      int level)
        +               throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        isInline

        +
        boolean isInline()
        +
        +
        Returns:
        +
        True if indenter is considered inline (does not add linefeeds), + false otherwise
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html new file mode 100644 index 000000000..2bb994c03 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html @@ -0,0 +1,339 @@ + + + + + + +DefaultXmlPrettyPrinter.Lf2SpacesIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.Lf2SpacesIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html new file mode 100644 index 000000000..8f7364b42 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.NopIndenter.html @@ -0,0 +1,332 @@ + + + + + + +DefaultXmlPrettyPrinter.NopIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter.NopIndenter

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html new file mode 100644 index 000000000..8bd3c1b7a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.html @@ -0,0 +1,1129 @@ + + + + + + +DefaultXmlPrettyPrinter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class DefaultXmlPrettyPrinter

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.core.PrettyPrinter, com.fasterxml.jackson.core.util.Instantiatable<DefaultXmlPrettyPrinter>, XmlPrettyPrinter, Serializable
    +
    +
    +
    +
    public class DefaultXmlPrettyPrinter
    +extends Object
    +implements XmlPrettyPrinter, com.fasterxml.jackson.core.util.Instantiatable<DefaultXmlPrettyPrinter>, Serializable
    +
    Indentation to use with XML is different from JSON, because JSON + requires use of separator characters and XML just basic whitespace. +

    + Note that only a subset of methods of PrettyPrinter actually + get called by ToXmlGenerator; because of this, implementation + is bit briefer (and uglier...).

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        _objectIndenter

        +
        protected DefaultXmlPrettyPrinter.Indenter _objectIndenter
        +
        By default, let's use linefeed-adding indenter for separate + object entries. We'll further configure indenter to use + system-specific linefeeds, and 2 spaces per level (as opposed to, + say, single tabs)
        +
      • +
      + + + +
        +
      • +

        _spacesInObjectEntries

        +
        protected boolean _spacesInObjectEntries
        +
        By default we will add spaces around colons used to + separate object fields and values. + If disabled, will not use spaces around colon.
        +
      • +
      + + + +
        +
      • +

        _nesting

        +
        protected transient int _nesting
        +
        Number of open levels of nesting. Used to determine amount of + indentation to use.
        +
      • +
      + + + +
        +
      • +

        _justHadStartElement

        +
        protected transient boolean _justHadStartElement
        +
        Marker flag set on start element, and cleared if an end element + is encountered. Used for suppressing indentation to allow empty + elements.
        +
        +
        Since:
        +
        2.3
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DefaultXmlPrettyPrinter

        +
        public DefaultXmlPrettyPrinter()
        +
      • +
      + + + + +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html new file mode 100644 index 000000000..3d6bdb42d --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.html @@ -0,0 +1,379 @@ + + + + + + +StaxUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class StaxUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class StaxUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StaxUtil

        +
        public StaxUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        throwXmlAsIOException

        +
        @Deprecated
        +public static <T> T throwXmlAsIOException(XMLStreamException e)
        +                                               throws IOException
        +
        Deprecated. Since 2.9
        +
        Adapter method used when only IOExceptions are declared to be thrown, but + a XMLStreamException was caught. +

        + Note: dummy type variable is used for convenience, to allow caller to claim + that this method returns result of any necessary type.

        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        throwAsParseException

        +
        public static <T> T throwAsParseException(XMLStreamException e,
        +                                          com.fasterxml.jackson.core.JsonParser p)
        +                                   throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        throwAsGenerationException

        +
        public static <T> T throwAsGenerationException(XMLStreamException e,
        +                                               com.fasterxml.jackson.core.JsonGenerator g)
        +                                        throws IOException
        +
        +
        Throws:
        +
        IOException
        +
        Since:
        +
        2.9
        +
        +
      • +
      + + + +
        +
      • +

        sanitizeXmlTypeName

        +
        public static String sanitizeXmlTypeName(String name)
        +
        Since XML names can not contain all characters JSON names can, we may + need to replace characters. Let's start with trivial replacement of + ASCII characters that can not be included.
        +
      • +
      + + + +
        +
      • +

        toStax2Base64Variant

        +
        public static org.codehaus.stax2.typed.Base64Variant toStax2Base64Variant(com.fasterxml.jackson.core.Base64Variant j64b)
        +
        Helper method used to "convert" Jackson's Base64Variant into corresponding + Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.
        +
        +
        Parameters:
        +
        j64b - Jackson base64 variant to find match for
        +
        Returns:
        +
        Stax2 Base64 variant that most closely resembles Jackson canonical Base64 variant + passed in as argument
        +
        Since:
        +
        2.12
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html new file mode 100644 index 000000000..5c3a0067c --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/TypeUtil.html @@ -0,0 +1,291 @@ + + + + + + +TypeUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class TypeUtil

+
+
+ +
+
    +
  • +
    +
    +
    public class TypeUtil
    +extends Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TypeUtil

        +
        public TypeUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isIndexedType

        +
        public static boolean isIndexedType(com.fasterxml.jackson.databind.JavaType type)
        +
        Helper method used for figuring out if given raw type is a collection ("indexed") type; + in which case a wrapper element is typically added.
        +
      • +
      + + + +
        +
      • +

        isIndexedType

        +
        public static boolean isIndexedType(Class<?> cls)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html new file mode 100644 index 000000000..a211d1fa6 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlInfo.html @@ -0,0 +1,395 @@ + + + + + + +XmlInfo (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class XmlInfo

+
+
+ +
+
    +
  • +
    +
    +
    public class XmlInfo
    +extends Object
    +
    Helper container class used to contain XML specific information + we need to retain to construct proper bean serializer
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        _namespace

        +
        protected final String _namespace
        +
      • +
      + + + +
        +
      • +

        _isAttribute

        +
        protected final boolean _isAttribute
        +
      • +
      + + + +
        +
      • +

        _isText

        +
        protected final boolean _isText
        +
      • +
      + + + +
        +
      • +

        _isCData

        +
        protected final boolean _isCData
        +
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getNamespace

        +
        public String getNamespace()
        +
      • +
      + + + +
        +
      • +

        isAttribute

        +
        public boolean isAttribute()
        +
      • +
      + + + +
        +
      • +

        isText

        +
        public boolean isText()
        +
      • +
      + + + +
        +
      • +

        isCData

        +
        public boolean isCData()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html new file mode 100644 index 000000000..eb1ac18d1 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.html @@ -0,0 +1,391 @@ + + + + + + +XmlRootNameLookup (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.fasterxml.jackson.dataformat.xml.util
+

Class XmlRootNameLookup

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class XmlRootNameLookup
    +extends Object
    +implements Serializable
    +
    Helper class used for efficiently finding root element name used with + XML serializations.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected com.fasterxml.jackson.databind.util.LRUMap<com.fasterxml.jackson.databind.type.ClassKey,QName>_rootNames +
      For efficient operation, let's try to minimize number of times we + need to introspect root element name to use.
      +
      static QNameROOT_NAME_FOR_NULL +
      If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      XmlRootNameLookup() 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        ROOT_NAME_FOR_NULL

        +
        public static final QName ROOT_NAME_FOR_NULL
        +
        If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
        +
      • +
      + + + +
        +
      • +

        _rootNames

        +
        protected final transient com.fasterxml.jackson.databind.util.LRUMap<com.fasterxml.jackson.databind.type.ClassKey,QName> _rootNames
        +
        For efficient operation, let's try to minimize number of times we + need to introspect root element name to use. +

        + Note: changed to transient for 2.3; no point in serializing such + state

        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        XmlRootNameLookup

        +
        public XmlRootNameLookup()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readResolve

        +
        protected Object readResolve()
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public QName findRootName(com.fasterxml.jackson.databind.JavaType rootType,
        +                          com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      + + + +
        +
      • +

        findRootName

        +
        public QName findRootName(Class<?> rootType,
        +                          com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      + + + +
        +
      • +

        _findRootName

        +
        protected QName _findRootName(Class<?> rootType,
        +                              com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html new file mode 100644 index 000000000..a5ea614b7 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/AnnotationUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/CaseInsensitiveNameSet.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/CaseInsensitiveNameSet.html new file mode 100644 index 000000000..993b16ae5 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/CaseInsensitiveNameSet.html @@ -0,0 +1,166 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html new file mode 100644 index 000000000..7d897e9f2 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.FixedSpaceIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html new file mode 100644 index 000000000..4d7e22b4a --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Indenter.html @@ -0,0 +1,221 @@ + + + + + + +Uses of Interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html new file mode 100644 index 000000000..bfc4df3cb --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.Lf2SpacesIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html new file mode 100644 index 000000000..d9953edc2 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.NopIndenter.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html new file mode 100644 index 000000000..d7a016764 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/DefaultXmlPrettyPrinter.html @@ -0,0 +1,203 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html new file mode 100644 index 000000000..95b8a9661 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/StaxUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.StaxUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.StaxUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html new file mode 100644 index 000000000..dfd76722b --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/TypeUtil.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.TypeUtil (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.TypeUtil

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html new file mode 100644 index 000000000..828d62094 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlInfo.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.XmlInfo (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.XmlInfo

+
+
No usage of com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html new file mode 100644 index 000000000..6fab6fa60 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/class-use/XmlRootNameLookup.html @@ -0,0 +1,177 @@ + + + + + + +Uses of Class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-frame.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-frame.html new file mode 100644 index 000000000..cce0c3ba8 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-frame.html @@ -0,0 +1,34 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.12.0 API) + + + + + +

com.fasterxml.jackson.dataformat.xml.util

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-summary.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-summary.html new file mode 100644 index 000000000..fa01ba4bb --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-summary.html @@ -0,0 +1,218 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.fasterxml.jackson.dataformat.xml.util

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-tree.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-tree.html new file mode 100644 index 000000000..3f324e327 --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-tree.html @@ -0,0 +1,160 @@ + + + + + + +com.fasterxml.jackson.dataformat.xml.util Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.fasterxml.jackson.dataformat.xml.util

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-use.html b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-use.html new file mode 100644 index 000000000..fead8d6cd --- /dev/null +++ b/docs/javadoc/2.12/com/fasterxml/jackson/dataformat/xml/util/package-use.html @@ -0,0 +1,222 @@ + + + + + + +Uses of Package com.fasterxml.jackson.dataformat.xml.util (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.fasterxml.jackson.dataformat.xml.util

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/constant-values.html b/docs/javadoc/2.12/constant-values.html new file mode 100644 index 000000000..db5b4f912 --- /dev/null +++ b/docs/javadoc/2.12/constant-values.html @@ -0,0 +1,305 @@ + + + + + + +Constant Field Values (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

com.fasterxml.*

+ + + + +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/deprecated-list.html b/docs/javadoc/2.12/deprecated-list.html new file mode 100644 index 000000000..f9d2f44ff --- /dev/null +++ b/docs/javadoc/2.12/deprecated-list.html @@ -0,0 +1,215 @@ + + + + + + +Deprecated List (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/help-doc.html b/docs/javadoc/2.12/help-doc.html new file mode 100644 index 000000000..da0d53309 --- /dev/null +++ b/docs/javadoc/2.12/help-doc.html @@ -0,0 +1,231 @@ + + + + + + +API Help (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/index-all.html b/docs/javadoc/2.12/index-all.html new file mode 100644 index 000000000..6ad4cf742 --- /dev/null +++ b/docs/javadoc/2.12/index-all.html @@ -0,0 +1,2282 @@ + + + + + + +Index (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I J K L M N O P R S T U V W X _  + + +

A

+
+
addVirtualWrapping(Set<String>, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that may be called to indicate that specified names + (only local parts retained currently: this may be changed in + future) should be considered "auto-wrapping", meaning that + they will be doubled to contain two opening elements, two + matching closing elements.
+
+
addVirtualWrapping(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Deprecated.
+
+
AnnotationUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
AnnotationUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
asArraySerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
JSON Array output can not be done if unwrapping operation is requested; + so implementation will simply return 'this'.
+
+
asArraySerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
+
Implementation has to check whether as-array serialization + is possible reliably; if (and only if) so, will construct + a BeanAsArraySerializer, otherwise will return this + serializer as is.
+
+
+ + + +

B

+
+
beforeArrayValues(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
beforeObjectEntries(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
build() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
builder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
builder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
builder(XmlFactory) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
Builder(XmlMapper) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
+ + + +

C

+
+
canReadObjectId() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
canReadTypeId() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
canUseCharArrays() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
As of 2.4, we do have actual capability for passing char arrays + efficiently, but unfortunately + have no working mechanism for recycling buffers.
+
+
canWriteFormattedNumbers() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
CaseInsensitiveNameSet - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Helper class for matching element wrappers, possibly in case-insensitive + manner.
+
+
changeProperties(SerializationConfig, BeanDescription, List<BeanPropertyWriter>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
+
First thing to do is to find annotations regarding XML serialization, + and wrap collection serializers.
+
+
checkNextIsUnwrapped() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called to see if unwrapping is required; and if so, + clear the flag (so further calls will return 'false' unless + state is re-set)
+
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
close() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
closeCompletely() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
collectDefaults() - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Method that calculates bit set (flags) of all features that + are enabled by default.
+
+
collectDefaults() - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Method that calculates bit set (flags) of all features that + are enabled by default.
+
+
com.fasterxml.jackson.dataformat.xml - package com.fasterxml.jackson.dataformat.xml
+
+
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
+
com.fasterxml.jackson.dataformat.xml.annotation - package com.fasterxml.jackson.dataformat.xml.annotation
+
+
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
+
com.fasterxml.jackson.dataformat.xml.deser - package com.fasterxml.jackson.dataformat.xml.deser
+
 
+
com.fasterxml.jackson.dataformat.xml.jaxb - package com.fasterxml.jackson.dataformat.xml.jaxb
+
 
+
com.fasterxml.jackson.dataformat.xml.ser - package com.fasterxml.jackson.dataformat.xml.ser
+
 
+
com.fasterxml.jackson.dataformat.xml.util - package com.fasterxml.jackson.dataformat.xml.util
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling or disabling specified XML parser feature.
+
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling or disabling specified XML generator feature.
+
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
configure(ToXmlGenerator.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
configure(FromXmlParser.Feature, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
construct(Set<String>) - Static method in class com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet
+
 
+
contains(Object) - Method in class com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet
+
 
+
convertToArray() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Note: compared to base implementation by JsonFactory, + here the copy will actually share underlying XML input and + output factories, as there is no way to make copies of those.
+
+
copy() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
createChildArrayContext(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createChildObjectContext(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createContextual(DeserializationContext, BeanProperty) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
createContextual(DeserializationContext, BeanProperty) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
createDummyInstance(DeserializationConfig) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
createGenerator(OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(OutputStream, JsonEncoding) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(File, JsonEncoding) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
createGenerator(XMLStreamWriter) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Factory method that wraps given XMLStreamWriter, usually to allow + incremental serialization to compose large output by serializing a sequence + of individual objects.
+
+
createInstance(DeserializationConfig, JsonParser, InjectableValues) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
createInstance(SerializationConfig, SerializerFactory) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
createInstance() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
createParser(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Overridden just to prevent trying to optimize access via char array; + while nice idea, problem is that we don't have proper hooks to ensure + that temporary buffer gets recycled; so let's just use StringReader.
+
+
createParser(XMLStreamReader) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Factory method that wraps given XMLStreamReader, usually to allow + partial data-binding.
+
+
createRootContext(int, int) - Static method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
createRootContext() - Static method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
+ + + +

D

+
+
decodeXmlClassName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
+
Helper method for decoding "XML safe" Java class name back into + actual class name
+
+
DEFAULT_UNKNOWN_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
If we support optional definition of element names, this is the element + name to use...
+
+
DEFAULT_UNNAMED_TEXT_PROPERTY - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
The default name placeholder for XML text segments is empty + String ("").
+
+
DEFAULT_USE_WRAPPER - Static variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
+
For backwards compatibility with 2.0, the default behavior is + to assume use of List wrapper if no annotations are used.
+
+
DEFAULT_XML_MODULE - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
DEFAULT_XML_PRETTY_PRINTER - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
DefaultingXmlTypeResolverBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Sub-class of StdTypeResolverBuilder specifically used with + Default Typing.
+
+
DefaultingXmlTypeResolverBuilder(ObjectMapper.DefaultTyping, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
defaultInputFactory() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
defaultOutputFactory() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
defaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
DefaultXmlPrettyPrinter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Indentation to use with XML is different from JSON, because JSON + requires use of separator characters and XML just basic whitespace.
+
+
DefaultXmlPrettyPrinter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
DefaultXmlPrettyPrinter(DefaultXmlPrettyPrinter) - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
DefaultXmlPrettyPrinter.FixedSpaceIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
This is a very simple indenter that only every adds a + single space for indentation.
+
+
DefaultXmlPrettyPrinter.Indenter - Interface in com.fasterxml.jackson.dataformat.xml.util
+
+
Interface that defines objects that can produce indentation used + to separate object entries and array values.
+
+
DefaultXmlPrettyPrinter.Lf2SpacesIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Default linefeed-based indenter uses system-specific linefeeds and + 2 spaces for indentation per level.
+
+
DefaultXmlPrettyPrinter.NopIndenter - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Dummy implementation that adds no indentation whatsoever
+
+
deserialize(JsonParser, DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext, Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext, Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
deserializeWithType(JsonParser, DeserializationContext, TypeDeserializer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
deserializeWithType(JsonParser, DeserializationContext, TypeDeserializer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for disabling specified XML parser feature.
+
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for disabling specified XML generator feature.
+
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(FromXmlParser.Feature, FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(ToXmlGenerator.Feature, ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
disable(FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
disable(ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
disable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
disable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
+ + + +

E

+
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling specified XML parser feature.
+
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method for enabling specified XML generator feature.
+
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(FromXmlParser.Feature, FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(ToXmlGenerator.Feature, ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
enable(FromXmlParser.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
enable(ToXmlGenerator.Feature...) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
enable(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
enable(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
enabledByDefault() - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
enabledByDefault() - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
enabledIn(int) - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
enabledIn(int) - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
encodeXmlClassName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
+
Helper method for encoding regular Java class name in form that + can be used as XML element name.
+
+
extractScalarFromObject(JsonParser, JsonDeserializer<?>, Class<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
+ + + +

F

+
+
findIsAttributeAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findIsCDataAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findIsTextAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findNameForDeserialization(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNameForSerialization(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
findNamespace(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method that can be called to figure out generic namespace + property for an annotated object.
+
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
findNamespace(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
findNamespaceAnnotation(AnnotationIntrospector, AnnotatedMember) - Static method in class com.fasterxml.jackson.dataformat.xml.util.AnnotationUtil
+
 
+
findRootName(AnnotatedClass) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
findRootName(JavaType, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
findRootName(Class<?>, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
findWrapperName(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
finishWrappedValue(QName, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called after a structured collection output has completed
+
+
FixedSpaceIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
flush() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
FORMAT_NAME_XML - Static variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Name used to identify XML format + (and returned by XmlFactory.getFormatName()
+
+
formatGeneratorFeaturesMask() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
formatParserFeaturesMask() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
FromXmlParser - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
JsonParser implementation that exposes XML structure as + set of JSON events that can be used for data binding.
+
+
FromXmlParser(IOContext, int, int, ObjectCodec, XMLStreamReader) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
FromXmlParser.Feature - Enum in com.fasterxml.jackson.dataformat.xml.deser
+
+
Enumeration that defines all togglable features for XML parsers.
+
+
+ + + +

G

+
+
getBigIntegerValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getBinaryValue(Base64Variant) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getCodec() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getCurrentLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that returns location of the last processed character; + usually for error reporting purposes
+
+
getCurrentLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that can be called to get the name associated with + the current event.
+
+
getCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getCurrentToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getCurrentValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getDecimalValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getDoubleValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getEmbeddedObject() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
getFloatValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getFormatFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getFormatFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
getFormatGeneratorFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatName() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that returns short textual id identifying format + this factory supports.
+
+
getFormatParserFeatures() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatReadFeatureType() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getFormatWriteFeatureType() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getIntValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getLocalName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Accessor for local name of current named event (that is, + XML_START_ELEMENT or XML_ATTRIBUTE_NAME).
+
+
getLongValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getMask() - Method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
 
+
getMask() - Method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
 
+
getNamespace() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
getNamespaceURI() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getNumberType() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getNumberValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getOutputBuffered() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Stax2 does not expose buffered content amount, so we can only return + -1 from here
+
+
getOutputTarget() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
getParent() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getParsingContext() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getReadCapabilities() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getStartLocation(Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
getStaxReader() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that allows application direct access to underlying + Stax XMLStreamWriter.
+
+
getStaxWriter() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method that allows application direct access to underlying + Stax XMLStreamWriter.
+
+
getText() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getText(Writer) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getText() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getTextCharacters() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTextLength() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTextOffset() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
getTokenLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method that return the starting location of the current + token; that is, position of the first character from input + that starts the current token.
+
+
getTokenLocation() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getWriteCapabilities() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
getXMLInputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getXMLOutputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
getXmlReader() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
getXMLTextElementName() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
+ + + +

H

+
+
handleMissingName() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
hasCurrentName() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
hasFormat(InputAccessor) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
hasTextCharacters() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
XML input actually would offer access to character arrays; but since + we must coalesce things it cannot really be exposed.
+
+
hasXMLFormat(InputAccessor) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that tries to figure out if content seems to be in some kind + of XML format.
+
+
hasXsiNil() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
+ + + +

I

+
+
idFromValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
idFromValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
idResolver(MapperConfig<?>, JavaType, PolymorphicTypeValidator, Collection<NamedType>, boolean, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
idResolver(MapperConfig<?>, JavaType, PolymorphicTypeValidator, Collection<NamedType>, boolean, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
indentArraysWith(DefaultXmlPrettyPrinter.Indenter) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
indentObjectsWith(DefaultXmlPrettyPrinter.Indenter) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
init(JsonTypeInfo.Id, TypeIdResolver) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
init(JsonTypeInfo.Id, TypeIdResolver) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
initGenerator() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called before writing any other output, to optionally + output XML declaration.
+
+
initialize() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Second part of initialization, to be called immediately after construction
+
+
inputFactory(XMLInputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
inRoot() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
instance(AnnotationIntrospector, AnnotationIntrospector) - Static method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isAttribute() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isCData() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isClosed() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
isEnabled(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
isEnabled(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
isEnabled(FromXmlParser.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Checked whether specified XML parser feature is enabled.
+
+
isEnabled(ToXmlGenerator.Feature) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Check whether specified XML generator feature is enabled.
+
+
isExpectedNumberIntToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Since xml representation can not really distinguish between different + scalar types (numbers, booleans) -- they are all just Character Data, + without schema -- we can try to infer type from intent here.
+
+
isExpectedStartArrayToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Since xml representation can not really distinguish between array + and object starts (both are represented with elements), this method + is overridden and taken to mean that expecation is that the current + start element is to mean 'start array', instead of default of + 'start object'.
+
+
isIndexedType(JavaType) - Static method in class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
+
Helper method used for figuring out if given raw type is a collection ("indexed") type; + in which case a wrapper element is typically added.
+
+
isIndexedType(Class<?>) - Static method in class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
isInline() - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
isInline() - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
isNaN() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
isOutputAsAttribute(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it be output as an XML attribute or not (as element)
+
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsAttribute(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
isOutputAsCData(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be wrapped in a CDATA tag.
+
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsCData(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
isOutputAsText(Annotated) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
+
Method used to check whether given annotated element + (field, method, constructor parameter) has indicator that suggests + it should be serialized as text, without element wrapper.
+
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
isOutputAsText(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
isText() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
isUnwrappingSerializer() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
iterator() - Method in class com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet
+
 
+
+ + + +

J

+
+
JacksonXmlAnnotationIntrospector - Class in com.fasterxml.jackson.dataformat.xml
+
+
Extension of JacksonAnnotationIntrospector that is needed to support + additional xml-specific annotation that Jackson provides.
+
+
JacksonXmlAnnotationIntrospector() - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
JacksonXmlAnnotationIntrospector(boolean) - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
JacksonXmlCData - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Adding this annotation will result in value of the property to be serialized + within an xml CDATA section.
+
+
JacksonXmlElementWrapper - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that is similar to JAXB javax.xml.bind.annotation.XmlElementWrapper, + to indicate wrapper element to use (if any) for Collection types (arrays, + Collection).
+
+
JacksonXmlModule - Class in com.fasterxml.jackson.dataformat.xml
+
+
Module that implements most functionality needed to support producing and + consuming XML instead of JSON, used by XmlMapper for registering + handlers for XML-specific processing.
+
+
JacksonXmlModule() - Constructor for class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
JacksonXmlProperty - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that can be used to provide XML-specific configuration + for properties, above and beyond what + JsonProperty contains.
+
+
JacksonXmlRootElement - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Annotation that can be used to define name of root element used + for the root-level object when serialized, which normally uses + name of the type (class).
+
+
JacksonXmlText - Annotation Type in com.fasterxml.jackson.dataformat.xml.annotation
+
+
Interface that is loosely similar to XmlValue + in that it can be used on one (and only one!) property of a POJO.
+
+
JaxbWrapper(JaxbAnnotationIntrospector) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
+ + + +

K

+
+
KEY_XML_INFO - Static variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Marker used for storing associated internal data with BeanPropertyWriter + instances; to mark instances that are to be written out as attributes.
+
+
+ + + +

L

+
+
Lf2SpacesIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
+ + + +

M

+
+
modifyDeserializer(DeserializationConfig, BeanDescription, JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
modifySerializer(SerializationConfig, BeanDescription, JsonSerializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
 
+
+ + + +

N

+
+
nameForTextElement() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
nameForTextElement(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
nameForTextElement(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper.Builder
+
 
+
newDelegatingInstance(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
newDelegatingInstance(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
next() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
nextTextValue() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method overridden to support more reliable deserialization of + String collections.
+
+
nextToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
NopIndenter() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
+ + + +

O

+
+
outputFactory(XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
overrideCurrentName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
overrideFormatFeatures(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
overrideFormatFeatures(int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
+ + + +

P

+
+
PackageVersion - Class in com.fasterxml.jackson.dataformat.xml
+
+
Automatically generated from PackageVersion.java.in during + packageVersion-generate execution of maven-replacer-plugin in + pom.xml.
+
+
PackageVersion() - Constructor for class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
Pair(AnnotationIntrospector, AnnotationIntrospector) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
pushbackCurrentToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method that can be called to ask stream to literally just return current token + with the next call to XmlTokenStream.next(), without more work.
+
+
+ + + +

R

+
+
readResolve() - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
readResolve() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Method that we need to override to actually make restoration go + through constructors etc.
+
+
readRootValue(JsonParser, JavaType, JsonDeserializer<Object>, Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
readValue(XMLStreamReader, Class<T>) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
readValue(XMLStreamReader, TypeReference<T>) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
readValue(XMLStreamReader, JavaType) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for reading a single XML value from given XML-specific input + source; useful for incremental data-binding, combining traversal using + basic Stax XMLStreamReader with data-binding by Jackson.
+
+
rebuild() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
repeatStartElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method used to add virtual wrapping, which just duplicates START_ELEMENT + stream points to, and its matching closing element.
+
+
requiresCustomCodec() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
+
+
requiresCustomCodec() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
XML format does require support from custom ObjectCodec + (that is, XmlMapper), so need to return true here.
+
+
reset(int, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
ROOT_NAME_FOR_NULL - Static variable in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
+
If all we get to serialize is a null, there's no way to figure out + expected root name; so let's just default to literal "null".
+
+
+ + + +

S

+
+
sanitizeXmlTypeName(String) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
+
Since XML names can not contain all characters JSON names can, we may + need to replace characters.
+
+
serialize(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
+
+
serialize(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
+
Main serialization method that will delegate actual output to configured + BeanPropertyWriter instances.
+
+
serializeAsField(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Overridden version so that we can wrap output within wrapper element if + and as necessary.
+
+
serializeFields(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Main serialization method needs to be overridden to allow XML-specific + extra handling, such as indication of whether to write attributes or + elements.
+
+
serializeFieldsFiltered(Object, JsonGenerator, SerializerProvider) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
serializePolymorphic(JsonGenerator, Object, JavaType, JsonSerializer<Object>, TypeSerializer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeValue(JsonGenerator, Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeValue(JsonGenerator, Object, JavaType) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeValue(JsonGenerator, Object, JavaType, JsonSerializer<Object>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
serializeWithType(Object, JsonGenerator, SerializerProvider, TypeSerializer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
setCodec(ObjectCodec) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
setCurrentName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setCurrentValue(Object) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Method that can be used to define whether AnnotationIntrospector + we register will use wrapper for indexed (List, array) properties or not, + if there are no explicit annotations.
+
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
setDefaultUseWrapper(boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
+
 
+
setDefaultUseWrapper(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Deprecated. + +
+
+
setFormatFeatures(int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
setNamesToWrap(Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
setNextIsAttribute(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextIsCData(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextIsUnwrapped(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextName(QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setNextNameIfMissing(QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method that does same as ToXmlGenerator.setNextName(javax.xml.namespace.QName), unless + a name has already been set.
+
+
setPrettyPrinter(PrettyPrinter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
setupModule(Module.SetupContext) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
setXMLInputFactory(XMLInputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Deprecated. +
Since 2.12 -- should be set as part of build process + (either in builder, or constructor)
+
+
+
setXMLOutputFactory(XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Deprecated. +
Since 2.12 -- should be set as part of build process + (either in builder, or constructor)
+
+
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Method that can be used to define alternate "virtual name" to use + for XML CDATA segments; that is, text values.
+
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
setXMLTextElementName(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Deprecated. + +
+
+
shouldWrap(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
size() - Method in class com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet
+
 
+
skipAttributes() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method called to skip any attributes current START_ELEMENT may have, + so that they are not returned as token.
+
+
skipEndElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
spacesInObjectEntries(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
startWrappedValue(QName, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Methdod called when a structured (collection, array, map) is being + output.
+
+
StaxUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
StaxUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
+ + + +

T

+
+
throwAsGenerationException(XMLStreamException, JsonGenerator) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
throwAsParseException(XMLStreamException, JsonParser) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
 
+
throwXmlAsIOException(XMLStreamException) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
+
Deprecated. +
Since 2.9
+
+
+
toStax2Base64Variant(Base64Variant) - Static method in class com.fasterxml.jackson.dataformat.xml.util.StaxUtil
+
+
Helper method used to "convert" Jackson's Base64Variant into corresponding + Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.
+
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
+
Overridden to provide developer readable "JsonPath" representation + of the context.
+
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
toString() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
ToXmlGenerator - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
JsonGenerator that outputs JAXB-style XML output instead of JSON content.
+
+
ToXmlGenerator(IOContext, int, int, ObjectCodec, XMLStreamWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
ToXmlGenerator.Feature - Enum in com.fasterxml.jackson.dataformat.xml.ser
+
+
Enumeration that defines all togglable extra XML-specific features
+
+
typeFromId(DatabindContext, String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
typeFromId(DatabindContext, String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
typeProperty(String) - Method in class com.fasterxml.jackson.dataformat.xml.DefaultingXmlTypeResolverBuilder
+
 
+
typeProperty(String) - Method in class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
TypeUtil - Class in com.fasterxml.jackson.dataformat.xml.util
+
 
+
TypeUtil() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.TypeUtil
+
 
+
+ + + +

U

+
+
unwrappingSerializer(NameTransformer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
unwrappingSerializer(NameTransformer) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Copy of UnwrappingBeanSerializer required to extend + XmlBeanSerializerBase for XML-specific handling.
+
+
UnwrappingXmlBeanSerializer(XmlBeanSerializerBase, NameTransformer) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Constructor used for creating unwrapping instance of a standard + BeanSerializer
+
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, Set<String>, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer, BeanPropertyWriter[], BeanPropertyWriter[]) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
updateProperties(DeserializationConfig, BeanDescription, List<BeanPropertyDefinition>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
USE_PROPERTY_NAME - Static variable in annotation type com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
+
+
Marker value (empty String) that denotes that the underlying property + name should also be used as the wrapper name, effectively "doubling" + start and end elements.
+
+
+ + + +

V

+
+
valueOf(String) - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.Feature
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.Feature
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
valueStarted() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
+
Method called to mark start of new value, mostly to update `index` + for Array and Root contexts.
+
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
VERSION - Static variable in class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.PackageVersion
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
version() - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
+ + + +

W

+
+
with(DeserializerFactory) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
 
+
withByNameInclusion(Set<String>, Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withByNameInclusion(Set<String>, Set<String>) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
withFilterId(Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withFilterId(Object) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
withObjectIdWriter(ObjectIdWriter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withObjectIdWriter(ObjectIdWriter) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
withProperties(BeanPropertyWriter[], BeanPropertyWriter[]) - Method in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
 
+
withProperties(BeanPropertyWriter[], BeanPropertyWriter[]) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
WrapperHandlingDeserializer - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Delegating deserializer whose only function is to handle case of + "unwrapped" List/array deserialization from XML.
+
+
WrapperHandlingDeserializer(BeanDeserializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
WrapperHandlingDeserializer(BeanDeserializerBase, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
writeArrayValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeBinary(Base64Variant, byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeBinary(Base64Variant, InputStream, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeBoolean(boolean) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndArray() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndArray(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeEndElement(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeEndElement(XMLStreamWriter2, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for forcibly writing an end element, without going + through Jackson generator (and thus, without updating currently + active element stack)
+
+
writeEndObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeEndObject(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeFieldName(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeFieldName(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.FixedSpaceIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in interface com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Indenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.Lf2SpacesIndenter
+
 
+
writeIndentation(JsonGenerator, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
writeIndentation(XMLStreamWriter2, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.NopIndenter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, String, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, char[], int, int, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, long) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, double) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, float) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigInteger) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigDecimal) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, Base64Variant, byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, String, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, char[], int, int, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, boolean) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, long) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, double) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, float) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigInteger) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, BigDecimal) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafElement(XMLStreamWriter2, String, String, Base64Variant, byte[], int, int) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafNullElement(XMLStreamWriter2, String, String) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeLeafNullElement(XMLStreamWriter2, String, String) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
 
+
writeLeafXsiNilElement(XMLStreamWriter2, String, String) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeNull() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(long) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(double) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(float) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(BigDecimal) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(BigInteger) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeNumber(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeObjectEntrySeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeObjectFieldValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writePrologLinefeed(XMLStreamWriter2) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writePrologLinefeed(XMLStreamWriter2) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for trying to write a linefeed to separate entities outside of the + root element (that is, in prolog or epilog), most often called to separate + XML declaration from the root element.
+
+
writeRaw(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(String, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRaw(char) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawUTF8String(byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(String, int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRawValue(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeRepeatedFieldName() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Trivial helper method called when to add a replicated wrapper name
+
+
writeRootValueSeparator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartArray() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStartArray(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartElement(XMLStreamWriter2, String, String) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeStartElement(XMLStreamWriter2, String, String) - Method in interface com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter
+
+
Method for forcibly writing a start element, without going + through Jackson generator (and thus, without updating currently + active element stack)
+
+
writeStartObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStartObject(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
 
+
writeString(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeString(char[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeString(SerializableString) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeStringField(String, String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeUTF8String(byte[], int, int) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
writeValue(XMLStreamWriter, Object) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
+
Method for serializing given value using specific XMLStreamReader: + useful when building large XML files by binding individual items, one at + a time.
+
+
+ + + +

X

+
+
XML_ATTRIBUTE_NAME - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_ATTRIBUTE_VALUE - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_DELAYED_START_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_END - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_END_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_READ_CAPABILITIES - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
XML format has some peculiarities, indicated via new (2.12) capability + system.
+
+
XML_ROOT_TEXT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_START_ELEMENT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XML_TEXT - Static variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XmlAnnotationIntrospector - Interface in com.fasterxml.jackson.dataformat.xml
+
+
Additional extension interface used above and beyond + AnnotationIntrospector to handle XML-specific configuration.
+
+
XmlAnnotationIntrospector.JaxbWrapper - Class in com.fasterxml.jackson.dataformat.xml
+
+
Wrapper we need to adapt JaxbAnnotationIntrospector as + XmlAnnotationIntrospector: something we can not (alas!) + do in JAXB module because of dependency direction (JAXB module + has no knowledge of this module).
+
+
XmlAnnotationIntrospector.Pair - Class in com.fasterxml.jackson.dataformat.xml
+
+
Extension of AnnotationIntrospector.Pair that can + also dispatch 'XmlAnnotationIntrospector' methods.
+
+
XmlBeanDeserializerModifier - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
The main reason for a modifier is to support handling of + 'wrapped' Collection types.
+
+
XmlBeanDeserializerModifier(String) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
 
+
XmlBeanPropertyWriter - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Property writer sub-class used for handling element wrapping needed for serializing + collection (array, Collection; possibly Map) types.
+
+
XmlBeanPropertyWriter(BeanPropertyWriter, PropertyName, PropertyName) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
 
+
XmlBeanPropertyWriter(BeanPropertyWriter, PropertyName, PropertyName, JsonSerializer<Object>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
 
+
XmlBeanSerializer - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Variant of BeanSerializer for XML handling.
+
+
XmlBeanSerializer(BeanSerializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, Set<String>, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializer(XmlBeanSerializerBase, BeanPropertyWriter[], BeanPropertyWriter[]) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer
+
 
+
XmlBeanSerializerBase - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
Specific sub-class of BeanSerializerBase needed to take care + of some xml-specific aspects, such as distinction between attributes + and elements.
+
+
XmlBeanSerializerBase(BeanSerializerBase) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, ObjectIdWriter) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, ObjectIdWriter, Object) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, Set<String>, Set<String>) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, NameTransformer) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerBase(XmlBeanSerializerBase, BeanPropertyWriter[], BeanPropertyWriter[]) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
XmlBeanSerializerModifier - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
We need a BeanSerializerModifier to replace default BeanSerializer + with XML-specific one; mostly to ensure that attribute properties are output + before element properties.
+
+
XmlBeanSerializerModifier() - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier
+
 
+
xmlBuilder() - Static method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlClassNameIdResolver(JavaType, TypeFactory, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlClassNameIdResolver
+
 
+
XmlDeserializationContext - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
XML-specific DeserializationContext needed to override certain + handlers.
+
+
XmlDeserializationContext(DeserializerFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
+
+
Default constructor for a blueprint object, which will use the standard + DeserializerCache, given factory.
+
+
XmlFactory - Class in com.fasterxml.jackson.dataformat.xml
+
+
Factory used for constructing FromXmlParser and ToXmlGenerator + instances.
+
+
XmlFactory() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Default constructor used to create factory instances.
+
+
XmlFactory(ObjectCodec) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XMLInputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(ObjectCodec, XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(ObjectCodec, int, int, XMLInputFactory, XMLOutputFactory, String) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XmlFactory, ObjectCodec) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
XmlFactory(XmlFactoryBuilder) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Constructors used by JsonFactoryBuilder for instantiation.
+
+
XmlFactoryBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
TSFBuilder + implementation for constructing XmlFactory + instances.
+
+
XmlFactoryBuilder() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlFactoryBuilder(XmlFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlInfo - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Helper container class used to contain XML specific information + we need to retain to construct proper bean serializer
+
+
XmlInfo(Boolean, String, Boolean, Boolean) - Constructor for class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
xmlInputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlJaxbAnnotationIntrospector - Class in com.fasterxml.jackson.dataformat.xml.jaxb
+
+
Deprecated. +
Since 2.12 (as per above notes)
+
+
+
XmlJaxbAnnotationIntrospector() - Constructor for class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
+
XmlJaxbAnnotationIntrospector(TypeFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
+
+
Deprecated.
+
XmlMapper - Class in com.fasterxml.jackson.dataformat.xml
+
+
Customized ObjectMapper that will read and write XML instead of JSON, + using XML-backed JsonFactory + implementation (XmlFactory).
+
+
XmlMapper() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XMLInputFactory, XMLOutputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XMLInputFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(JacksonXmlModule) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlFactory, JacksonXmlModule) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper(XmlMapper) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
XmlMapper.Builder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Builder implementation for constructing XmlMapper instances.
+
+
XmlMinimalClassNameIdResolver(JavaType, TypeFactory, PolymorphicTypeValidator) - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver
+
 
+
xmlOutputFactory() - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
 
+
XmlPrettyPrinter - Interface in com.fasterxml.jackson.dataformat.xml
+
+
There are some XML-specific quirks that need extra TLC when + indenting: so we will use a refinement of general purpose one.
+
+
XmlReadContext - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Extension of JsonStreamContext, which implements + core methods needed, and adds small amount of additional + state data we need.
+
+
XmlReadContext(XmlReadContext, int, int, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
XmlRootNameLookup - Class in com.fasterxml.jackson.dataformat.xml.util
+
+
Helper class used for efficiently finding root element name used with + XML serializations.
+
+
XmlRootNameLookup() - Constructor for class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
XmlSerializerProvider - Class in com.fasterxml.jackson.dataformat.xml.ser
+
+
We need to override some parts of + SerializerProvider + implementation to handle oddities of XML output, like "extra" root element.
+
+
XmlSerializerProvider(XmlRootNameLookup) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlSerializerProvider(XmlSerializerProvider, SerializationConfig, SerializerFactory) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlSerializerProvider(XmlSerializerProvider) - Constructor for class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
XmlTextDeserializer - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Delegating deserializer that is used in the special cases where + we may sometimes see a "plain" String value but need to map it + as if it was a property of POJO.
+
+
XmlTextDeserializer(BeanDeserializerBase, SettableBeanProperty) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
XmlTextDeserializer(BeanDeserializerBase, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
XmlTokenStream - Class in com.fasterxml.jackson.dataformat.xml.deser
+
+
Simple helper class used on top of STAX XMLStreamReader to further + abstract out all irrelevant details, and to expose equivalent of flat token + stream with no "fluff" tokens (comments, processing instructions, mixed + content) all of which is just to simplify + actual higher-level conversion to JSON tokens.
+
+
XmlTokenStream(XMLStreamReader, Object, int) - Constructor for class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
XmlTypeResolverBuilder - Class in com.fasterxml.jackson.dataformat.xml
+
+
Custom specialization of StdTypeResolverBuilder; needed so that + type id property name can be modified as necessary to make it legal + XML element or attribute name.
+
+
XmlTypeResolverBuilder() - Constructor for class com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
+
 
+
XmlTypeResolverBuilder.XmlClassNameIdResolver - Class in com.fasterxml.jackson.dataformat.xml
+
 
+
XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver - Class in com.fasterxml.jackson.dataformat.xml
+
 
+
+ + + +

_

+
+
_allWs(String) - Static method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_arrayIndenter - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default, let's use only spaces to separate array values.
+
+
_asXmlGenerator(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_attributeCount - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_attributeCount - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Number of attributes to write; these will have been ordered to be the first + properties to write.
+
+
_binaryValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
We will hold on to decoded binary data, for duration of + current event, so that multiple calls to + FromXmlParser.getBinaryValue(com.fasterxml.jackson.core.Base64Variant) will not need to decode data more + than once.
+
+
_byteArrayBuilder - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
ByteArrayBuilder is needed if 'getBinaryValue' is called.
+
+
_caseInsensitive - Variable in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_cdata - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Optional set of indexes of properties that should be serialized as CDATA, + instead of regular XML text segment.
+
+
_cfgDefaultUseWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
_cfgDefaultUseWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Determination of whether indexed properties (arrays, Lists) that are not explicitly + annotated (with JacksonXmlElementWrapper + or equivalent) should default to using implicit wrapper (with same name as property) or not.
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
+
Name used for pseudo-property used for returning XML Text value (which does + not have actual element name to use).
+
+
_cfgNameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_cfgNameForTextValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier
+
+
Virtual name used for text segments.
+
+
_checkNumericValue(int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_child - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_closed - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Flag that indicates whether parser is closed or not.
+
+
_columnNr - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_configureParser(JsonParser) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_constructDefaultPrettyPrinter() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_constructDefaultTypeResolverBuilder(ObjectMapper.DefaultTyping, PolymorphicTypeValidator) - Method in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
_constructIntrospector() - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
+
 
+
_constructStdTypeResolverBuilder() - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
+
We will override this method so that we can return instance + that cleans up type id property name to be a valid xml name.
+
+
_convertNumberToBigDecimal() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_convertNumberToBigInteger() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_convertNumberToDouble() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_convertNumberToFloat() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_convertNumberToInt() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_convertNumberToLong() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_createGenerator(Writer, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(InputStream, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(Reader, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(char[], int, int, IOContext, boolean) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createParser(byte[], int, int, IOContext) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createXmlWriter(IOContext, OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_createXmlWriter(IOContext, Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_currentName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_currentState - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_currentStateDesc() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_currentValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_currentWrapper - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Wrapping state, if any active (null if none)
+
+
_currText - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_decodeBase64(Base64Variant) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_decorate(IOContext, OutputStream) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_decorate(IOContext, Writer) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_elementNameStack - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
To support proper serialization of arrays it is necessary to keep + stack of element names, so that we can "revert" to earlier
+
+
_findRootName(Class<?>, MapperConfig<?>) - Method in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
 
+
_findXmlName(Annotated) - Method in class com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
+
 
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
+
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Bit flag composed of bits that indicate which + FromXmlParser.Features + are enabled.
+
+
_formatFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Bit flag composed of bits that indicate which + ToXmlGenerator.Features + are enabled.
+
+
_formatGeneratorFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Set of s enabled, as bitmask.
+
+
_formatParserFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Set of FromXmlParser.Features enabled, as bitmask.
+
+
_getByteArrayBuilder() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_handleEndObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_handleEOF() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method called when an EOF is encountered between tokens.
+
+
_handleRepeatElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Method called to handle details of repeating "virtual" + start/end elements, needed for handling 'unwrapped' lists.
+
+
_handleStartObject() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_initFactories(XMLInputFactory, XMLOutputFactory) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initialized - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker set when ToXmlGenerator.initGenerator() has been called or not.
+
+
_initializeXmlReader(XMLStreamReader) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initializeXmlWriter(XMLStreamWriter) - Method in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_initWithRootName(ToXmlGenerator, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_intr - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.JaxbWrapper
+
 
+
_ioContext - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_ioContext - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_isAttribute(BeanPropertyWriter) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_isAttribute - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_isCData(BeanPropertyWriter) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_isCData - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_isIntNumber(String) - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_isText - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_jdkXmlInFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Hiding place for JDK-serialization unthawed factories...
+
+
_jdkXmlOutFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
+
Hiding place for JDK-serialization unthawed factories...
+
+
_justHadStartElement - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
Marker flag set on start element, and cleared if an end element + is encountered.
+
+
_lineNr - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_localName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_mayBeLeaf - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
We need special handling to keep track of whether a value + may be exposed as simple leaf value.
+
+
_nameForTextElement - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
In cases where a start element has both attributes and non-empty textual + value, we have to create a bogus property; we will use this as + the property name.
+
+
_namespace - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlInfo
+
 
+
_namespaceURI - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_namesToWrap - Variable in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
+
(Simple) Names of properties, for which virtual wrapping is needed + to compensate: these are so-called 'unwrapped' XML lists where property + name is used for elements, and not as List markers.
+
+
_namesToWrap - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_nameTransformer - Variable in class com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
+
+
Transformer used to add prefix and/or suffix for properties of unwrapped + POJO.
+
+
_nesting - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
Number of open levels of nesting.
+
+
_nextAttributeIndex - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Index of the next attribute of the current START_ELEMENT + to return (as field name and value pair), if any; -1 + when no attributes to return
+
+
_nextIsAttribute - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag that indicates whether next name to write + implies an attribute (true) or element (false)
+
+
_nextIsCData - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag used to indicate that the next write of a (property) + value should be as CData
+
+
_nextIsUnwrapped - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag used to indicate that the next write of a (property) + value should be done without using surrounding start/end + elements.
+
+
_nextLocalName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
In cases where we need to 'inject' a virtual END_ELEMENT, we may also + need to restore START_ELEMENT afterwards; if so, this is where names + are held.
+
+
_nextName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Element or attribute name to use for next output call.
+
+
_nextNamespaceURI - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_nextToken - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_nextToken() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_numberBigInt - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_numberInt - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_numberLong - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_numTypesValid - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Bitfield that indicates which numeric representations + have been calculated for the current type
+
+
_objectCodec - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_objectIndenter - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default, let's use linefeed-adding indenter for separate + object entries.
+
+
_orderAttributesFirst(BeanPropertyWriter[], BeanPropertyWriter[]) - Static method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Method for re-sorting lists of bean properties such that attributes are strictly + written before elements.
+
+
_originalXmlWriter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_parent - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
 
+
_parsingContext - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Information about parser context, context in which + the next token is to be parsed (root, array, object).
+
+
_releaseBuffers() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
+
Method called to release internal buffers owned by the base + parser.
+
+
_releaseBuffers() - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_repeatCurrentToken - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Marker flag set if caller wants to "push back" current token so + that next call to XmlTokenStream.next() should simply be given what was + already read.
+
+
_repeatElement - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Flag used to indicate that given element should be "replayed".
+
+
_reportUnimplementedStax2(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Method called in case access to native Stax2 API implementation is required.
+
+
_rootNameFromConfig() - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_rootNameLookup - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_rootNames - Variable in class com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
+
+
For efficient operation, let's try to minimize number of times we + need to introspect root element name to use.
+
+
_serializeObjectId(Object, JsonGenerator, SerializerProvider, TypeSerializer, WritableObjectId) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
 
+
_serializeXmlNull(JsonGenerator) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_skipEndElement() - Method in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_sourceReference - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_spacesInObjectEntries - Variable in class com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter
+
+
By default we will add spaces around colons used to + separate object fields and values.
+
+
_startElementAfterText - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Flag set true if current event is XML_TEXT and there is START_ELEMENT
+
+
_startRootArray(ToXmlGenerator, QName) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_stateDesc(int) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_stax2Emulation - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
Marker flag set if the underlying stream writer has to emulate + Stax2 API: this is problematic if trying to use ToXmlGenerator.writeRaw(java.lang.String) calls.
+
+
_textPropertyIndex - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Index of "text value" property we have, if any; can have at most + one such property.
+
+
_textValue - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Current text value for TEXT_VALUE returned
+
+
_type - Variable in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_valueInstantiator - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
_verifyDeserType(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer
+
 
+
_verifyDeserType(JsonDeserializer<?>) - Method in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
 
+
_verifyValueWrite(String) - Method in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_wrapAsIOE(JsonGenerator, Exception) - Method in class com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider
+
 
+
_wrappedName - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
+
+
Name of property that requires wrapping
+
+
_wrappedQName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Element name used for items in the collection
+
+
_wrapperQName - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
+
+
Element name used as wrapper for collection.
+
+
_xmlGeneratorFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlInputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlInputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Stax factory for creating underlying input stream readers; + `null` for "use default instance with default settings"
+
+
_xmlModule - Variable in class com.fasterxml.jackson.dataformat.xml.XmlMapper
+
 
+
_xmlNames - Variable in class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
+
+
Array that contains namespace URIs associated with properties, if any; + null if no namespace definitions have been assigned
+
+
_xmlOutputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlOutputFactory - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
+
+
Stax factory for creating underlying output stream writers; + `null` for "use default instance with default settings"
+
+
_xmlParserFeatures - Variable in class com.fasterxml.jackson.dataformat.xml.XmlFactory
+
 
+
_xmlPrettyPrinter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
+
We may need to use XML-specific indentation as well
+
+
_xmlPrimary - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
_xmlReader - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
 
+
_xmlSecondary - Variable in class com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector.Pair
+
 
+
_xmlTextProperty - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
+
Actual property that is indicated to be of type "XML Text" (and + is the only element-valued property)
+
+
_xmlTextPropertyIndex - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTextDeserializer
+
+
Property index of the "XML text property"; needed for finding actual + property instance after resolution and contextualization: instance + may change, but index will remain constant.
+
+
_xmlTokens - Variable in class com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser
+
 
+
_xmlWriter - Variable in class com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator
+
 
+
_xsiNilFound - Variable in class com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream
+
+
Marker used to indicate presence of `xsi:nil="true"' in current START_ELEMENT.
+
+
+A B C D E F G H I J K L M N O P R S T U V W X _ 
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/index.html b/docs/javadoc/2.12/index.html new file mode 100644 index 000000000..60aa9211b --- /dev/null +++ b/docs/javadoc/2.12/index.html @@ -0,0 +1,76 @@ + + + + + + +Jackson-dataformat-XML 2.12.0 API + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/javadoc/2.12/javadoc.sh b/docs/javadoc/2.12/javadoc.sh new file mode 100755 index 000000000..82e214cad --- /dev/null +++ b/docs/javadoc/2.12/javadoc.sh @@ -0,0 +1 @@ +/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/../bin/javadoc @options @packages \ No newline at end of file diff --git a/docs/javadoc/2.12/options b/docs/javadoc/2.12/options new file mode 100644 index 000000000..61c13c2c1 --- /dev/null +++ b/docs/javadoc/2.12/options @@ -0,0 +1,27 @@ +-classpath +'/Users/tatu/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.12.0/jackson-core-2.12.0.jar:/Users/tatu/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.12.0/jackson-annotations-2.12.0.jar:/Users/tatu/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.12.0/jackson-databind-2.12.0.jar:/Users/tatu/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.12.0/jackson-module-jaxb-annotations-2.12.0.jar:/Users/tatu/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/Users/tatu/.m2/repository/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar:/Users/tatu/.m2/repository/com/fasterxml/woodstox/woodstox-core/6.2.3/woodstox-core-6.2.3.jar' +-encoding +'UTF-8' +-protected +-quiet +-sourcepath +'/Users/tatu/jackson/jackson-dataformat-xml/src/main/java:/Users/tatu/jackson/jackson-dataformat-xml/target/generated-sources:/Users/tatu/jackson/jackson-dataformat-xml/target/generated-sources/annotations' +-author +-bottom +'Copyright © 2020 FasterXML. All rights reserved.' +-charset +'UTF-8' +-d +'/Users/tatu/jackson/jackson-dataformat-xml/target/apidocs' +-docencoding +'UTF-8' +-doctitle +'Jackson-dataformat-XML 2.12.0 API' +-link +'https://docs.oracle.com/javase/8/docs/api' +-linkoffline +'https://docs.oracle.com/javase/7/docs/api' '/Users/tatu/jackson/jackson-dataformat-xml/target/javadoc-bundle-options' +-use +-version +-windowtitle +'Jackson-dataformat-XML 2.12.0 API' \ No newline at end of file diff --git a/docs/javadoc/2.12/overview-frame.html b/docs/javadoc/2.12/overview-frame.html new file mode 100644 index 000000000..eebbcbd18 --- /dev/null +++ b/docs/javadoc/2.12/overview-frame.html @@ -0,0 +1,27 @@ + + + + + + +Overview List (Jackson-dataformat-XML 2.12.0 API) + + + + + +
All Classes
+
+

Packages

+ +
+

 

+ + diff --git a/docs/javadoc/2.12/overview-summary.html b/docs/javadoc/2.12/overview-summary.html new file mode 100644 index 000000000..79a24757b --- /dev/null +++ b/docs/javadoc/2.12/overview-summary.html @@ -0,0 +1,168 @@ + + + + + + +Overview (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Jackson-dataformat-XML 2.12.0 API

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
com.fasterxml.jackson.dataformat.xml +
Package that contains XML-based backends which can serialize POJOs + to and deserialize from XML, using Stax XML parsers and generators + for XML processing and mostly standard Jackson data binding otherwise.
+
com.fasterxml.jackson.dataformat.xml.annotation +
Package that contains additional annotations that can be + used to configure XML-specific aspects of serialization + and deserialization
+
com.fasterxml.jackson.dataformat.xml.deser 
com.fasterxml.jackson.dataformat.xml.jaxb 
com.fasterxml.jackson.dataformat.xml.ser 
com.fasterxml.jackson.dataformat.xml.util 
+
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/overview-tree.html b/docs/javadoc/2.12/overview-tree.html new file mode 100644 index 000000000..2129b545b --- /dev/null +++ b/docs/javadoc/2.12/overview-tree.html @@ -0,0 +1,379 @@ + + + + + + +Class Hierarchy (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Annotation Type Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/package-list b/docs/javadoc/2.12/package-list new file mode 100644 index 000000000..9915bc315 --- /dev/null +++ b/docs/javadoc/2.12/package-list @@ -0,0 +1,6 @@ +com.fasterxml.jackson.dataformat.xml +com.fasterxml.jackson.dataformat.xml.annotation +com.fasterxml.jackson.dataformat.xml.deser +com.fasterxml.jackson.dataformat.xml.jaxb +com.fasterxml.jackson.dataformat.xml.ser +com.fasterxml.jackson.dataformat.xml.util diff --git a/docs/javadoc/2.12/packages b/docs/javadoc/2.12/packages new file mode 100644 index 000000000..ba3c09866 --- /dev/null +++ b/docs/javadoc/2.12/packages @@ -0,0 +1,6 @@ +com.fasterxml.jackson.dataformat.xml +com.fasterxml.jackson.dataformat.xml.util +com.fasterxml.jackson.dataformat.xml.deser +com.fasterxml.jackson.dataformat.xml.annotation +com.fasterxml.jackson.dataformat.xml.jaxb +com.fasterxml.jackson.dataformat.xml.ser \ No newline at end of file diff --git a/docs/javadoc/2.12/script.js b/docs/javadoc/2.12/script.js new file mode 100644 index 000000000..b34635693 --- /dev/null +++ b/docs/javadoc/2.12/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/javadoc/2.12/serialized-form.html b/docs/javadoc/2.12/serialized-form.html new file mode 100644 index 000000000..8c9c5af1b --- /dev/null +++ b/docs/javadoc/2.12/serialized-form.html @@ -0,0 +1,642 @@ + + + + + + +Serialized Form (Jackson-dataformat-XML 2.12.0 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2020 FasterXML. All rights reserved.

+ + diff --git a/docs/javadoc/2.12/stylesheet.css b/docs/javadoc/2.12/stylesheet.css new file mode 100644 index 000000000..98055b22d --- /dev/null +++ b/docs/javadoc/2.12/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/pom.xml b/pom.xml index 9f20792ec..d4efb6574 100644 --- a/pom.xml +++ b/pom.xml @@ -1,27 +1,30 @@ + + + + + 4.0.0 com.fasterxml.jackson jackson-base - 2.10.2 + 2.12.1 com.fasterxml.jackson.dataformat jackson-dataformat-xml - 2.10.2 + 2.12.1 Jackson-dataformat-XML bundle - Data format extension for Jackson (http://jackson.codehaus.org) to offer + Data format extension for Jackson to offer alternative support for serializing POJOs as XML and deserializing XML as pojos. -Support implemented on top of Stax API (javax.xml.stream), by implementing core Jackson Streaming API types like JsonGenerator, JsonParser and JsonFactory. -Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMapper). https://github.com/FasterXML/jackson-dataformat-xml scm:git:git@github.com:FasterXML/jackson-dataformat-xml.git scm:git:git@github.com:FasterXML/jackson-dataformat-xml.git http://github.com/FasterXML/jackson-dataformat-xml - jackson-dataformat-xml-2.10.2 + jackson-dataformat-xml-2.12.1 com/fasterxml/jackson/dataformat/xml @@ -68,7 +71,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe org.codehaus.woodstox stax2-api - 4.2 + 4.2.1 javax.xml.stream @@ -83,11 +86,11 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe - + com.fasterxml.woodstox woodstox-core - 6.0.3 + 6.2.3 javax.xml.stream @@ -119,7 +122,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe org.jacoco jacoco-maven-plugin - 0.8.4 + 0.8.5 @@ -168,6 +171,11 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe org.moditect moditect-maven-plugin + + + de.jjohannes + gradle-module-metadata-maven-plugin + diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index cd7b5d71d..ca959a993 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -15,7 +15,9 @@ Pascal Gelinas: (2.3.1) * Reported and fixed #83: Add support for @JsonUnwrapped (2.4.0) - +* Reported #97: Weird Exception during read with Type info + (2.12.0) + Dan Jasek: (oillio@github) * Contributed #126: Allow specifying properties that should be written as CData @@ -60,3 +62,88 @@ Luke Korth (lkorth@github.com) * Reported #366: XML containing xsi:nil is improperly parsed (2.10.2) + +Martin Vysny (mvysny@github) + +* Reported #395: Namespace repairing generates xmlns definitions for xml: prefix (which is implicit) + (2.10.5) + +James Bushell (jimnz111@github) + +* Suggested #413: Null String field serialization through ToXmlGenerator causes NullPointerException + (2.10.5) + +Alexei Volkov (softkot@github) + +* Reported #294: XML parser error with nested same element names + (2.11.1) + +Eric Schoonover (spoon16@github) + +* Reported #86: Can not deserialize unwrapped list when `@JacksonXmlProperty` localName + matches `@JacksonXmlRootElement` localName + (2.12.0) + +Denis Chernyshov (danblack@github) + +* Reported #124: Deserialization if an empty list (with empty XML tag) results in `null` + (2.12.0) + +Julien Debon (Sir4ur0n@github) + +* Reported #252: Empty (or self-closing) Element representing `List` is incorrectly + deserialized as null, not Empty List + (2.12.0) + +Dave Jarvis (DaveJarvis@github) + +* Requested #262: Make `ToXmlGenerator` non-final + (2.12.0) + +Joseph Petersen (jetersen@github) + +* Reported #273: Input mismatch with case-insensitive properties + (2.12.0) + +Eduard Wirch (ewirch@github) + +* Reported #314: Jackson gets confused by parent list element + (2.12.0) + +Jochen Schalanda (joschi@github) + +* Reported #318: XMLMapper fails to deserialize null (POJO reference) from blank tag + (2.12.0) + +Migwel@github + +* Contributed #360: Add a feature to support writing `xsi:nil` attribute for + `null` values + (2.12.0) + +Ingo Wiarda (dewarim@github) + +* Reported #374: Deserialization fails with `XmlMapper` and + `DeserializationFeature.UNWRAP_ROOT_VALUE` + (2.12.0) + +Ghenadii Batalski (ghenadiibatalski@github) + +* Reported #377: `ToXmlGenerator` ignores `Base64Variant` while serializing `byte[]` + (2.12.0) + +David Schmidt (d-schmidt@github) + +* Reported #390: Unexpected attribute at string fields causes extra objects to be + created in parent list + (2.12.0) + +Akop Karapetyan (0xe1f@github) + +* Reported #422: Elements containing parsed incorrectly when at the end of another element + (2.12.0) + +Francesco Chicchiriccò (ilgrosso@github) + +* Reported #435: After upgrade to 2.12.0, NPE when deserializing an empty element to `ArrayList` + (2.12.1) diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index e1706cafe..97ef6be5e 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -1,9 +1,123 @@ Project: jackson-dataformat-xml ------------------------------------------------------------------------ -= Releases +=== Releases === ------------------------------------------------------------------------ +2.12.1 (08-Jan-2021) + +#435: After upgrade to 2.12.0, NPE when deserializing an empty element to `ArrayList` + (reported by Francesco C) +- Minor improvement wrt #18 (use namespace annotation from supertype) + +2.12.0 (29-Nov-2020) + +#97: Weird Exception during read with Type info + (reported by Pascal G) +#121: `XmlMapper` not deserializing root-level Enums + (reported by bhkjersten@github) +#124: Deserialization if an empty list (with empty XML tag) results in `null` + (reported by Denis C) +#205: `XmlMapper`/`UntypedObjectDeserializer` swallows duplicated elements in + XML documents + (reported by joaovarandas@github) +#226: XML to JSON - IOException when parsing XML with XMLMapper + (reported by dbories@github) +#252: Empty (or self-closing) Element representing `List` is incorrectly + deserialized as null, not Empty List + (reported by Julien D) +#254: No String-argument constructor/factory method to deserialize from + String value when it is a Integer + (reported by mrdgsmith@github) +#257: Deserialization fails of lists containing elements with `xml:space` attribute + (reported by Quurks@github) +#262: Make `ToXmlGenerator` non-final + (requested by Dave J) +#273: Input mismatch with case-insensitive properties + (reported by Joseph P) +#307: Missing collection item when they are not wrapped during unmarshal + with multiple namespaces + (reported by wanchongtai@github) +#314: Jackson gets confused by parent list element + (reported by Eduard W) +#318: XMLMapper fails to deserialize null (POJO reference) from blank tag + (reported by Jochen S) +#319: Empty root tag into `List` deserialization bug + (reported by Seatec13@github) +#360: Add a feature to support writing `xsi:nil` attribute for `null` values + (contributed by Migwel@github) +#374: Deserialization fails with `XmlMapper` and `DeserializationFeature.UNWRAP_ROOT_VALUE` + (reported by Ingo W) +#377: `ToXmlGenerator` ignores `Base64Variant` while serializing `byte[]` + (reported by Ghenadii B) +#380: Unable to deserialize root-level `Instant` value from XML + (reported by afayes@github) +#390: Unexpected attribute at string fields causes extra objects to be + created in parent list + (reported by David S +#397: `XmlReadContext` does not keep track of array index +#403: Make `JsonNode` implicitly create `ArrayNode`s for repeated XML Elements +#405: Mixed content not exposed through `FromXmlParser`, lost by `JsonNode` +#411: Change default setting of `FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL` + from `true` to `false` +#412: Coercion from element-with-attribute-and-text only works for `String`, + not other scalar types +#422: Elements containing parsed incorrectly when at the end of another element + (reported by Akop K) +#434: Add missing `ElementType.ANNOTATION_TYPE` for Jackson xml annotations + to allow bundling +- Add Gradle Module Metadata (https://blog.gradle.org/alignment-with-gradle-module-metadata) + +2.11.4 (12-Dec-2020) + +- Upgrade Woodstox dependency to 6.2.3 (<- 6.2.1) +- Deprecate `XmlJaxbAnnotationIntrospector` (has been unnecessary since 2.4, forgot) + +2.11.3 (02-Oct-2020) +2.11.2 (02-Aug-2020) + +No changes since 2.11.1 + +2.11.1 (25-Jun-2020) + +#86: Can not deserialize unwrapped list when `@JacksonXmlProperty` localName + matches `@JacksonXmlRootElement` localName + (reported by Eric S) +#294: XML parser error with nested same element names + (reported by Alexei V) +#301: Problem deserializing POJO with unwrapped `List`, ignorable attribute value +#389: Exception when serializing with type via mapper.writerFor(type).write(...) + (reported by texhnolyzze@github) +#393: `MismatchedInputException` for nested repeating element name in `List` + (reported by kaizenHorse@github) +#399: Can not deserialize unwrapped list when `@JacksonXmlProperty` localName matches + the parent's localName + (reported by sandboxgod@github) +#404: Make `@JacksonXmlElementWrapper` indicate XML property + +2.11.0 (26-Apr-2020) + +No changes since 2.10.x + +2.10.5 (21-Jul-2020) + +#395: Namespace repairing generates xmlns definitions for xml: prefix (which is implicit) + (reported by Martin V) +#413: Null String field serialization through ToXmlGenerator causes NullPointerException + (suggested by James B) +- Upgrade Woodstox dependency to 6.2.1 + +2.10.4 (03-May-2020) + +#219: Deserialization issue from XML to POJO with Jackson: no String-argument + constructor/factory method to deserialize from String value + (NOTE: likely fixed earlier, but fix verified after 2.10.4 release) +- Upgrade Woodstox dependency to 6.2.0 (minor improvement to MSV shading) + +2.10.3 (03-Mar-2020) + +- Upgrade Woodstox dependency to 6.1.1 (reduced dependencies for JDK9+) + 2.10.2 (05-Jan-2020) #366: XML containing xsi:nil is improperly parsed @@ -26,7 +140,7 @@ Project: jackson-dataformat-xml (reported by Sam S) #351: XmlBeanSerializer serializes AnyGetters field even with FilterExceptFilter (reported by Rohit N) -#354: Support mapping `xsi:nul` marked elements as `null`s (`JsonToken.VALUE_NULL`) +#354: Support mapping `xsi:nil` marked elements as `null`s (`JsonToken.VALUE_NULL`) 2.9.10 (not yet released) diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.java index c285257fa..6f3414b85 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlAnnotationIntrospector.java @@ -1,5 +1,8 @@ package com.fasterxml.jackson.dataformat.xml; +import java.lang.annotation.Annotation; + +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.PropertyName; import com.fasterxml.jackson.databind.introspect.*; import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; @@ -18,6 +21,13 @@ public class JacksonXmlAnnotationIntrospector { private static final long serialVersionUID = 1L; + // @since 2.11.1 + @SuppressWarnings("unchecked") + private final static Class[] ANNOTATIONS_TO_INFER_XML_PROP = + (Class[]) new Class[] { + JacksonXmlText.class, JacksonXmlElementWrapper.class + }; + /** * For backwards compatibility with 2.0, the default behavior is * to assume use of List wrapper if no annotations are used. @@ -44,7 +54,7 @@ public JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper) { @Override public PropertyName findWrapperName(Annotated ann) { - JacksonXmlElementWrapper w = ann.getAnnotation(JacksonXmlElementWrapper.class); + JacksonXmlElementWrapper w = _findAnnotation(ann, JacksonXmlElementWrapper.class); if (w != null) { // Special case: wrapping explicitly blocked? if (!w.useWrapping()) { @@ -57,9 +67,8 @@ public PropertyName findWrapperName(Annotated ann) } return PropertyName.construct(w.localName(), w.namespace()); } - /* 09-Sep-2012, tatu: In absence of configurating we need to use our - * default settings... - */ + // 09-Sep-2012, tatu: In absence of configuration we need to use our + // default settings... if (_cfgDefaultUseWrapper) { return PropertyName.USE_DEFAULT; } @@ -69,7 +78,7 @@ public PropertyName findWrapperName(Annotated ann) @Override public PropertyName findRootName(AnnotatedClass ac) { - JacksonXmlRootElement root = ac.getAnnotation(JacksonXmlRootElement.class); + JacksonXmlRootElement root = _findAnnotation(ac, JacksonXmlRootElement.class); if (root != null) { String local = root.localName(); String ns = root.namespace(); @@ -91,10 +100,15 @@ public PropertyName findRootName(AnnotatedClass ac) @Override public String findNamespace(Annotated ann) { - JacksonXmlProperty prop = ann.getAnnotation(JacksonXmlProperty.class); + JacksonXmlProperty prop = _findAnnotation(ann, JacksonXmlProperty.class); if (prop != null) { return prop.namespace(); } + // 14-Nov-2020, tatu: 2.12 adds namespace for this too + JsonProperty jprop = _findAnnotation(ann, JsonProperty.class); + if (jprop != null) { + return jprop.namespace(); + } return null; } @@ -103,11 +117,11 @@ public String findNamespace(Annotated ann) /* XmlAnnotationIntrospector, isXxx methods /********************************************************************** */ - + @Override public Boolean isOutputAsAttribute(Annotated ann) { - JacksonXmlProperty prop = ann.getAnnotation(JacksonXmlProperty.class); + JacksonXmlProperty prop = _findAnnotation(ann, JacksonXmlProperty.class); if (prop != null) { return prop.isAttribute() ? Boolean.TRUE : Boolean.FALSE; } @@ -117,7 +131,7 @@ public Boolean isOutputAsAttribute(Annotated ann) @Override public Boolean isOutputAsText(Annotated ann) { - JacksonXmlText prop = ann.getAnnotation(JacksonXmlText.class); + JacksonXmlText prop = _findAnnotation(ann, JacksonXmlText.class); if (prop != null) { return prop.value() ? Boolean.TRUE : Boolean.FALSE; } @@ -151,7 +165,7 @@ public PropertyName findNameForSerialization(Annotated a) if (name == null) { name = super.findNameForSerialization(a); if (name == null) { - if (a.hasAnnotation(JacksonXmlText.class)) { + if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) { return PropertyName.USE_DEFAULT; } } @@ -166,7 +180,7 @@ public PropertyName findNameForDeserialization(Annotated a) if (name == null) { name = super.findNameForDeserialization(a); if (name == null) { - if (a.hasAnnotation(JacksonXmlText.class)) { + if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) { return PropertyName.USE_DEFAULT; } } @@ -197,7 +211,7 @@ protected StdTypeResolverBuilder _constructStdTypeResolverBuilder() { protected PropertyName _findXmlName(Annotated a) { - JacksonXmlProperty pann = a.getAnnotation(JacksonXmlProperty.class); + JacksonXmlProperty pann = _findAnnotation(a, JacksonXmlProperty.class); if (pann != null) { return PropertyName.construct(pann.localName(), pann.namespace()); } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.java index 7c0cfaf23..c9a57c1d2 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/JacksonXmlModule.java @@ -2,14 +2,20 @@ import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.module.SimpleModule; + import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser; import com.fasterxml.jackson.dataformat.xml.deser.XmlBeanDeserializerModifier; -import com.fasterxml.jackson.dataformat.xml.deser.XmlStringDeserializer; import com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerModifier; /** * Module that implements most functionality needed to support producing and - * consuming XML instead of JSON. + * consuming XML instead of JSON, used by {@link XmlMapper} for registering + * handlers for XML-specific processing. + *

+ * NOTE: please do NOT register this directly on {@link XmlMapper}: mapper + * registers an instance (either one explicitly given in constructor, or, if none, + * one it configures) and attempts to re-register is unlikely to work as + * you'd expect. */ public class JacksonXmlModule extends SimpleModule @@ -49,9 +55,6 @@ public class JacksonXmlModule public JacksonXmlModule() { super("JacksonXmlModule", PackageVersion.VERSION); - XmlStringDeserializer deser = new XmlStringDeserializer(); - addDeserializer(String.class, deser); - addDeserializer(CharSequence.class, deser); } @SuppressWarnings("deprecation") diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java index 3ab6f713b..a2bee2187 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java @@ -372,6 +372,11 @@ public XMLInputFactory getXMLInputFactory() { return _xmlInputFactory; } + /** + * @deprecated Since 2.12 -- should be set as part of build process + * (either in builder, or constructor) + */ + @Deprecated public void setXMLInputFactory(XMLInputFactory f) { _xmlInputFactory = f; } @@ -381,6 +386,11 @@ public XMLOutputFactory getXMLOutputFactory() { return _xmlOutputFactory; } + /** + * @deprecated Since 2.12 -- should be set as part of build process + * (either in builder, or constructor) + */ + @Deprecated public void setXMLOutputFactory(XMLOutputFactory f) { _xmlOutputFactory = f; } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.java index 5bc4d1848..b8ac61a72 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactoryBuilder.java @@ -23,12 +23,12 @@ public class XmlFactoryBuilder extends TSFBuilder */ /** - * Set of {@link FromXmlParser.Feature}s enabled, as bitmask. + * Set of {@code FromXmlParser.Feature}s enabled, as bitmask. */ protected int _formatParserFeatures; /** - * Set of {@link ToXmlGenerator.Feature}s enabled, as bitmask. + * Set of {@@code ToXmlGenerator.Feature}s enabled, as bitmask. */ protected int _formatGeneratorFeatures; diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlMapper.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlMapper.java index 6e1a58a47..4955f6bfc 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlMapper.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlMapper.java @@ -10,10 +10,14 @@ import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.cfg.CoercionAction; +import com.fasterxml.jackson.databind.cfg.CoercionInputShape; import com.fasterxml.jackson.databind.cfg.MapperBuilder; +import com.fasterxml.jackson.databind.deser.BeanDeserializerFactory; import com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator; import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder; import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser; +import com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider; import com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter; @@ -146,10 +150,10 @@ public XmlMapper(JacksonXmlModule module) { public XmlMapper(XmlFactory xmlFactory, JacksonXmlModule module) { - /* Need to override serializer provider (due to root name handling); - * deserializer provider fine as is - */ - super(xmlFactory, new XmlSerializerProvider(new XmlRootNameLookup()), null); + // Need to override serializer provider (due to root name handling); + // deserializer provider fine as is + super(xmlFactory, new XmlSerializerProvider(new XmlRootNameLookup()), + new XmlDeserializationContext(BeanDeserializerFactory.instance)); _xmlModule = module; // but all the rest is done via Module interface! if (module != null) { @@ -160,6 +164,20 @@ public XmlMapper(XmlFactory xmlFactory, JacksonXmlModule module) // 21-Jun-2017, tatu: Seems like there are many cases in XML where ability to coerce empty // String into `null` (where it otherwise is an error) is very useful. enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); + + // 13-May-2020, tatu: [dataformat-xml#377] Need to ensure we will keep XML-specific + // Base64 default as "MIME" (not MIME-NO-LINEFEEDS), to preserve pre-2.12 + // behavior + setBase64Variant(Base64Variants.MIME); + + // 04-Jun-2020, tatu: Use new (2.12) "CoercionConfigs" to support coercion + // from empty and blank Strings to "empty" POJOs etc + coercionConfigDefaults() + // To allow indentation without problems, need to accept blank String as empty: + .setAcceptBlankAsEmpty(Boolean.TRUE) + // and then coercion from empty String to empty value, in general + .setCoercion(CoercionInputShape.EmptyString, CoercionAction.AsEmpty) + ; } /** diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.java index 391da72a9..3b26e66cb 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/XmlPrettyPrinter.java @@ -84,12 +84,18 @@ public void writeLeafElement(XMLStreamWriter2 sw, // binary element public void writeLeafElement(XMLStreamWriter2 sw, - String nsURI, String localName, - byte[] data, int offset, int len) + String nsURI, String localName, + org.codehaus.stax2.typed.Base64Variant base64variant, + byte[] data, int offset, int len) throws XMLStreamException; // empty element to represent null public void writeLeafNullElement(XMLStreamWriter2 sw, - String nsURI, String localName) + String nsURI, String localName) throws XMLStreamException; + + // TODO: demote from "DefaultXmlPrettyPrinter" in 2.13 or later: +// public void writeLeafXsiNilElement(XMLStreamWriter2 sw, +// String nsURI, String localName) +// throws XMLStreamException; } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.java index 3b8994bed..98a8f16e5 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.java @@ -7,15 +7,16 @@ /** * Adding this annotation will result in value of the property to be serialized - * within a CData tag. Only use on String properties and String collections. + * within an xml {@code CDATA} section. Only use on String properties and String collections. */ -@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER }) +@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) public @interface JacksonXmlCData { /** - * Whether the property text should always be within a CData block - * when serialized. + * Whether the property text should always be within a CDATA section + * when serialized. Has no meaning for deserialization; content may come from + * any legal character data section (CDATA or regular text segment). */ public boolean value() default true; } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.java index aab359b54..5ef45683f 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.java @@ -8,10 +8,12 @@ /** * Annotation that is similar to JAXB javax.xml.bind.annotation.XmlElementWrapper, * to indicate wrapper element to use (if any) for Collection types (arrays, - * java.util.Collection). If defined, a separate container (wrapper) element + * {@link java.util.Collection}). If defined, a separate container (wrapper) element * is used; if not, entries are written without wrapping. */ -@Target({ElementType.FIELD, ElementType.METHOD}) +@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, + // @since 2.12 also allowed on (constructor) parameter + ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface JacksonXmlElementWrapper { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.java index 3cd9ea9cb..c20210b32 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.java @@ -9,9 +9,27 @@ * Annotation that can be used to provide XML-specific configuration * for properties, above and beyond what * {@link com.fasterxml.jackson.annotation.JsonProperty} contains. - * It is an alternative to using JAXB annotations. + * It is mainly an alternative to using JAXB annotations. + *

+ * Note that annotation may be used on + *

    + *
  • Fields + *
  • + *
  • Setter and getter methods + *
  • + *
  • Arguments (parameters) of "Creators" -- annotated constructors and/or + * static factory methods + *
  • + *
+ * but it can NOT be used on argument/parameter of setter methods (or rather + * while compiler allows that, will have no effect) -- setter method itself + * needs to be annotated. + *

+ * Note that since 2.12 there is no need to use this property over + * {@link com.fasterxml.jackson.annotation.JsonProperty} just to define XML namespace, + * as {@code @JsonProperty} has {@code namespace} property. */ -@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) +@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface JacksonXmlProperty { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.java index 9d2e94d70..b14f61a59 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.java @@ -8,9 +8,21 @@ /** * Annotation that can be used to define name of root element used * for the root-level object when serialized, which normally uses - * name of the type (class). It is similar to JAXB XmlRootElement. + * name of the type (class). It is similar to JAXB XmlRootElement + * and basically an alias for standard Jackson annotation + * {@link com.fasterxml.jackson.annotation.JsonRootName} (which you should + * usually use instead). + *

+ * Note that annotation has no effect on non-root elements: regular property + * values and so on; their name is derived from getter/setter/field, not + * from type itself. + *

+ * NOTE! Since 2.4 this annotation is usually not necessary and you should use + * {@link com.fasterxml.jackson.annotation.JsonRootName} instead. + * About the only expected usage may be to have different root name for XML + * content than other formats. */ -@Target({ElementType.TYPE}) +@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface JacksonXmlRootElement { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.java index 15b076262..4f7ebe480 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.java @@ -8,11 +8,19 @@ * It will result in value of the property be serialized without element wrapper, * as long as there are no element-wrapped other properties (attribute-valued * properties are acceptable). - * It is also similar to core Jackson JsonValue annotation; but + * It is also somewhat similar to core Jackson JsonValue annotation; but * has to be separate as JsonValue does not allow any other * properties. + *

+ * Note that only one such property is allowed on a POJO: if multiple properties + * are annotated, behavior is not defined. + *

+ * Internally properties annotated will be considered to be properties with + * no name (that is, with marker {@code ""} (empty String)). */ -@Target({ElementType.FIELD, ElementType.METHOD}) +@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, + // @since 2.12 also allowed on (constructor) parameter + ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface JacksonXmlText { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java index 6725376cd..36c8f5637 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java @@ -13,9 +13,13 @@ import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.base.ParserMinimalBase; import com.fasterxml.jackson.core.io.IOContext; +import com.fasterxml.jackson.core.io.NumberInput; import com.fasterxml.jackson.core.util.ByteArrayBuilder; +import com.fasterxml.jackson.core.util.JacksonFeatureSet; + import com.fasterxml.jackson.dataformat.xml.PackageVersion; import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet; import com.fasterxml.jackson.dataformat.xml.util.StaxUtil; /** @@ -31,6 +35,19 @@ public class FromXmlParser */ public final static String DEFAULT_UNNAMED_TEXT_PROPERTY = ""; + /** + * XML format has some peculiarities, indicated via new (2.12) capability + * system. + * + * @since 2.12 + */ + protected final static JacksonFeatureSet XML_READ_CAPABILITIES = + DEFAULT_READ_CAPABILITIES + .with(StreamReadCapability.DUPLICATE_PROPERTIES) + .with(StreamReadCapability.SCALARS_AS_OBJECTS) + .with(StreamReadCapability.UNTYPED_SCALARS) + ; + /** * Enumeration that defines all togglable features for XML parsers. */ @@ -38,16 +55,32 @@ public enum Feature implements FormatFeature { /** * Feature that indicates whether XML Empty elements (ones where there are - * no separate start and end tages, but just one tag that ends with "/>") + * no separate start and end tags, but just one tag that ends with "/>") * are exposed as {@link JsonToken#VALUE_NULL}) or not. If they are not * returned as `null` tokens, they will be returned as {@link JsonToken#VALUE_STRING} * tokens with textual value of "" (empty String). *

- * Default setting is `true` for backwards compatibility. + * Default setting was {@code true} (for backwards compatibility from 2.9 to 2.11 (inclusive) + * but was changed in 2.12 to be {@code false} (see [dataformat-xml#411] for details) * * @since 2.9 */ - EMPTY_ELEMENT_AS_NULL(true) + EMPTY_ELEMENT_AS_NULL(false), + + // 16-Nov-2020, tatu: would have been nice to add in 2.12 but is not + // trivial to implement... so leaving out for now + + /* + * Feature that indicates whether reading operation should check that + * the root element's name matches what is expected by read operation: + * if enabled and name does not match, an exception will be thrown; + * if disabled, no checking is done (any element name will do). + *

+ * Default setting is {@code true} for backwards compatibility. + * + * @since 2.12 + ENFORCE_VALID_ROOT_NAME(false) + */ ; final boolean _defaultState; @@ -85,7 +118,7 @@ private Feature(boolean defaultState) { *

* Name used for pseudo-property used for returning XML Text value (which does * not have actual element name to use). Defaults to empty String, but - * may be changed for interoperability reasons: JAXB, for example, uses + * may be changed for inter-operability reasons: JAXB, for example, uses * "value" as name. * * @since 2.1 @@ -146,8 +179,6 @@ private Feature(boolean defaultState) { protected String _currText; - protected Set _namesToWrap; - /* /********************************************************** /* Parsing state, parsed values @@ -168,6 +199,27 @@ private Feature(boolean defaultState) { */ protected byte[] _binaryValue; + /* + /********************************************************** + /* Parsing state, number decoding (2.12+) + /********************************************************** + */ + + /** + * Bitfield that indicates which numeric representations + * have been calculated for the current type + */ + protected int _numTypesValid = NR_UNKNOWN; + + // First primitives + + protected int _numberInt; + protected long _numberLong; + + // And then object types + + protected BigInteger _numberBigInt; + /* /********************************************************** /* Life-cycle @@ -184,16 +236,39 @@ public FromXmlParser(IOContext ctxt, int genericParserFeatures, int xmlFeatures, _objectCodec = codec; _parsingContext = XmlReadContext.createRootContext(-1, -1); _xmlTokens = new XmlTokenStream(xmlReader, ctxt.getSourceReference(), - _formatFeatures); + _formatFeatures); + + final int firstToken; + try { + firstToken = _xmlTokens.initialize(); + } catch (XMLStreamException e) { + StaxUtil.throwAsParseException(e, this); + return; + } // 04-Jan-2019, tatu: Root-level nulls need slightly specific handling; // changed in 2.10.2 if (_xmlTokens.hasXsiNil()) { _nextToken = JsonToken.VALUE_NULL; - } else if (_xmlTokens.getCurrentToken() == XmlTokenStream.XML_START_ELEMENT) { - _nextToken = JsonToken.START_OBJECT; } else { - _reportError("Internal problem: invalid starting state (%d)", _xmlTokens.getCurrentToken()); + switch (firstToken) { + case XmlTokenStream.XML_START_ELEMENT: + case XmlTokenStream.XML_DELAYED_START_ELEMENT: + _nextToken = JsonToken.START_OBJECT; + break; + case XmlTokenStream.XML_ROOT_TEXT: + _currText = _xmlTokens.getText(); + // [dataformat-xml#435]: may get `null` from empty element... + // It's complicated. + if (_currText == null) { + _nextToken = JsonToken.VALUE_NULL; + } else { + _nextToken = JsonToken.VALUE_STRING; + } + break; + default: + _reportError("Internal problem: invalid starting state (%s)", _xmlTokens._currentStateDesc()); + } } } @@ -218,7 +293,13 @@ public void setCodec(ObjectCodec c) { public void setXMLTextElementName(String name) { _cfgNameForTextElement = name; } - + + /* + /********************************************************************** + /* Overrides: capability introspection methods + /********************************************************************** + */ + /** * XML format does require support from custom {@link ObjectCodec} * (that is, {@link XmlMapper}), so need to return true here. @@ -229,7 +310,18 @@ public void setXMLTextElementName(String name) { public boolean requiresCustomCodec() { return true; } - + + @Override + public boolean canReadObjectId() { return false; } + + @Override + public boolean canReadTypeId() { return false; } + + @Override + public JacksonFeatureSet getReadCapabilities() { + return XML_READ_CAPABILITIES; + } + /* /********************************************************** /* Extended API, configuration @@ -275,6 +367,7 @@ public int getFormatFeatures() { @Override public JsonParser overrideFormatFeatures(int values, int mask) { _formatFeatures = (_formatFeatures & ~mask) | (values & mask); + _xmlTokens.setFormatFeatures(_formatFeatures); return this; } @@ -319,21 +412,36 @@ public XMLStreamReader getStaxReader() { * patch versions). So if you have to use it, be prepared for * possible additional work. * - * @since 2.1 + * @since 2.12 */ - public void addVirtualWrapping(Set namesToWrap) + public void addVirtualWrapping(Set namesToWrap0, boolean caseInsensitive) { - /* 17-Sep-2012, tatu: Not 100% sure why, but this is necessary to avoid - * problems with Lists-in-Lists properties - */ - String name = _xmlTokens.getLocalName(); - if (name != null && namesToWrap.contains(name)) { - _xmlTokens.repeatStartElement(); +//System.out.printf("addVirtualWrapping(%s) at '%s' [case-insensitive? %s]\n", namesToWrap0, _parsingContext.pathAsPointer(), caseInsensitive); + + final Set namesToWrap = caseInsensitive + ? CaseInsensitiveNameSet.construct(namesToWrap0) + : namesToWrap0; + + // 17-Sep-2012, tatu: Not 100% sure why, but this is necessary to avoid + // problems with Lists-in-Lists properties + // 12-May-2020, tatu: But as per [dataformat-xml#86] NOT for root element + // (would still like to know why work-around needed ever, but...) + if (!_parsingContext.inRoot() + && !_parsingContext.getParent().inRoot()) { + String name = _xmlTokens.getLocalName(); + if ((name != null) && namesToWrap.contains(name)) { +//System.out.println("REPEAT from addVirtualWrapping() for '"+name+"'"); + _xmlTokens.repeatStartElement(); + } } - _namesToWrap = namesToWrap; _parsingContext.setNamesToWrap(namesToWrap); } + @Deprecated // since 2.12 + public void addVirtualWrapping(Set namesToWrap) { + addVirtualWrapping(namesToWrap, false); + } + /* /********************************************************** /* JsonParser impl @@ -431,11 +539,11 @@ public JsonLocation getCurrentLocation() { public boolean isExpectedStartArrayToken() { JsonToken t = _currToken; - if (t == JsonToken.START_OBJECT) { + if (t == JsonToken.START_OBJECT) { _currToken = JsonToken.START_ARRAY; // Ok: must replace current context with array as well _parsingContext.convertToArray(); -//System.out.println(" isExpectedArrayStart: OBJ->Array, wraps now: "+_parsingContext.getNamesToWrap()); +//System.out.println(" FromXmlParser.isExpectedArrayStart(): OBJ->Array"); // And just in case a field name was to be returned, wipe it // 06-Jan-2015, tatu: Actually, could also be empty Object buffered; if so, convert... if (_nextToken == JsonToken.END_OBJECT) { @@ -447,10 +555,72 @@ public boolean isExpectedStartArrayToken() _xmlTokens.skipAttributes(); return true; } -//System.out.println(" isExpectedArrayStart?: t="+t); +//System.out.println(" FromXmlParser.isExpectedArrayStart?: t="+t); return (t == JsonToken.START_ARRAY); } + /** + * Since xml representation can not really distinguish between different + * scalar types (numbers, booleans) -- they are all just Character Data, + * without schema -- we can try to infer type from intent here. + * The main benefit is avoiding checks for coercion. + */ + @Override + public boolean isExpectedNumberIntToken() + { + JsonToken t = _currToken; + if (t == JsonToken.VALUE_STRING) { + final String text = _currText.trim(); + final int len = _isIntNumber(text); + if (len > 0) { + if (len <= 9) { + _numberInt = NumberInput.parseInt(text); + _numTypesValid = NR_INT; + _currToken = JsonToken.VALUE_NUMBER_INT; + return true; + } + if (len <= 18) { // definitely in long range + long l = NumberInput.parseLong(text); + if (len == 10) { + int asInt = (int) l; + long l2 = (long) asInt; + if (l == l2) { + _numberInt = asInt; + _numTypesValid = NR_INT; + _currToken = JsonToken.VALUE_NUMBER_INT; + return true; + } + } + _numberLong = l; + _numTypesValid = NR_LONG; + _currToken = JsonToken.VALUE_NUMBER_INT; + return true; + } + // Might still fit within `long` + if (len == 19) { + final boolean stillLong; + if (text.charAt(0) == '-') { + stillLong = NumberInput.inLongRange(text.substring(1), true); + } else { + stillLong = NumberInput.inLongRange(text, false); + } + if (stillLong) { + _numberLong = NumberInput.parseLong(text); + _numTypesValid = NR_LONG; + _currToken = JsonToken.VALUE_NUMBER_INT; + return true; + } + } + // finally, need BigInteger + _numberBigInt = new BigInteger(text); + _numTypesValid = NR_BIGINT; + _currToken = JsonToken.VALUE_NUMBER_INT; + return true; + } + } + return (t == JsonToken.VALUE_NUMBER_INT); + } + // DEBUGGING /* @Override @@ -458,15 +628,16 @@ public JsonToken nextToken() throws IOException { JsonToken t = nextToken0(); if (t != null) { + final String loc = (_parsingContext == null) ? "NULL" : String.valueOf(_parsingContext.pathAsPointer()); switch (t) { case FIELD_NAME: - System.out.println("JsonToken: FIELD_NAME '"+_parsingContext.getCurrentName()+"'"); + System.out.printf("FromXmlParser.nextToken() at '%s': JsonToken.FIELD_NAME '%s'\n", loc, _parsingContext.getCurrentName()); break; case VALUE_STRING: - System.out.println("JsonToken: VALUE_STRING '"+getText()+"'"); + System.out.printf("FromXmlParser.nextToken() at '%s': JsonToken.VALUE_STRING '%s'\n", loc, getText()); break; default: - System.out.println("JsonToken: "+t); + System.out.printf("FromXmlParser.nextToken() at '%s': %s\n", loc, t); } } return t; @@ -478,10 +649,13 @@ public JsonToken nextToken() throws IOException public JsonToken nextToken() throws IOException { _binaryValue = null; + _numTypesValid = NR_UNKNOWN; +//System.out.println("FromXmlParser.nextToken0: _nextToken = "+_nextToken); if (_nextToken != null) { JsonToken t = _nextToken; _currToken = t; _nextToken = null; + switch (t) { case START_OBJECT: _parsingContext = _parsingContext.createChildObjectContext(-1, -1); @@ -492,22 +666,19 @@ public JsonToken nextToken() throws IOException case END_OBJECT: case END_ARRAY: _parsingContext = _parsingContext.getParent(); - _namesToWrap = _parsingContext.getNamesToWrap(); break; case FIELD_NAME: _parsingContext.setCurrentName(_xmlTokens.getLocalName()); break; default: // VALUE_STRING, VALUE_NULL - // should be fine as is? + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` anyway; not + // used for Object contexts, updated automatically by "createChildXxxContext" + _parsingContext.valueStarted(); } return t; } - int token; - try { - token = _xmlTokens.next(); - } catch (XMLStreamException e) { - token = StaxUtil.throwAsParseException(e, this); - } + + int token = _nextToken(); // Need to have a loop just because we may have to eat/convert // a start-element that indicates an array element. while (token == XmlTokenStream.XML_START_ELEMENT) { @@ -521,11 +692,7 @@ public JsonToken nextToken() throws IOException if (_parsingContext.inArray()) { // Yup: in array, so this element could be verified; but it won't be // reported anyway, and we need to process following event. - try { - token = _xmlTokens.next(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } + token = _nextToken(); _mayBeLeaf = true; continue; } @@ -534,7 +701,7 @@ public JsonToken nextToken() throws IOException // Ok: virtual wrapping can be done by simply repeating current START_ELEMENT. // Couple of ways to do it; but start by making _xmlTokens replay the thing... - if (_namesToWrap != null && _namesToWrap.contains(name)) { + if (_parsingContext.shouldWrap(name)) { _xmlTokens.repeatStartElement(); } @@ -560,12 +727,13 @@ public JsonToken nextToken() throws IOException } // 07-Sep-2019, tatu: for [dataformat-xml#353], must NOT return second null if (_currToken != JsonToken.VALUE_NULL) { + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); return (_currToken = JsonToken.VALUE_NULL); } } _currToken = _parsingContext.inArray() ? JsonToken.END_ARRAY : JsonToken.END_OBJECT; _parsingContext = _parsingContext.getParent(); - _namesToWrap = _parsingContext.getNamesToWrap(); return _currToken; case XmlTokenStream.XML_ATTRIBUTE_NAME: @@ -581,6 +749,8 @@ public JsonToken nextToken() throws IOException return (_currToken = JsonToken.FIELD_NAME); case XmlTokenStream.XML_ATTRIBUTE_VALUE: _currText = _xmlTokens.getText(); + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); return (_currToken = JsonToken.VALUE_STRING); case XmlTokenStream.XML_TEXT: _currText = _xmlTokens.getText(); @@ -590,36 +760,50 @@ public JsonToken nextToken() throws IOException // we had an empty String (or all white space), and we are // deserializing an array, we better hide the empty text. // Also: must skip following END_ELEMENT - try { - _xmlTokens.skipEndElement(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } - if (_parsingContext.inArray()) { - if (_isEmpty(_currText)) { - // 06-Jan-2015, tatu: as per [dataformat-xml#180], need to - // expose as empty Object, not null (or, worse, as used to - // be done, by swallowing the token) - _nextToken = JsonToken.END_OBJECT; - _parsingContext = _parsingContext.createChildObjectContext(-1, -1); - return (_currToken = JsonToken.START_OBJECT); + // 05-Jun-2020, tatu: ... if there is one; we may actually alternatively + // get START_ELEMENT for "mixed content" case; if so, need to change to + // expose "XmlText" as separate property + token = _nextToken(); + + if (token == XmlTokenStream.XML_END_ELEMENT) { + if (_parsingContext.inArray()) { + if (XmlTokenStream._allWs(_currText)) { + // 06-Jan-2015, tatu: as per [dataformat-xml#180], need to + // expose as empty Object, not null (or, worse, as used to + // be done, by swallowing the token) + _nextToken = JsonToken.END_OBJECT; + _parsingContext = _parsingContext.createChildObjectContext(-1, -1); + return (_currToken = JsonToken.START_OBJECT); + } } + return (_currToken = JsonToken.VALUE_STRING); + } + if (token != XmlTokenStream.XML_START_ELEMENT) { + throw new JsonParseException(this, String.format( +"Internal error: Expected END_ELEMENT (%d) or START_ELEMENT (%d), got event of type %d", +XmlTokenStream.XML_END_ELEMENT, XmlTokenStream.XML_START_ELEMENT, token)); } - return (_currToken = JsonToken.VALUE_STRING); + // fall-through, except must create new context AND push back + // START_ELEMENT we just saw: + _xmlTokens.pushbackCurrentToken(); + _parsingContext = _parsingContext.createChildObjectContext(-1, -1); } // [dataformat-xml#177]: empty text may also need to be skipped // but... [dataformat-xml#191]: looks like we can't short-cut, must // loop over again if (_parsingContext.inObject()) { - if ((_currToken != JsonToken.FIELD_NAME) && _isEmpty(_currText)) { - try { - token = _xmlTokens.next(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } + if ((_currToken != JsonToken.FIELD_NAME) && XmlTokenStream._allWs(_currText)) { + token = _nextToken(); + continue; + } + } else if (_parsingContext.inArray()) { + // [dataformat-xml#319] Aaaaand for Arrays too + if (XmlTokenStream._allWs(_currText)) { + token = _nextToken(); continue; } } + // If not a leaf (or otherwise ignorable), need to transform into property... _parsingContext.setCurrentName(_cfgNameForTextElement); _nextToken = JsonToken.VALUE_STRING; @@ -663,19 +847,15 @@ public String nextTextValue() throws IOException // expected case; yes, got a String if (t == JsonToken.VALUE_STRING) { + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); return _currText; } _updateState(t); return null; } - int token; - - try { - token = _xmlTokens.next(); - } catch (XMLStreamException e) { - token = StaxUtil.throwAsParseException(e, this); - } + int token = _nextToken(); // mostly copied from 'nextToken()' while (token == XmlTokenStream.XML_START_ELEMENT) { @@ -686,17 +866,14 @@ public String nextTextValue() throws IOException return null; } if (_parsingContext.inArray()) { - try { - token = _xmlTokens.next(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } + token = _nextToken(); _mayBeLeaf = true; continue; } String name = _xmlTokens.getLocalName(); _parsingContext.setCurrentName(name); - if (_namesToWrap != null && _namesToWrap.contains(name)) { + if (_parsingContext.shouldWrap(name)) { +//System.out.println("REPEAT from nextTextValue()"); _xmlTokens.repeatStartElement(); } _mayBeLeaf = true; @@ -711,11 +888,12 @@ public String nextTextValue() throws IOException // NOTE: this is different from nextToken() -- produce "", NOT null _mayBeLeaf = false; _currToken = JsonToken.VALUE_STRING; + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); return (_currText = ""); } _currToken = _parsingContext.inArray() ? JsonToken.END_ARRAY : JsonToken.END_OBJECT; _parsingContext = _parsingContext.getParent(); - _namesToWrap = _parsingContext.getNamesToWrap(); break; case XmlTokenStream.XML_ATTRIBUTE_NAME: // If there was a chance of leaf node, no more... @@ -732,19 +910,19 @@ public String nextTextValue() throws IOException break; case XmlTokenStream.XML_ATTRIBUTE_VALUE: _currToken = JsonToken.VALUE_STRING; + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); return (_currText = _xmlTokens.getText()); case XmlTokenStream.XML_TEXT: _currText = _xmlTokens.getText(); if (_mayBeLeaf) { _mayBeLeaf = false; // Also: must skip following END_ELEMENT - try { - _xmlTokens.skipEndElement(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } + _skipEndElement(); // NOTE: this is different from nextToken() -- NO work-around // for otherwise empty List/array + // 13-May-2020, tatu: [dataformat-xml#397]: advance `index` + _parsingContext.valueStarted(); _currToken = JsonToken.VALUE_STRING; return _currText; } @@ -774,7 +952,6 @@ private void _updateState(JsonToken t) case END_OBJECT: case END_ARRAY: _parsingContext = _parsingContext.getParent(); - _namesToWrap = _parsingContext.getNamesToWrap(); break; case FIELD_NAME: _parsingContext.setCurrentName(_xmlTokens.getLocalName()); @@ -806,58 +983,6 @@ public String getText() throws IOException } } - // @since 2.1 - @Override - public final String getValueAsString() throws IOException { - return getValueAsString(null); - } - - @Override - public String getValueAsString(String defValue) throws IOException - { - JsonToken t = _currToken; - if (t == null) { - return null; - } - switch (t) { - case FIELD_NAME: - return getCurrentName(); - case VALUE_STRING: - return _currText; - case START_OBJECT: - // the interesting case; may be able to convert certain kinds of - // elements (specifically, ones with attributes, CDATA only content) - // into VALUE_STRING - try { - String str = _xmlTokens.convertToString(); - if (str != null) { - // need to convert token, as well as "undo" START_OBJECT - // note: Should NOT update context, because we will still be getting - // matching END_OBJECT, which will undo contexts properly - _parsingContext = _parsingContext.getParent(); - _namesToWrap = _parsingContext.getNamesToWrap(); - _currToken = JsonToken.VALUE_STRING; - _nextToken = null; - // One more thing: must explicitly skip the END_OBJECT that would follow - try { - _xmlTokens.skipEndElement(); - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } - return (_currText = str); - } - } catch (XMLStreamException e) { - StaxUtil.throwAsParseException(e, this); - } - return null; - default: - if (_currToken.isScalarValue()) { - return _currToken.asString(); - } - } - return defValue; - } - @Override public char[] getTextCharacters() throws IOException { String text = getText(); @@ -895,7 +1020,7 @@ public int getText(Writer writer) throws IOException writer.write(str); return str.length(); } - + /* /********************************************************** /* Public API, access to token information, binary @@ -936,58 +1061,246 @@ protected byte[] _decodeBase64(Base64Variant b64variant) throws IOException _decodeBase64(str, builder, b64variant); return builder.toByteArray(); } - + /* /********************************************************** - /* Numeric accessors + /* Numeric accessors (implemented since 2.12) /********************************************************** */ @Override - public BigInteger getBigIntegerValue() throws IOException { - // TODO Auto-generated method stub - return null; + public boolean isNaN() { + return false; // can't have since we only coerce integers } @Override - public BigDecimal getDecimalValue() throws IOException { - // TODO Auto-generated method stub + public NumberType getNumberType() throws IOException { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_UNKNOWN); // will also check event type + } + // Only integer types supported so... + + if ((_numTypesValid & NR_INT) != 0) { + return NumberType.INT; + } + if ((_numTypesValid & NR_LONG) != 0) { + return NumberType.LONG; + } + return NumberType.BIG_INTEGER; + } + + @Override + public Number getNumberValue() throws IOException { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_UNKNOWN); // will also check event type + } + // Only integer types supported so... + + if ((_numTypesValid & NR_INT) != 0) { + return _numberInt; + } + if ((_numTypesValid & NR_LONG) != 0) { + return _numberLong; + } + if ((_numTypesValid & NR_BIGINT) != 0) { + return _numberBigInt; + } + _throwInternal(); return null; } @Override - public double getDoubleValue() throws IOException { - // TODO Auto-generated method stub - return 0; + public int getIntValue() throws IOException { + if ((_numTypesValid & NR_INT) == 0) { + if (_numTypesValid == NR_UNKNOWN) { // not parsed at all + _checkNumericValue(NR_INT); // will also check event type + } + if ((_numTypesValid & NR_INT) == 0) { // wasn't an int natively? + _convertNumberToInt(); // let's make it so, if possible + } + } + return _numberInt; } @Override - public float getFloatValue() throws IOException { - // TODO Auto-generated method stub - return 0; + public long getLongValue() throws IOException { + if ((_numTypesValid & NR_LONG) == 0) { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_LONG); + } + if ((_numTypesValid & NR_LONG) == 0) { + _convertNumberToLong(); + } + } + return _numberLong; } @Override - public int getIntValue() throws IOException { - // TODO Auto-generated method stub - return 0; + public BigInteger getBigIntegerValue() throws IOException { + if ((_numTypesValid & NR_BIGINT) == 0) { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_BIGINT); + } + if ((_numTypesValid & NR_BIGINT) == 0) { + _convertNumberToBigInteger(); + } + } + return _numberBigInt; } @Override - public long getLongValue() throws IOException { - // TODO Auto-generated method stub - return 0; + public float getFloatValue() throws IOException { + if ((_numTypesValid & NR_FLOAT) == 0) { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_FLOAT); + } + } + return _convertNumberToFloat(); } @Override - public NumberType getNumberType() throws IOException { - // TODO Auto-generated method stub - return null; + public double getDoubleValue() throws IOException { + if ((_numTypesValid & NR_DOUBLE) == 0) { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_DOUBLE); + } + } + return _convertNumberToDouble(); } @Override - public Number getNumberValue() throws IOException { - // TODO Auto-generated method stub + public BigDecimal getDecimalValue() throws IOException { + if ((_numTypesValid & NR_BIGDECIMAL) == 0) { + if (_numTypesValid == NR_UNKNOWN) { + _checkNumericValue(NR_BIGDECIMAL); + } + } + return _convertNumberToBigDecimal(); + } + + // // // Helper methods for Numeric accessors + + protected final void _checkNumericValue(int expType) throws IOException { + if (_currToken == JsonToken.VALUE_NUMBER_INT) { + return; + } + _reportError("Current token ("+currentToken()+") not numeric, can not use numeric value accessors"); + } + + // NOTE: copied from `StdDeserializer`... + protected final int _isIntNumber(String text) + { + final int len = text.length(); + if (len > 0) { + char c = text.charAt(0); + // skip leading negative sign, do NOT allow leading plus + final int start = (c == '-') ? 1 : 0; + for (int i = start; i < len; ++i) { + int ch = text.charAt(i); + if (ch > '9' || ch < '0') { + return -1; + } + } + return len - start; + } + return 0; + } + + protected void _convertNumberToInt() throws IOException + { + // First, converting from long ought to be easy + if ((_numTypesValid & NR_LONG) != 0) { + // Let's verify it's lossless conversion by simple roundtrip + int result = (int) _numberLong; + if (((long) result) != _numberLong) { + _reportError("Numeric value ("+getText()+") out of range of int"); + } + _numberInt = result; + } else if ((_numTypesValid & NR_BIGINT) != 0) { + if (BI_MIN_INT.compareTo(_numberBigInt) > 0 + || BI_MAX_INT.compareTo(_numberBigInt) < 0) { + reportOverflowInt(); + } + _numberInt = _numberBigInt.intValue(); + } else { + _throwInternal(); + } + _numTypesValid |= NR_INT; + } + + protected void _convertNumberToLong() throws IOException + { + if ((_numTypesValid & NR_INT) != 0) { + _numberLong = (long) _numberInt; + } else if ((_numTypesValid & NR_BIGINT) != 0) { + if (BI_MIN_LONG.compareTo(_numberBigInt) > 0 + || BI_MAX_LONG.compareTo(_numberBigInt) < 0) { + reportOverflowLong(); + } + _numberLong = _numberBigInt.longValue(); + } else { + _throwInternal(); + } + _numTypesValid |= NR_LONG; + } + + protected void _convertNumberToBigInteger() throws IOException + { + if ((_numTypesValid & NR_LONG) != 0) { + _numberBigInt = BigInteger.valueOf(_numberLong); + } else if ((_numTypesValid & NR_INT) != 0) { + _numberBigInt = BigInteger.valueOf(_numberInt); + } else { + _throwInternal(); + } + _numTypesValid |= NR_BIGINT; + } + + protected float _convertNumberToFloat() throws IOException + { + // Note: this MUST start with more accurate representations, since we don't know which + // value is the original one (others get generated when requested) + if ((_numTypesValid & NR_BIGINT) != 0) { + return _numberBigInt.floatValue(); + } + if ((_numTypesValid & NR_LONG) != 0) { + return (float) _numberLong; + } + if ((_numTypesValid & NR_INT) != 0) { + return (float) _numberInt; + } + _throwInternal(); + return 0.0f; + } + + protected double _convertNumberToDouble() throws IOException + { + // same as above, start from more to less accurate + if ((_numTypesValid & NR_BIGINT) != 0) { + return _numberBigInt.doubleValue(); + } + if ((_numTypesValid & NR_LONG) != 0) { + return (double) _numberLong; + } + if ((_numTypesValid & NR_INT) != 0) { + return (double) _numberInt; + } + _throwInternal(); + return 0.0; + } + + protected BigDecimal _convertNumberToBigDecimal() throws IOException + { + if ((_numTypesValid & NR_BIGINT) != 0) { + return new BigDecimal(_numberBigInt); + } + if ((_numTypesValid & NR_LONG) != 0) { + return BigDecimal.valueOf(_numberLong); + } + if ((_numTypesValid & NR_INT) != 0) { + return BigDecimal.valueOf(_numberInt); + } + _throwInternal(); return null; } @@ -1039,20 +1352,25 @@ protected ByteArrayBuilder _getByteArrayBuilder() return _byteArrayBuilder; } - protected boolean _isEmpty(String str) - { - int len = (str == null) ? 0 : str.length(); - if (len > 0) { - for (int i = 0; i < len; ++i) { - if (str.charAt(i) > ' ') { - return false; - } - } + private T _internalErrorUnknownToken(Object token) { + throw new IllegalStateException("Internal error: unrecognized XmlTokenStream token: "+token); + } + + protected int _nextToken() throws IOException { + try { + return _xmlTokens.next(); + } catch (XMLStreamException e) { + return StaxUtil.throwAsParseException(e, this); } - return true; } - private T _internalErrorUnknownToken(Object token) { - throw new IllegalStateException("Internal error: unrecognized XmlTokenStream token: "+token); + protected void _skipEndElement() throws IOException { + try { + _xmlTokens.skipEndElement(); + } catch (XMLStreamException e) { + StaxUtil.throwAsParseException(e, this); + } catch (Exception e) { + throw new JsonParseException(this, e.getMessage(), e); + } } } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.java index 57b11a947..da825f943 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/WrapperHandlingDeserializer.java @@ -28,6 +28,9 @@ public class WrapperHandlingDeserializer protected final Set _namesToWrap; protected final JavaType _type; + + // @since 2.12 + protected final boolean _caseInsensitive; /* /********************************************************************** @@ -44,6 +47,7 @@ public WrapperHandlingDeserializer(BeanDeserializerBase delegate, Set na super(delegate); _namesToWrap = namesToWrap; _type = delegate.getValueType(); + _caseInsensitive = delegate.isCaseInsensitive(); } /* @@ -147,7 +151,7 @@ protected final void _configureParser(JsonParser p) throws IOException p = ((JsonParserDelegate) p).delegate(); } if (p instanceof FromXmlParser) { - ((FromXmlParser) p).addVirtualWrapping(_namesToWrap); + ((FromXmlParser) p).addVirtualWrapping(_namesToWrap, _caseInsensitive); } } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.java index 4dd06f68c..c8efcdf92 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlBeanDeserializerModifier.java @@ -96,8 +96,10 @@ public JsonDeserializer modifyDeserializer(DeserializationConfig config, ValueInstantiator inst = deser.getValueInstantiator(); // 03-Aug-2017, tatu: [dataformat-xml#254] suggests we also should // allow passing `int`/`Integer`/`long`/`Long` cases, BUT - // unfortunately we can not simple use default handling. Would need + // unfortunately we can not simply use default handling. Would need // coercion. + // 30-Apr-2020, tatu: Complication from [dataformat-xml#318] as we now + // have a delegate too... if (!inst.canCreateFromString()) { SettableBeanProperty textProp = _findSoleTextProp(config, deser.properties()); if (textProp != null) { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.java new file mode 100644 index 000000000..22f1de16e --- /dev/null +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlDeserializationContext.java @@ -0,0 +1,126 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.deser.DefaultDeserializationContext; +import com.fasterxml.jackson.databind.deser.DeserializerCache; +import com.fasterxml.jackson.databind.deser.DeserializerFactory; + +/** + * XML-specific {@link DeserializationContext} needed to override certain + * handlers. + * + * @since 2.12 + */ +public class XmlDeserializationContext + extends DefaultDeserializationContext +{ + private static final long serialVersionUID = 1L; + + /* + /********************************************************** + /* Life-cycle methods + /********************************************************** + */ + + /** + * Default constructor for a blueprint object, which will use the standard + * {@link DeserializerCache}, given factory. + */ + public XmlDeserializationContext(DeserializerFactory df) { + super(df, null); + } + + private XmlDeserializationContext(XmlDeserializationContext src, + DeserializationConfig config, JsonParser p, InjectableValues values) { + super(src, config, p, values); + } + + private XmlDeserializationContext(XmlDeserializationContext src) { super(src); } + + private XmlDeserializationContext(XmlDeserializationContext src, DeserializerFactory factory) { + super(src, factory); + } + + private XmlDeserializationContext(XmlDeserializationContext src, DeserializationConfig config) { + super(src, config); + } + + @Override + public XmlDeserializationContext copy() { + return new XmlDeserializationContext(this); + } + + @Override + public DefaultDeserializationContext createInstance(DeserializationConfig config, + JsonParser p, InjectableValues values) { + return new XmlDeserializationContext(this, config, p, values); + } + + @Override + public DefaultDeserializationContext createDummyInstance(DeserializationConfig config) { + // need to be careful to create non-blue-print instance + return new XmlDeserializationContext(this, config); + } + + @Override + public DefaultDeserializationContext with(DeserializerFactory factory) { + return new XmlDeserializationContext(this, factory); + } + + /* + /********************************************************** + /* Overrides we need + /********************************************************** + */ + + // [dataformat-xml#374]: need to remove handling of expected root name unwrapping + // to match serialization + @Override // since 2.12 + public Object readRootValue(JsonParser p, JavaType valueType, + JsonDeserializer deser, Object valueToUpdate) + throws IOException + { +// if (_config.useRootWrapping()) { +// return _unwrapAndDeserialize(p, valueType, deser, valueToUpdate); +// } + if (valueToUpdate == null) { + return deser.deserialize(p, this); + } + return deser.deserialize(p, this, valueToUpdate); + } + + // To support case where XML element has attributes as well as CDATA, need + // to "extract" scalar value (CDATA), after the fact + @Override // since 2.12 + public String extractScalarFromObject(JsonParser p, JsonDeserializer deser, + Class scalarType) + throws IOException + { + // Only called on START_OBJECT, should not need to check, but JsonParser we + // get may or may not be `FromXmlParser` so traverse using regular means + String text = ""; + + while (p.nextToken() == JsonToken.FIELD_NAME) { + // Couple of ways to find "real" textual content. One is to look for + // "XmlText"... but for that would need to know configuration. Alternatively + // could hold on to last text seen -- but this might be last attribute, for + // empty element. So for now let's simply hard-code check for empty String + // as marker and hope for best + final String propName = p.currentName(); + JsonToken t = p.nextToken(); + if (t == JsonToken.VALUE_STRING) { + if (propName.equals("")) { + text = p.getText(); + } + } else { + p.skipChildren(); + } + } + return text; + } + +} diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.java index 5a341e4ae..3bfe7ffea 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.java @@ -105,6 +105,7 @@ public static XmlReadContext createRootContext() { public final XmlReadContext createChildArrayContext(int lineNr, int colNr) { + ++_index; // not needed for Object, but does not hurt so no need to check curr type XmlReadContext ctxt = _child; if (ctxt == null) { _child = ctxt = new XmlReadContext(this, TYPE_ARRAY, lineNr, colNr); @@ -116,6 +117,7 @@ public final XmlReadContext createChildArrayContext(int lineNr, int colNr) public final XmlReadContext createChildObjectContext(int lineNr, int colNr) { + ++_index; // not needed for Object, but does not hurt so no need to check curr type XmlReadContext ctxt = _child; if (ctxt == null) { _child = ctxt = new XmlReadContext(this, TYPE_OBJECT, lineNr, colNr); @@ -127,7 +129,7 @@ public final XmlReadContext createChildObjectContext(int lineNr, int colNr) /* /********************************************************** - /* Abstract method implementation + /* Abstract method implementation, overrides /********************************************************** */ @@ -140,18 +142,16 @@ public final XmlReadContext createChildObjectContext(int lineNr, int colNr) @Override public final XmlReadContext getParent() { return _parent; } - /* - /********************************************************** - /* State changes - /********************************************************** + /** + * @return Location pointing to the point where the context + * start marker was found */ + @Override + public final JsonLocation getStartLocation(Object srcRef) { + // We don't keep track of offsets at this level (only reader does) + long totalChars = -1L; - public final boolean expectComma() { - throw new UnsupportedOperationException(); - } - - public void setCurrentName(String name) { - _currentName = name; + return new JsonLocation(srcRef, totalChars, _lineNr, _columnNr); } /* @@ -161,23 +161,26 @@ public void setCurrentName(String name) { */ /** - * @return Location pointing to the point where the context - * start marker was found + * Method called to mark start of new value, mostly to update `index` + * for Array and Root contexts. + * + * @since 2.12 */ - @Override - public final JsonLocation getStartLocation(Object srcRef) { - // We don't keep track of offsets at this level (only reader does) - long totalChars = -1L; + public final void valueStarted() { + ++_index; + } - return new JsonLocation(srcRef, totalChars, _lineNr, _columnNr); + public void setCurrentName(String name) { + _currentName = name; } public void setNamesToWrap(Set namesToWrap) { _namesToWrap = namesToWrap; } - public Set getNamesToWrap() { - return _namesToWrap; + // @since 2.11.1 + public boolean shouldWrap(String localName) { + return (_namesToWrap != null) && _namesToWrap.contains(localName); } protected void convertToArray() { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.java deleted file mode 100644 index eb815830b..000000000 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlStringDeserializer.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.deser; - -import java.io.IOException; - -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; -import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; - -/** - * Custom variant used instead of "plain" {@code StringDeserializer} to handle - * couple of edge cases that XML parser exposes. - *

- * NOTE: mostly copy-pasted from standard {@code StringDeserializer} - * - * @since 2.9.4 - */ -public class XmlStringDeserializer - extends StdScalarDeserializer -{ - private static final long serialVersionUID = 1L; - - public XmlStringDeserializer() { super(String.class); } - - @Override - public boolean isCachable() { return true; } - - @Override - public Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException { - return ""; - } - - @Override - public String deserialize(JsonParser p, DeserializationContext ctxt) throws IOException - { - if (p.hasToken(JsonToken.VALUE_STRING)) { - return p.getText(); - } - JsonToken t = p.getCurrentToken(); - if (t == JsonToken.START_ARRAY) { - return _deserializeFromArray(p, ctxt); - } - if (t == JsonToken.VALUE_EMBEDDED_OBJECT) { - Object ob = p.getEmbeddedObject(); - if (ob == null) { - return null; - } - if (ob instanceof byte[]) { - return ctxt.getBase64Variant().encode((byte[]) ob, false); - } - // otherwise, try conversion using toString()... - return ob.toString(); - } - // allow coercions, as handled by `FromXmlParser.getValueAsString()`: this includes - // START_OBJECT in some cases. - String text = p.getValueAsString(null); - if ((text != null) || (t == JsonToken.VALUE_NULL)) { - return text; - } - return (String) ctxt.handleUnexpectedToken(_valueClass, p); - } - - // Since we can never have type info ("natural type"; String, Boolean, Integer, Double): - // (is it an error to even call this version?) - @Override - public String deserializeWithType(JsonParser p, DeserializationContext ctxt, - TypeDeserializer typeDeserializer) throws IOException { - return deserialize(p, ctxt); - } -} diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java index 2bf3b5374..93fc0582d 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java @@ -25,14 +25,22 @@ public class XmlTokenStream { // // // main token states: - + public final static int XML_START_ELEMENT = 1; public final static int XML_END_ELEMENT = 2; public final static int XML_ATTRIBUTE_NAME = 3; public final static int XML_ATTRIBUTE_VALUE = 4; public final static int XML_TEXT = 5; - public final static int XML_END = 6; + // New in 2.12: needed to "re-process" previously encountered START_ELEMENT, + // with possible leading text + public final static int XML_DELAYED_START_ELEMENT = 6; + + // 2.12 also exposes "root scalars" as-is, instead of wrapping as Objects; this + // needs some more state management too + public final static int XML_ROOT_TEXT = 7; + + public final static int XML_END = 8; // // // token replay states @@ -79,11 +87,11 @@ public class XmlTokenStream protected boolean _xsiNilFound; /** - * If true we have a START_ELEMENT with mixed text + * Flag set true if current event is {@code XML_TEXT} and there is START_ELEMENT * - * @since 2.8 + * @since 2.12 */ - protected boolean _mixedText; + protected boolean _startElementAfterText; /** * Index of the next attribute of the current START_ELEMENT @@ -96,8 +104,20 @@ public class XmlTokenStream protected String _namespaceURI; + /** + * Current text value for TEXT_VALUE returned + */ protected String _textValue; - + + /** + * Marker flag set if caller wants to "push back" current token so + * that next call to {@link #next()} should simply be given what was + * already read. + * + * @since 2.12 + */ + protected boolean _repeatCurrentToken; + /* /********************************************************************** /* State for handling virtual wrapping @@ -132,18 +152,57 @@ public XmlTokenStream(XMLStreamReader xmlReader, Object sourceRef, int formatFeatures) { _sourceReference = sourceRef; + _formatFeatures = formatFeatures; + _xmlReader = Stax2ReaderAdapter.wrapIfNecessary(xmlReader); + } + + /** + * Second part of initialization, to be called immediately after construction + * + * @since 2.12 + */ + public int initialize() throws XMLStreamException + { // Let's ensure we point to START_ELEMENT... - if (xmlReader.getEventType() != XMLStreamConstants.START_ELEMENT) { + if (_xmlReader.getEventType() != XMLStreamConstants.START_ELEMENT) { throw new IllegalArgumentException("Invalid XMLStreamReader passed: should be pointing to START_ELEMENT (" - +XMLStreamConstants.START_ELEMENT+"), instead got "+xmlReader.getEventType()); + +XMLStreamConstants.START_ELEMENT+"), instead got "+_xmlReader.getEventType()); } - _xmlReader = Stax2ReaderAdapter.wrapIfNecessary(xmlReader); _localName = _xmlReader.getLocalName(); _namespaceURI = _xmlReader.getNamespaceURI(); - _formatFeatures = formatFeatures; _checkXsiAttributes(); // sets _attributeCount, _nextAttributeIndex - _currentState = XML_START_ELEMENT; + + // 02-Jul-2020, tatu: Two choices: if child elements OR attributes, expose + // as Object value; otherwise expose as Text + if (_xsiNilFound || _attributeCount > 0) { + return (_currentState = XML_START_ELEMENT); + } + + // copied from START_ELEMENT section of _next(): + final String text = _collectUntilTag(); + if (text == null) { + // 30-Nov-2020, tatu: [dataformat-xml#435], this is tricky + // situation since we got coerced `null`... but at least for + // now will have to report as "root String" (... with null contents) + _textValue = null; + _startElementAfterText = false; + return (_currentState = XML_ROOT_TEXT); + } + + final boolean startElementNext = _xmlReader.getEventType() == XMLStreamReader.START_ELEMENT; + // If we have no/all-whitespace text followed by START_ELEMENT, ignore text + if (startElementNext) { + if (_allWs(text)) { + _textValue = null; + return (_currentState = XML_DELAYED_START_ELEMENT); + } + _textValue = text; + return (_currentState = XML_DELAYED_START_ELEMENT); + } + _startElementAfterText = false; + _textValue = text; + return (_currentState = XML_ROOT_TEXT); } public XMLStreamReader2 getXmlReader() { @@ -170,32 +229,46 @@ public int next() throws XMLStreamException int n = next0(); switch (n) { case XML_START_ELEMENT: - System.out.println(" XML-token: XML_START_ELEMENT '"+_localName+"'"); + System.out.printf(" XmlTokenStream.next(): XML_START_ELEMENT '%s' %s\n", _localName, _loc()); + break; + case XML_DELAYED_START_ELEMENT: + System.out.printf(" XmlTokenStream.next(): XML_DELAYED_START_ELEMENT '%s' %s\n", _localName, _loc()); break; case XML_END_ELEMENT: - System.out.println(" XML-token: XML_END_ELEMENT '"+_localName+"'"); + // 24-May-2020, tatu: no name available for end element so do not print + System.out.printf(" XmlTokenStream.next(): XML_END_ELEMENT %s\n", _loc()); break; case XML_ATTRIBUTE_NAME: - System.out.println(" XML-token: XML_ATTRIBUTE_NAME '"+_localName+"'"); + System.out.printf(" XmlTokenStream.next(): XML_ATTRIBUTE_NAME '%s' %s\n", _localName, _loc()); break; case XML_ATTRIBUTE_VALUE: - System.out.println(" XML-token: XML_ATTRIBUTE_VALUE '"+_textValue+"'"); + System.out.printf(" XmlTokenStream.next(): XML_ATTRIBUTE_VALUE '%s' %s\n", _textValue, _loc()); break; case XML_TEXT: - System.out.println(" XML-token: XML_TEXT '"+_textValue+"'"); + System.out.printf(" XmlTokenStream.next(): XML_TEXT '%s' %s\n", _textValue, _loc()); break; case XML_END: - System.out.println(" XML-token: XML_END"); + System.out.printf(" XmlTokenStream.next(): XML_END %s\n", _loc()); break; default: throw new IllegalStateException(); } return n; } + + private String _loc() { + JsonLocation loc = getCurrentLocation(); + return String.format("[line: %d, column: %d]", loc.getLineNr(), loc.getColumnNr()); + } */ - public int next() throws XMLStreamException +// public int next0() throws XMLStreamException + public int next() throws XMLStreamException { + if (_repeatCurrentToken) { + _repeatCurrentToken = false; + return _currentState; + } if (_repeatElement != 0) { return (_currentState = _handleRepeatElement()); } @@ -206,14 +279,24 @@ public void skipEndElement() throws IOException, XMLStreamException { int type = next(); if (type != XML_END_ELEMENT) { - throw new IOException("Expected END_ELEMENT, got event of type "+type); + throw new IOException(String.format( + "Internal error: Expected END_ELEMENT, got event of type %s", + _stateDesc(type))); } } public int getCurrentToken() { return _currentState; } public String getText() { return _textValue; } + + /** + * Accessor for local name of current named event (that is, + * {@code XML_START_ELEMENT} or {@code XML_ATTRIBUTE_NAME}). + *

+ * NOTE: name NOT accessible on {@code XML_END_ELEMENT} + */ public String getLocalName() { return _localName; } + public String getNamespaceURI() { return _namespaceURI; } public boolean hasXsiNil() { @@ -251,26 +334,40 @@ public JsonLocation getTokenLocation() { /** * Method used to add virtual wrapping, which just duplicates START_ELEMENT * stream points to, and its matching closing element. - * - * @since 2.1 */ protected void repeatStartElement() { -//System.out.println(" -> repeatStartElement for "+_localName); +//System.out.println(" XmlTokenStream.repeatStartElement() for <"+_localName+">, _currentWrapper was: "+_currentWrapper); // sanity check: can only be used when just returned START_ELEMENT: if (_currentState != XML_START_ELEMENT) { - throw new IllegalStateException("Current state not XML_START_ELEMENT (" - +XML_START_ELEMENT+") but "+_currentState); + // 14-May-2020, tatu: Looks like we DO end up here with empty Lists; if so, + // should NOT actually wrap. + if (_currentState == XML_END_ELEMENT) { + return; + } + throw new IllegalStateException("Current state not XML_START_ELEMENT but "+_currentStateDesc()); } // Important: add wrapper, to keep track... if (_currentWrapper == null) { - _currentWrapper = ElementWrapper.matchingWrapper(_currentWrapper, _localName, _namespaceURI); + _currentWrapper = ElementWrapper.matchingWrapper(null, _localName, _namespaceURI); } else { _currentWrapper = ElementWrapper.matchingWrapper(_currentWrapper.getParent(), _localName, _namespaceURI); } +//System.out.println(" repeatStartElement for "+_localName+", _currentWrapper now: "+_currentWrapper); _repeatElement = REPLAY_START_DUP; } + /** + * Method that can be called to ask stream to literally just return current token + * with the next call to {@link #next()}, without more work. + * + * @since 2.12 + */ + protected void pushbackCurrentToken() + { + _repeatCurrentToken = true; + } + /** * Method called to skip any attributes current START_ELEMENT may have, * so that they are not returned as token. @@ -279,53 +376,27 @@ protected void repeatStartElement() */ protected void skipAttributes() { - if (_currentState == XML_ATTRIBUTE_NAME) { +//System.out.println(" XmlTokenStream.skipAttributes(), state: "+_currentStateDesc()); + switch (_currentState) { + case XML_ATTRIBUTE_NAME: _attributeCount = 0; _currentState = XML_START_ELEMENT; - } else if (_currentState == XML_START_ELEMENT) { - /* 06-Jan-2012, tatu: As per [#47] it looks like we should NOT do anything - * in this particular case, because it occurs when original element had - * no attributes and we now point to the first child element. - */ + break; + case XML_START_ELEMENT: + // 06-Jan-2012, tatu: As per [#47] it looks like we should NOT do anything + // in this particular case, because it occurs when original element had + // no attributes and we now point to the first child element. // _attributeCount = 0; - } else if (_currentState == XML_TEXT) { - ; // nothing to do... is it even legal? - } else { - throw new IllegalStateException("Current state not XML_START_ELEMENT or XML_ATTRIBUTE_NAME (" - +XML_START_ELEMENT+") but "+_currentState); - } - } - - /** - * Helper method called by XML String deserializer to concatenate textual contents - * contained in logical "Object": mostly just to skip attribute values. - */ - protected String convertToString() throws XMLStreamException - { - // only applicable to cases where START_OBJECT was induced by attributes - if (_currentState != XML_ATTRIBUTE_NAME || _nextAttributeIndex != 0) { - return null; - } - String text = _collectUntilTag(); - // 23-Dec-2015, tatu: Used to require text not to be null, but as per - // [dataformat-xml#167], empty tag does count - if (_xmlReader.getEventType() == XMLStreamReader.END_ELEMENT) { - if (text == null) { - text = ""; - } - if (_currentWrapper != null) { - _currentWrapper = _currentWrapper.getParent(); - } - // just for diagnostics, reset to element name (from first attribute name) - _localName = _xmlReader.getLocalName(); - _namespaceURI = _xmlReader.getNamespaceURI(); - _attributeCount = 0; - _currentState = XML_TEXT; - _textValue = text; - return text; + break; + case XML_TEXT: + break; // nothing to do... is it even legal? + case XML_DELAYED_START_ELEMENT: + // 03-Jul-2020, tatu: and here nothing to do either... ? + break; + default: + throw new IllegalStateException( +"Current state not XML_START_ELEMENT or XML_ATTRIBUTE_NAME but "+_currentStateDesc()); } - // Anything to do in failed case? Roll back whatever we found or.. ? - return null; } /* @@ -336,6 +407,7 @@ protected String convertToString() throws XMLStreamException private final int _next() throws XMLStreamException { +//System.out.println(" XmlTokenStream._next(), state: "+_currentStateDesc()); switch (_currentState) { case XML_ATTRIBUTE_VALUE: ++_nextAttributeIndex; @@ -355,6 +427,7 @@ private final int _next() throws XMLStreamException throw new IllegalStateException("Unexpected START_ELEMENT after null token"); } if (_nextAttributeIndex < _attributeCount) { +//System.out.println(" XmlTokenStream._next(): Got attr(s)!"); _localName = _xmlReader.getAttributeLocalName(_nextAttributeIndex); _namespaceURI = _xmlReader.getAttributeNamespace(_nextAttributeIndex); _textValue = _xmlReader.getAttributeValue(_nextAttributeIndex); @@ -362,53 +435,85 @@ private final int _next() throws XMLStreamException } // otherwise need to find START/END_ELEMENT or text String text = _collectUntilTag(); +//System.out.println(" XmlTokenStream._next(): _collectUntilTag -> '"+text+"'"); final boolean startElementNext = _xmlReader.getEventType() == XMLStreamReader.START_ELEMENT; +//System.out.println(" XmlTokenStream._next(): startElementNext? "+startElementNext); // If we have no/all-whitespace text followed by START_ELEMENT, ignore text if (startElementNext) { - if (text == null || _allWs(text)) { - _mixedText = false; + if (_allWs(text)) { + _startElementAfterText = false; return _initStartElement(); } - _mixedText = true; + _startElementAfterText = true; _textValue = text; + return (_currentState = XML_TEXT); } // For END_ELEMENT we will return text, if any if (text != null) { - _mixedText = false; + _startElementAfterText = false; _textValue = text; return (_currentState = XML_TEXT); } - _mixedText = false; + _startElementAfterText = false; return _handleEndElement(); + case XML_DELAYED_START_ELEMENT: // since 2.12, to support scalar Root Value + // Two cases: either "simple" with not text + if (_textValue == null) { + return _initStartElement(); + } + // or one where there is first text (to translate into "": key/value entry) + // then followed by start element + _startElementAfterText = true; + return (_currentState = XML_TEXT); + case XML_ATTRIBUTE_NAME: // if we just returned name, will need to just send value next return (_currentState = XML_ATTRIBUTE_VALUE); case XML_TEXT: // mixed text with other elements - if (_mixedText) { - _mixedText = false; + if (_startElementAfterText) { + _startElementAfterText = false; return _initStartElement(); } // text followed by END_ELEMENT return _handleEndElement(); - + case XML_ROOT_TEXT: + close(); + return (_currentState = XML_END); case XML_END: return XML_END; // throw new IllegalStateException("No more XML tokens available (end of input)"); } // Ok: must be END_ELEMENT; see what tag we get (or end) - switch (_skipUntilTag()) { + switch (_skipAndCollectTextUntilTag()) { case XMLStreamConstants.END_DOCUMENT: + close(); return (_currentState = XML_END); case XMLStreamConstants.END_ELEMENT: + // 24-May-2020, tatu: Need to see if we have "mixed content" to offer + if (!_allWs(_textValue)) { + // _textValue already set + return (_currentState = XML_TEXT); + } return _handleEndElement(); } + // 24-May-2020, tatu: Need to see if we have "mixed content" to offer + if (!_allWs(_textValue)) { + // _textValue already set + _startElementAfterText = true; + return (_currentState = XML_TEXT); + } + // START_ELEMENT... return _initStartElement(); } + /** + * @return Collected text, if any, EXCEPT that if {@code FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL} + * AND empty element, returns {@code null} + */ private final String _collectUntilTag() throws XMLStreamException { // 21-Jun-2017, tatu: Whether exposed as `null` or "" is now configurable... @@ -428,18 +533,6 @@ private final String _collectUntilTag() throws XMLStreamException case XMLStreamConstants.END_ELEMENT: case XMLStreamConstants.END_DOCUMENT: - // 04-May-2018, tatu: We could easily make ALSO report - // as `null`, by below, but that breaks existing tests so not - // done at least until 3.0. - /* - if (chars == null) { - if (FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL.enabledIn(_formatFeatures)) { - return null; - } - return ""; - } - return chars; - */ return (chars == null) ? "" : chars.toString(); // note: SPACE is ignorable (and seldom seen), not to be included @@ -464,6 +557,7 @@ private final String _collectUntilTag() throws XMLStreamException } } + // Called to simply skip tokens until start/end tag, or end-of-document found private final int _skipUntilTag() throws XMLStreamException { while (_xmlReader.hasNext()) { @@ -480,6 +574,45 @@ private final int _skipUntilTag() throws XMLStreamException throw new IllegalStateException("Expected to find a tag, instead reached end of input"); } + // Called to skip tokens until start/end tag (or end-of-document) found, but + // also collecting cdata until then, if any found, for possible "mixed content" + // to report + // + // @since 2.12 + private final int _skipAndCollectTextUntilTag() throws XMLStreamException + { + CharSequence chars = null; + + while (_xmlReader.hasNext()) { + int type; + switch (type = _xmlReader.next()) { + case XMLStreamConstants.START_ELEMENT: + case XMLStreamConstants.END_ELEMENT: + case XMLStreamConstants.END_DOCUMENT: + _textValue = (chars == null) ? "" : chars.toString(); + return type; + // note: SPACE is ignorable (and seldom seen), not to be included + case XMLStreamConstants.CHARACTERS: + case XMLStreamConstants.CDATA: + { + String str = _getText(_xmlReader); + if (chars == null) { + chars = str; + } else { + if (chars instanceof String) { + chars = new StringBuilder(chars); + } + ((StringBuilder)chars).append(str); + } + } + break; + default: + // any other type (proc instr, comment etc) is just ignored + } + } + throw new IllegalStateException("Expected to find a tag, instead reached end of input"); + } + private final String _getText(XMLStreamReader2 r) throws XMLStreamException { try { @@ -499,15 +632,6 @@ private final String _getText(XMLStreamReader2 r) throws XMLStreamException /********************************************************************** */ - /* - _xmlReader = Stax2ReaderAdapter.wrapIfNecessary(xmlReader); - _currentState = XML_START_ELEMENT; - _localName = _xmlReader.getLocalName(); - _namespaceURI = _xmlReader.getNamespaceURI(); - _attributeCount = _xmlReader.getAttributeCount(); - _formatFeatures = formatFeatures; - */ - private final int _initStartElement() throws XMLStreamException { final String ns = _xmlReader.getNamespaceURI(); @@ -515,20 +639,20 @@ private final int _initStartElement() throws XMLStreamException _checkXsiAttributes(); - /* Support for virtual wrapping: in wrapping, may either - * create a new wrapper scope (if in sub-tree, or matches - * wrapper element itself), or implicitly close existing - * scope. - */ + // Support for virtual wrapping: in wrapping, may either create a new + // wrapper scope (if in sub-tree, or matches wrapper element itself), + // or implicitly close existing scope. + if (_currentWrapper != null) { if (_currentWrapper.matchesWrapper(localName, ns)) { _currentWrapper = _currentWrapper.intermediateWrapper(); +//System.out.println(" _initStartElement(): START_ELEMENT ("+localName+") DOES match ["+_currentWrapper+"]: leave/add intermediate"); } else { // implicit end is more interesting: +//System.out.println(" _initStartElement(): START_ELEMENT ("+localName+") not matching '"+_localName+"'; add extra XML-END-ELEMENT!"); _localName = _currentWrapper.getWrapperLocalName(); _namespaceURI = _currentWrapper.getWrapperNamespace(); _currentWrapper = _currentWrapper.getParent(); -//System.out.println(" START_ELEMENT ("+localName+") not matching '"+_localName+"'; add extra XML-END-ELEMENT!"); // Important! We also need to restore the START_ELEMENT, so: _nextLocalName = localName; _nextNamespaceURI = ns; @@ -571,16 +695,18 @@ private final void _checkXsiAttributes() { */ protected int _handleRepeatElement() throws XMLStreamException { +//System.out.println(" XMLTokenStream._handleRepeatElement()"); + int type = _repeatElement; _repeatElement = 0; if (type == REPLAY_START_DUP) { -//System.out.println("handleRepeat for START_ELEMENT: "+_localName+" ("+_xmlReader.getLocalName()+")"); +//System.out.println(" XMLTokenStream._handleRepeatElement() for START_ELEMENT: "+_localName+" ("+_xmlReader.getLocalName()+")"); // important: add the virtual element second time, but not with name to match _currentWrapper = _currentWrapper.intermediateWrapper(); return XML_START_ELEMENT; } if (type == REPLAY_END) { -//System.out.println("handleRepeat for END_ELEMENT: "+_localName+" ("+_xmlReader.getLocalName()+")"); +//System.out.println(" XMLTokenStream._handleRepeatElement() for END_ELEMENT: "+_localName+" ("+_xmlReader.getLocalName()+")"); _localName = _xmlReader.getLocalName(); _namespaceURI = _xmlReader.getNamespaceURI(); if (_currentWrapper != null) { @@ -596,8 +722,8 @@ protected int _handleRepeatElement() throws XMLStreamException _namespaceURI = _nextNamespaceURI; _nextLocalName = null; _nextNamespaceURI = null; - -//System.out.println("handleRepeat for START_DELAYED: "+_localName+" ("+_xmlReader.getLocalName()+")"); + +//System.out.println(" XMLTokenStream._handleRepeatElement() for START_DELAYED: "+_localName+" ("+_xmlReader.getLocalName()+")"); return XML_START_ELEMENT; } @@ -606,6 +732,7 @@ protected int _handleRepeatElement() throws XMLStreamException private final int _handleEndElement() { +//System.out.println(" XMLTokenStream._handleEndElement()"); if (_currentWrapper != null) { ElementWrapper w = _currentWrapper; // important: if we close the scope, must duplicate END_ELEMENT as well @@ -614,14 +741,24 @@ private final int _handleEndElement() _localName = w.getWrapperLocalName(); _namespaceURI = w.getWrapperNamespace(); _currentWrapper = _currentWrapper.getParent(); -//System.out.println(" IMPLICIT requestRepeat of END_ELEMENT '"+_localName); +//System.out.println(" XMLTokenStream._handleEndElement(): IMPLICIT requestRepeat of END_ELEMENT '"+_localName); } else { _currentWrapper = _currentWrapper.getParent(); + // 23-May-2020, tatu: Let's clear _localName since it's value is unlikely + // to be correct and we may or may not be able to get real one (for + // END_ELEMENT could) -- FromXmlParser does NOT use this info + _localName = ""; + _namespaceURI = ""; + } + } else { + // Not (necessarily) known, as per above, so: + _localName = ""; + _namespaceURI = ""; } return (_currentState = XML_END_ELEMENT); } - + private JsonLocation _extractLocation(XMLStreamLocation2 location) { if (location == null) { // just for impls that might pass null... @@ -633,8 +770,7 @@ private JsonLocation _extractLocation(XMLStreamLocation2 location) location.getColumnNumber()); } - - protected boolean _allWs(String str) + protected static boolean _allWs(String str) { final int len = (str == null) ? 0 : str.length(); if (len > 0) { @@ -647,7 +783,34 @@ protected boolean _allWs(String str) return true; } + protected String _currentStateDesc() { + return _stateDesc(_currentState); + } + + protected String _stateDesc(int state) { + switch (state) { + case XML_START_ELEMENT: + return "XML_START_ELEMENT"; + case XML_END_ELEMENT: + return "XML_END_ELEMENT"; + case XML_ATTRIBUTE_NAME: + return "XML_ATTRIBUTE_NAME"; + case XML_ATTRIBUTE_VALUE: + return "XML_ATTRIBUTE_VALUE"; + case XML_TEXT: + return "XML_TEXT"; + case XML_DELAYED_START_ELEMENT: + return "XML_START_ELEMENT_DELAYED"; + case XML_ROOT_TEXT: + return "XML_ROOT_TEXT"; + case XML_END: + return "XML_END"; + } + return "N/A ("+_currentState+")"; + } + // for DEBUGGING + /* @Override public String toString() { @@ -656,4 +819,5 @@ public String toString() _currentState, _attributeCount, _nextAttributeIndex, _localName, _textValue, _repeatElement, _currentWrapper, _repeatElement, _nextLocalName); } + */ } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.java index ea2833c23..7d68d5a67 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/jaxb/XmlJaxbAnnotationIntrospector.java @@ -14,7 +14,10 @@ * instead, plain {@link JaxbAnnotationIntrospector} should fully work. * With previous versions some aspects were not fully working and this * class was necessary. + * + * @deprecated Since 2.12 (as per above notes) */ +@Deprecated public class XmlJaxbAnnotationIntrospector extends JaxbAnnotationIntrospector implements XmlAnnotationIntrospector @@ -29,13 +32,13 @@ public XmlJaxbAnnotationIntrospector() { public XmlJaxbAnnotationIntrospector(TypeFactory typeFactory) { super(typeFactory); } - + /* /********************************************************************** /* XmlAnnotationIntrospector overrides /********************************************************************** */ - + @Override public String findNamespace(Annotated ann) { return super.findNamespace(ann); @@ -45,7 +48,7 @@ public String findNamespace(Annotated ann) { public Boolean isOutputAsAttribute(Annotated ann) { return super.isOutputAsAttribute(ann); } - + @Override public Boolean isOutputAsText(Annotated ann) { return super.isOutputAsText(ann); diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.java index b67db9105..0085e8d36 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.java @@ -5,6 +5,7 @@ import java.math.BigInteger; import java.util.*; +import javax.xml.XMLConstants; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; @@ -16,6 +17,7 @@ import com.fasterxml.jackson.core.base.GeneratorBase; import com.fasterxml.jackson.core.io.IOContext; import com.fasterxml.jackson.core.json.JsonWriteContext; +import com.fasterxml.jackson.core.util.JacksonFeatureSet; import com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter; import com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter; import com.fasterxml.jackson.dataformat.xml.util.StaxUtil; @@ -23,11 +25,12 @@ /** * {@link JsonGenerator} that outputs JAXB-style XML output instead of JSON content. * Operation requires calling code (usually either standard Jackson serializers, - * or in some cases (like BeanSerializer) customised ones) to do + * or in some cases (like BeanSerializer) customized ones) to do * additional configuration calls beyond regular {@link JsonGenerator} API, * mostly to pass namespace information. */ -public final class ToXmlGenerator +public class ToXmlGenerator +// non-final since 2.12 but only sub-class if you really know what you are doing... extends GeneratorBase { /** @@ -35,7 +38,7 @@ public final class ToXmlGenerator * name to use... */ protected final static String DEFAULT_UNKNOWN_ELEMENT = "unknown"; - + /** * Enumeration that defines all togglable extra XML-specific features */ @@ -310,6 +313,11 @@ public ToXmlGenerator configure(Feature f, boolean state) { @Override public boolean canWriteFormattedNumbers() { return true; } + @Override // @since 2.12 + public JacksonFeatureSet getWriteCapabilities() { + return DEFAULT_TEXTUAL_WRITE_CAPABILITIES; + } + // @since 2.7.5 public boolean inRoot() { return _writeContext.inRoot(); @@ -590,10 +598,14 @@ public void writeFieldName(SerializableString name) throws IOException { writeFieldName(name.getValue()); } - + @Override public void writeString(String text) throws IOException { + if (text == null) { // [dataformat-xml#413] + writeNull(); + return; + } _verifyValueWrite("write String value"); if (_nextName == null) { handleMissingName(); @@ -830,22 +842,24 @@ public void writeBinary(Base64Variant b64variant, if (_nextName == null) { handleMissingName(); } + final org.codehaus.stax2.typed.Base64Variant stax2base64v = StaxUtil.toStax2Base64Variant(b64variant); try { if (_nextIsAttribute) { // Stax2 API only has 'full buffer' write method: byte[] fullBuffer = toFullBuffer(data, offset, len); - _xmlWriter.writeBinaryAttribute("", _nextName.getNamespaceURI(), _nextName.getLocalPart(), fullBuffer); + _xmlWriter.writeBinaryAttribute(stax2base64v, + "", _nextName.getNamespaceURI(), _nextName.getLocalPart(), fullBuffer); } else if (checkNextIsUnwrapped()) { // should we consider pretty-printing or not? - _xmlWriter.writeBinary(data, offset, len); + _xmlWriter.writeBinary(stax2base64v, data, offset, len); } else { if (_xmlPrettyPrinter != null) { _xmlPrettyPrinter.writeLeafElement(_xmlWriter, _nextName.getNamespaceURI(), _nextName.getLocalPart(), - data, offset, len); + stax2base64v, data, offset, len); } else { _xmlWriter.writeStartElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); - _xmlWriter.writeBinary(data, offset, len); + _xmlWriter.writeBinary(stax2base64v, data, offset, len); _xmlWriter.writeEndElement(); } } @@ -865,23 +879,25 @@ public int writeBinary(Base64Variant b64variant, InputStream data, int dataLengt if (_nextName == null) { handleMissingName(); } + final org.codehaus.stax2.typed.Base64Variant stax2base64v = StaxUtil.toStax2Base64Variant(b64variant); try { if (_nextIsAttribute) { // Stax2 API only has 'full buffer' write method: byte[] fullBuffer = toFullBuffer(data, dataLength); - _xmlWriter.writeBinaryAttribute("", _nextName.getNamespaceURI(), _nextName.getLocalPart(), fullBuffer); + _xmlWriter.writeBinaryAttribute(stax2base64v, + "", _nextName.getNamespaceURI(), _nextName.getLocalPart(), fullBuffer); } else if (checkNextIsUnwrapped()) { // should we consider pretty-printing or not? - writeStreamAsBinary(data, dataLength); + writeStreamAsBinary(stax2base64v, data, dataLength); } else { if (_xmlPrettyPrinter != null) { _xmlPrettyPrinter.writeLeafElement(_xmlWriter, _nextName.getNamespaceURI(), _nextName.getLocalPart(), - toFullBuffer(data, dataLength), 0, dataLength); + stax2base64v, toFullBuffer(data, dataLength), 0, dataLength); } else { _xmlWriter.writeStartElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); - writeStreamAsBinary(data, dataLength); + writeStreamAsBinary(stax2base64v, data, dataLength); _xmlWriter.writeEndElement(); } } @@ -892,7 +908,8 @@ public int writeBinary(Base64Variant b64variant, InputStream data, int dataLengt return dataLength; } - private void writeStreamAsBinary(InputStream data, int len) throws IOException, XMLStreamException + private void writeStreamAsBinary(org.codehaus.stax2.typed.Base64Variant stax2base64v, + InputStream data, int len) throws IOException, XMLStreamException { // base64 encodes up to 3 bytes into a 4 bytes string byte[] tmp = new byte[3]; @@ -903,7 +920,7 @@ private void writeStreamAsBinary(InputStream data, int len) throws IOException, len -= read; if(offset == 3) { offset = 0; - _xmlWriter.writeBinary(tmp, 0, 3); + _xmlWriter.writeBinary(stax2base64v, tmp, 0, 3); } if (len == 0) { break; @@ -912,11 +929,10 @@ private void writeStreamAsBinary(InputStream data, int len) throws IOException, // we still have < 3 bytes in the buffer if(offset > 0) { - _xmlWriter.writeBinary(tmp, 0, offset); + _xmlWriter.writeBinary(stax2base64v, tmp, 0, offset); } } - private byte[] toFullBuffer(byte[] data, int offset, int len) { // might already be ok: @@ -987,20 +1003,32 @@ public void writeNull() throws IOException if (_nextName == null) { handleMissingName(); } - // !!! TODO: proper use of 'xsd:isNil' ? try { if (_nextIsAttribute) { - /* With attributes, best just leave it out, right? (since there's no way - * to use 'xsi:nil') - */ + // With attributes, best just leave it out, right? (since there's no way + // to use 'xsi:nil') } else if (checkNextIsUnwrapped()) { // as with above, best left unwritten? } else { + final boolean asXsiNil = isEnabled(Feature.WRITE_NULLS_AS_XSI_NIL); if (_xmlPrettyPrinter != null) { - _xmlPrettyPrinter.writeLeafNullElement(_xmlWriter, - _nextName.getNamespaceURI(), _nextName.getLocalPart()); + // 12-Nov-2020, tatu: Not clean, due to backwards-compat challenges.. + // but has to do + if (asXsiNil && (_xmlPrettyPrinter instanceof DefaultXmlPrettyPrinter)) { + ((DefaultXmlPrettyPrinter) _xmlPrettyPrinter).writeLeafXsiNilElement(_xmlWriter, + _nextName.getNamespaceURI(), _nextName.getLocalPart()); + } else { + _xmlPrettyPrinter.writeLeafNullElement(_xmlWriter, + _nextName.getNamespaceURI(), _nextName.getLocalPart()); + } } else { - _xmlWriter.writeEmptyElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); + if (asXsiNil) { + _xmlWriter.writeStartElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); + _xmlWriter.writeAttribute("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil", "true"); + _xmlWriter.writeEndElement(); + } else { + _xmlWriter.writeEmptyElement(_nextName.getNamespaceURI(), _nextName.getLocalPart()); + } } } } catch (XMLStreamException e) { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.java index d6cf70416..7a1f81cd1 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/UnwrappingXmlBeanSerializer.java @@ -56,9 +56,17 @@ public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWrit _nameTransformer = src._nameTransformer; } - protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, Set toIgnore) + protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, + Set toIgnore, Set toInclude) { - super(src, toIgnore); + super(src, toIgnore, toInclude); + _nameTransformer = src._nameTransformer; + } + + protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, + BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) + { + super(src, properties, filteredProperties); _nameTransformer = src._nameTransformer; } @@ -93,9 +101,15 @@ public BeanSerializerBase withFilterId(Object filterId) return new UnwrappingXmlBeanSerializer(this, _objectIdWriter, filterId); } - @Override // since 2.8 - protected BeanSerializerBase withIgnorals(Set toIgnore) { - return new UnwrappingXmlBeanSerializer(this, toIgnore); + @Override // since 2.12 + protected BeanSerializerBase withByNameInclusion(Set toIgnore, Set toInclude) { + return new UnwrappingXmlBeanSerializer(this, toIgnore, toInclude); + } + + @Override // since 2.11.1 + protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, + BeanPropertyWriter[] filteredProperties) { + return new UnwrappingXmlBeanSerializer(this, properties, filteredProperties); } /** diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.java index 7933df85f..b3335d201 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializer.java @@ -39,8 +39,14 @@ public XmlBeanSerializer(XmlBeanSerializerBase src, ObjectIdWriter objectIdWrite super(src, objectIdWriter); } - public XmlBeanSerializer(XmlBeanSerializerBase src, Set toIgnore) { - super(src, toIgnore); + public XmlBeanSerializer(XmlBeanSerializerBase src, Set toIgnore, Set toInclude) { + super(src, toIgnore, toInclude); + } + + protected XmlBeanSerializer(XmlBeanSerializerBase src, + BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) + { + super(src, properties, filteredProperties); } /* @@ -64,9 +70,15 @@ public BeanSerializerBase withFilterId(Object filterId) { return new XmlBeanSerializer(this, _objectIdWriter, filterId); } - @Override - protected BeanSerializerBase withIgnorals(Set toIgnore) { - return new XmlBeanSerializer(this, toIgnore); + @Override // since 2.12 + protected BeanSerializerBase withByNameInclusion(Set toIgnore, Set toInclude) { + return new XmlBeanSerializer(this, toIgnore, toInclude); + } + + @Override // since 2.11.1 + protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, + BeanPropertyWriter[] filteredProperties) { + return new XmlBeanSerializer(this, properties, filteredProperties); } /** diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.java index ecc8ce8ee..7b43fa71d 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.java @@ -63,9 +63,8 @@ public XmlBeanSerializerBase(BeanSerializerBase src) { super(src); - /* Then make sure attributes are sorted before elements, keep track - * of how many there are altogether - */ + // Then make sure attributes are sorted before elements, keep track + // of how many there are altogether int attrCount = 0; for (BeanPropertyWriter bpw : _props) { if (_isAttribute(bpw)) { // Yup: let's build re-ordered list then @@ -124,9 +123,10 @@ protected XmlBeanSerializerBase(XmlBeanSerializerBase src, ObjectIdWriter object _cdata = src._cdata; } - protected XmlBeanSerializerBase(XmlBeanSerializerBase src, Set toIgnore) + protected XmlBeanSerializerBase(XmlBeanSerializerBase src, + Set toIgnore, Set toInclude) { - super(src, toIgnore); + super(src, toIgnore, toInclude); _attributeCount = src._attributeCount; _textPropertyIndex = src._textPropertyIndex; _xmlNames = src._xmlNames; @@ -142,6 +142,16 @@ public XmlBeanSerializerBase(XmlBeanSerializerBase src, NameTransformer transfor _cdata = src._cdata; } + // @since 2.11.1 + protected XmlBeanSerializerBase(XmlBeanSerializerBase src, + BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) { + super(src, properties, filteredProperties); + _attributeCount = src._attributeCount; + _textPropertyIndex = src._textPropertyIndex; + _xmlNames = src._xmlNames; + _cdata = src._cdata; + } + /* /********************************************************** /* Overridden serialization methods diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.java index a50e1a8a3..e0df7cf01 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlSerializerProvider.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.PropertyName; import com.fasterxml.jackson.databind.SerializationConfig; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import com.fasterxml.jackson.databind.ser.SerializerFactory; import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; import com.fasterxml.jackson.databind.util.TokenBuffer; @@ -28,12 +29,6 @@ public class XmlSerializerProvider extends DefaultSerializerProvider // As of 2.7 private static final long serialVersionUID = 1L; - /** - * If all we get to serialize is a null, there's no way to figure out - * expected root name; so let's just default to something like "<null>"... - */ - protected final static QName ROOT_NAME_FOR_NULL = new QName("null"); - protected final XmlRootNameLookup _rootNameLookup; public XmlSerializerProvider(XmlRootNameLookup rootNames) @@ -80,6 +75,7 @@ public DefaultSerializerProvider createInstance(SerializationConfig config, @Override public void serializeValue(JsonGenerator gen, Object value) throws IOException { + _generator = gen; if (value == null) { _serializeXmlNull(gen); return; @@ -115,16 +111,27 @@ public void serializeValue(JsonGenerator gen, Object value) throws IOException } } + @Override // since 2.11.1, was missing before + public void serializeValue(JsonGenerator gen, Object value, JavaType rootType) throws IOException + { + serializeValue(gen, value, rootType, null); + } + // @since 2.1 @SuppressWarnings("resource") @Override public void serializeValue(JsonGenerator gen, Object value, JavaType rootType, JsonSerializer ser) throws IOException { + _generator = gen; if (value == null) { _serializeXmlNull(gen); return; } + // Let's ensure types are compatible at this point + if ((rootType != null) && !rootType.getRawClass().isAssignableFrom(value.getClass())) { + _reportIncompatibleRootType(value, rootType); + } final boolean asArray; final ToXmlGenerator xgen = _asXmlGenerator(gen); if (xgen == null) { // called by convertValue() @@ -155,20 +162,70 @@ public void serializeValue(JsonGenerator gen, Object value, JavaType rootType, } } - protected void _serializeXmlNull(JsonGenerator jgen) throws IOException + @SuppressWarnings("resource") + @Override // since 2.11.1, was missing before + public void serializePolymorphic(JsonGenerator gen, Object value, JavaType rootType, + JsonSerializer valueSer, TypeSerializer typeSer) + throws IOException + { + _generator = gen; + if (value == null) { + _serializeXmlNull(gen); + return; + } + // Let's ensure types are compatible at this point + if ((rootType != null) && !rootType.getRawClass().isAssignableFrom(value.getClass())) { + _reportIncompatibleRootType(value, rootType); + } + final boolean asArray; + final ToXmlGenerator xgen = _asXmlGenerator(gen); + if (xgen == null) { // called by convertValue() + asArray = false; + } else { + QName rootName = _rootNameFromConfig(); + if (rootName == null) { + rootName = _rootNameLookup.findRootName(rootType, _config); + } + _initWithRootName(xgen, rootName); + asArray = TypeUtil.isIndexedType(rootType); + if (asArray) { + _startRootArray(xgen, rootName); + } + } + // 21-May-2020: See comments in `jackson-databind/DefaultSerializerProvider` + if (valueSer == null) { + if ((rootType != null) && rootType.isContainerType()) { + valueSer = findValueSerializer(rootType, null); + } else { + valueSer = findValueSerializer(value.getClass(), null); + } + } + // From super-class implementation + try { + valueSer.serializeWithType(value, gen, this, typeSer); + } catch (Exception e) { // but others do need to be, to get path etc + throw _wrapAsIOE(gen, e); + } + // end of super-class implementation + if (asArray) { + gen.writeEndObject(); + } + } + + protected void _serializeXmlNull(JsonGenerator gen) throws IOException { // 14-Nov-2016, tatu: As per [dataformat-xml#213], we may have explicitly // configured root name... QName rootName = _rootNameFromConfig(); if (rootName == null) { - rootName = ROOT_NAME_FOR_NULL; + rootName = XmlRootNameLookup.ROOT_NAME_FOR_NULL; } - if (jgen instanceof ToXmlGenerator) { - _initWithRootName((ToXmlGenerator) jgen, rootName); + if (gen instanceof ToXmlGenerator) { + _initWithRootName((ToXmlGenerator) gen, rootName); } - super.serializeValue(jgen, null); + super.serializeValue(gen, null); } - + protected void _startRootArray(ToXmlGenerator xgen, QName rootName) throws IOException { xgen.writeStartObject(); @@ -178,10 +235,8 @@ protected void _startRootArray(ToXmlGenerator xgen, QName rootName) throws IOExc protected void _initWithRootName(ToXmlGenerator xgen, QName rootName) throws IOException { - /* 28-Nov-2012, tatu: We should only initialize the root - * name if no name has been set, as per [dataformat-xml#42], - * to allow for custom serializers to work. - */ + // 28-Nov-2012, tatu: We should only initialize the root name if no name has been + // set, as per [dataformat-xml#42], to allow for custom serializers to work. if (!xgen.setNextNameIfMissing(rootName)) { // however, if we are root, we... insist if (xgen.inRoot()) { @@ -219,14 +274,15 @@ protected QName _rootNameFromConfig() protected ToXmlGenerator _asXmlGenerator(JsonGenerator gen) throws JsonMappingException { - // [Issue#71]: When converting, we actually get TokenBuffer, which is fine if (!(gen instanceof ToXmlGenerator)) { - // but verify - if (!(gen instanceof TokenBuffer)) { - throw JsonMappingException.from(gen, - "XmlMapper does not with generators of type other than ToXmlGenerator; got: "+gen.getClass().getName()); + // [dataformat-xml#71]: We sometimes get TokenBuffer, which is fine + if (gen instanceof TokenBuffer) { + return null; } - return null; + // but verify + throw JsonMappingException.from(gen, + "XmlMapper does not work with generators of type other than `ToXmlGenerator`; got: `" + +gen.getClass().getName()+"`"); } return (ToXmlGenerator) gen; } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.java new file mode 100644 index 000000000..9d02e105a --- /dev/null +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/CaseInsensitiveNameSet.java @@ -0,0 +1,46 @@ +package com.fasterxml.jackson.dataformat.xml.util; + +import java.util.*; + +/** + * Helper class for matching element wrappers, possibly in case-insensitive + * manner. + * + * @since 2.12 + */ +public final class CaseInsensitiveNameSet extends AbstractSet +{ + private final Set _namesToMatch; + + private CaseInsensitiveNameSet(Set namesToMatch) { + _namesToMatch = namesToMatch; + } + + public static CaseInsensitiveNameSet construct(Set names0) { + Set namesToMatch = new HashSet(names0); + for (String name : names0) { + namesToMatch.add(name.toLowerCase()); + } + return new CaseInsensitiveNameSet(namesToMatch); + } + + @Override + public boolean contains(Object key0) { + final String key = (String) key0; + if (_namesToMatch.contains(key)) { + return true; + } + final String lc = key.toLowerCase(); + return (lc != key) && _namesToMatch.contains(lc); + } + + @Override + public Iterator iterator() { + return _namesToMatch.iterator(); + } + + @Override + public int size() { + return _namesToMatch.size(); + } +} diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.java index 1be1a89b2..a0c0bbb61 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.java @@ -5,6 +5,7 @@ import java.math.BigInteger; import java.util.Arrays; +import javax.xml.XMLConstants; import javax.xml.stream.XMLStreamException; import org.codehaus.stax2.XMLStreamWriter2; @@ -396,24 +397,26 @@ public void writeLeafElement(XMLStreamWriter2 sw, _justHadStartElement = false; } + // method definition changed in 2.12 @Override public void writeLeafElement(XMLStreamWriter2 sw, - String nsURI, String localName, - byte[] data, int offset, int len) + String nsURI, String localName, + org.codehaus.stax2.typed.Base64Variant base64variant, + byte[] data, int offset, int len) throws XMLStreamException { if (!_objectIndenter.isInline()) { _objectIndenter.writeIndentation(sw, _nesting); } sw.writeStartElement(nsURI, localName); - sw.writeBinary(data, offset, len); + sw.writeBinary(base64variant, data, offset, len); sw.writeEndElement(); _justHadStartElement = false; } @Override public void writeLeafNullElement(XMLStreamWriter2 sw, - String nsURI, String localName) + String nsURI, String localName) throws XMLStreamException { if (!_objectIndenter.isInline()) { @@ -423,6 +426,19 @@ public void writeLeafNullElement(XMLStreamWriter2 sw, _justHadStartElement = false; } + // @since 2.12 + public void writeLeafXsiNilElement(XMLStreamWriter2 sw, + String nsURI, String localName) + throws XMLStreamException + { + if (!_objectIndenter.isInline()) { + _objectIndenter.writeIndentation(sw, _nesting); + } + sw.writeEmptyElement(nsURI, localName); + sw.writeAttribute("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil", "true"); + _justHadStartElement = false; + } + @Override // since 2.7 public void writePrologLinefeed(XMLStreamWriter2 sw) throws XMLStreamException { diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.java index 58ca5f243..1cfc1d0c1 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/StaxUtil.java @@ -1,9 +1,13 @@ package com.fasterxml.jackson.dataformat.xml.util; import java.io.IOException; +import java.util.HashMap; +import java.util.Map; import javax.xml.stream.*; +import com.fasterxml.jackson.core.Base64Variant; +import com.fasterxml.jackson.core.Base64Variants; import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParseException; @@ -109,4 +113,48 @@ public static String sanitizeXmlTypeName(String name) } return sb.toString(); } + + /** + * Helper method used to "convert" Jackson's {@link Base64Variant} into corresponding + * Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well. + * + * @param j64b Jackson base64 variant to find match for + * + * @return Stax2 Base64 variant that most closely resembles Jackson canonical Base64 variant + * passed in as argument + * + * @since 2.12 + */ + public static org.codehaus.stax2.typed.Base64Variant toStax2Base64Variant(Base64Variant j64b) { + return Base64Mapper.instance.map(j64b); + } + + private static class Base64Mapper { + public final static Base64Mapper instance = new Base64Mapper(); + + private final Map j2stax2 + = new HashMap<>(); + { + j2stax2.put(Base64Variants.MIME.getName(), org.codehaus.stax2.typed.Base64Variants.MIME); + j2stax2.put(Base64Variants.MIME_NO_LINEFEEDS.getName(), + org.codehaus.stax2.typed.Base64Variants.MIME_NO_LINEFEEDS); + j2stax2.put(Base64Variants.MODIFIED_FOR_URL.getName(), + org.codehaus.stax2.typed.Base64Variants.MODIFIED_FOR_URL); + j2stax2.put(Base64Variants.PEM.getName(), org.codehaus.stax2.typed.Base64Variants.PEM); + } + + private Base64Mapper() { + } + + public org.codehaus.stax2.typed.Base64Variant map(Base64Variant j64b) { + org.codehaus.stax2.typed.Base64Variant result = j2stax2.get(j64b.getName()); + if (result == null) { + // 13-May-2020, tatu: in unexpected case of no match, default to what Stax2 + // considers default, not Jackson: this for backwards compatibility with + // Jackson 2.11 and earlier + result = org.codehaus.stax2.typed.Base64Variants.getDefaultVariant(); + } + return result; + } + } } diff --git a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.java b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.java index 070cd1b9b..f387455ed 100644 --- a/src/main/java/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.java +++ b/src/main/java/com/fasterxml/jackson/dataformat/xml/util/XmlRootNameLookup.java @@ -18,6 +18,12 @@ public class XmlRootNameLookup { private static final long serialVersionUID = 1L; + /** + * If all we get to serialize is a null, there's no way to figure out + * expected root name; so let's just default to literal {@code "null"}. + */ + public final static QName ROOT_NAME_FOR_NULL = new QName("null"); + /** * For efficient operation, let's try to minimize number of times we * need to introspect root element name to use. @@ -25,12 +31,17 @@ public class XmlRootNameLookup * Note: changed to transient for 2.3; no point in serializing such * state */ - protected final transient LRUMap _rootNames = new LRUMap(40, 200); + protected final transient LRUMap _rootNames; + + public XmlRootNameLookup() { + _rootNames = new LRUMap(40, 200); + } - public XmlRootNameLookup() { } - protected Object readResolve() { // just need to make 100% sure it gets set to non-null, that's all + // 05-Jan-2020, tatu: How is that possibly, you ask? JDK serialization, that's how + // (it by-passes calls to constructors, as well as initializers) + // ... and if you don't believe, try commenting it out and see test failure you get if (_rootNames == null) { return new XmlRootNameLookup(); } @@ -57,9 +68,7 @@ public QName findRootName(Class rootType, MapperConfig config) } return name; } - - // NOTE: needed to be synchronized in 2.6.4, but 2.7.0 adds a proper fix - // for annotation introspection hence not needed any more + protected QName _findRootName(Class rootType, MapperConfig config) { BeanDescription beanDesc = config.introspectClassAnnotations(rootType); @@ -78,19 +87,23 @@ protected QName _findRootName(Class rootType, MapperConfig config) // Should we strip out enclosing class tho? For now, nope: // one caveat: array simple names end with "[]"; also, "$" needs replacing localName = StaxUtil.sanitizeXmlTypeName(rootType.getSimpleName()); - return new QName("", localName); + return _qname(ns, localName); } // Otherwise let's see if there's namespace, too (if we are missing it) - if (ns == null || ns.length() == 0) { - ns = findNamespace(intr, ac); + if (ns == null || ns.isEmpty()) { + ns = _findNamespace(intr, ac); } + return _qname(ns, localName); + } + + private QName _qname(String ns, String localName) { if (ns == null) { // some QName impls barf on nulls... ns = ""; } return new QName(ns, localName); } - private String findNamespace(AnnotationIntrospector ai, AnnotatedClass ann) + private String _findNamespace(AnnotationIntrospector ai, AnnotatedClass ann) { for (AnnotationIntrospector intr : ai.allIntrospectors()) { if (intr instanceof XmlAnnotationIntrospector) { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java index ad0e13508..cd4f6f636 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java @@ -2,16 +2,16 @@ import java.io.*; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider; import com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup; public class MapperCopyTest extends XmlTestBase { - @JacksonXmlRootElement(localName = "AnnotatedName") + @JsonRootName("AnnotatedName") static class Pojo282 { public int a = 3; @@ -73,7 +73,6 @@ public void testMapperSerialization() throws Exception } // [dataformat-xml#282] - @SuppressWarnings("deprecation") public void testCopyWith() throws Exception { XmlMapper xmlMapper = newMapper(); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/XmlTestBase.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/XmlTestBase.java index 06faf6e8f..d8890e7b3 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/XmlTestBase.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/XmlTestBase.java @@ -197,7 +197,7 @@ public String toString() { +" }" +"}" ; - + /* /********************************************************** /* Construction, factory methods @@ -211,7 +211,7 @@ protected XmlTestBase() { protected XmlFactoryBuilder streamFactoryBuilder() { return XmlFactory.builder(); } - + protected static XmlMapper newMapper() { return new XmlMapper(); } @@ -298,8 +298,8 @@ protected void verifyException(Throwable e, String... matches) /********************************************************** */ - protected static String aposToQuotes(String json) { - return json.replace("'", "\""); + protected static String a2q(String content) { + return content.replace("'", "\""); } protected byte[] utf8Bytes(String str) { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CaseInsensitiveDeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CaseInsensitiveDeserTest.java index 87b7c1a2f..06839f6dd 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CaseInsensitiveDeserTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CaseInsensitiveDeserTest.java @@ -1,11 +1,17 @@ package com.fasterxml.jackson.dataformat.xml.deser; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; public class CaseInsensitiveDeserTest extends XmlTestBase { @@ -24,6 +30,44 @@ public InsensitiveCreator(@JsonProperty("value") int v0) { } } + // [dataformat-xml#273] + static class Depots273 + { + public String command; + public String taskId; + + @JacksonXmlElementWrapper(useWrapping = false) + public List element; + + public void setElement(List l) { +//System.err.println("setElement: "+l); + element = l; + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + static class Depot273 + { + @JacksonXmlProperty(isAttribute = true) + public String number; + + @JacksonXmlProperty(isAttribute = true) + public String name; + + // Should not actually be necessary but unless unknown ignored is needed: + @JacksonXmlText + public String text; + + public void setNumber(String n) { +//System.err.println("SetNumber: '"+n+"'"); + number = n; + } + public void setName(String n) { +//System.err.println("setName: '"+n+"'"); + name = n; + } + } + /* /******************************************************** /* Test methods @@ -54,4 +98,22 @@ public void testCaseInsensitive1036() throws Exception verifyException(e, "ErrorCode"); } } + + // [dataformat-xml#273] + public void testCaseInsensitiveComplex() throws Exception + { + final String DOC = +"\n"+ +" \n"+ +" \n"+ +"" + ; + + Depots273 result = INSENSITIVE_MAPPER.readValue(DOC, Depots273.class); + assertNotNull(result); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsGenericTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CoerceFromEmptyStringTest.java similarity index 77% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsGenericTest.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CoerceFromEmptyStringTest.java index e67ca1280..96377db26 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsGenericTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/CoerceFromEmptyStringTest.java @@ -1,30 +1,26 @@ package com.fasterxml.jackson.dataformat.xml.deser; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; +import java.util.List; +import java.util.Map; + import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -// Copied from `com.fasterxml.jackson.databind.deser.filter.` in `jackson-databind` -public class NullConversionsGenericTest extends XmlTestBase +// Note: copied from coercion tests of `jackson-databind` +public class CoerceFromEmptyStringTest extends XmlTestBase { static class PointWrapper { - @JsonSetter(nulls=Nulls.AS_EMPTY) public Point p; } static class GeneralEmpty { - // 09-Feb-2017, tatu: Should only need annotation either for field OR setter, not both: -// @JsonSetter(nulls=Nulls.AS_EMPTY) T value; protected GeneralEmpty() { } public GeneralEmpty(T v) { value = v; } - @JsonSetter(nulls=Nulls.AS_EMPTY) public void setValue(T v) { value = v; } @@ -33,7 +29,6 @@ public void setValue(T v) { } static class NoCtorWrapper { - @JsonSetter(nulls=Nulls.AS_EMPTY) public NoCtorPOJO value; } @@ -70,20 +65,8 @@ public void testNullsToGenericPojo() throws Exception Point p = result.value; assertEquals(0, p.x); assertEquals(0, p.y); - - // and then also failing case with no suitable creator: - try { - /* NoCtorWrapper nogo =*/ MAPPER.readValue(EMPTY_XML, - NoCtorWrapper.class); - fail("Should not pass"); - } catch (JsonMappingException e) { - verifyException(e, "Cannot create empty instance"); - } } - // 04-May-2018, tatu: In theory could be supportable, but wrapping (or not) - // of Collections, other requirements, make it... not that easy. -/* public void testNullsToEmptyCollection() throws Exception { GeneralEmpty> result = MAPPER.readValue(EMPTY_XML, @@ -97,10 +80,7 @@ public void testNullsToEmptyCollection() throws Exception assertNotNull(result2.value); assertEquals(0, result2.value.size()); } - */ - // 04-May-2018, tatu: Maps and XML do not mix well, alas: - /* public void testNullsToEmptyMap() throws Exception { GeneralEmpty> result = MAPPER.readValue(EMPTY_XML, @@ -108,7 +88,6 @@ public void testNullsToEmptyMap() throws Exception assertNotNull(result.value); assertEquals(0, result.value.size()); } - */ public void testNullsToEmptyArrays() throws Exception { @@ -128,7 +107,6 @@ public void testNullsToEmptyArrays() throws Exception new TypeReference>() { }); assertNotNull(result3.value); assertEquals(0, result3.value.length); - GeneralEmpty result4 = MAPPER.readValue(doc, new TypeReference>() { }); assertNotNull(result4.value); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingDelegatingCreator254Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/DelegatingCreator254Test.java similarity index 62% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingDelegatingCreator254Test.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/deser/DelegatingCreator254Test.java index 2eeb6e0f0..63f472d4e 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingDelegatingCreator254Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/DelegatingCreator254Test.java @@ -1,10 +1,10 @@ -package com.fasterxml.jackson.dataformat.xml.failing; +package com.fasterxml.jackson.dataformat.xml.deser; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -public class FailingDelegatingCreator254Test extends XmlTestBase +public class DelegatingCreator254Test extends XmlTestBase { static class Foo { public Bar bar; @@ -27,12 +27,15 @@ public Bar(int i) { private final XmlMapper MAPPER = new XmlMapper(); - public void testIntList() throws Exception + // [dataformat-xml#254]: Coercion needed for int-taking creator (as XML can + // not natively detect scalars other than Strings) + public void testIntDelegatingCreator() throws Exception { Foo foo = MAPPER.readValue( "\n" + -" 28\n" + +" 28 \n" + "", Foo.class); - assertEquals(Integer.valueOf(28), foo.bar); + assertNotNull(foo.bar); + assertEquals(Integer.valueOf(28), foo.bar.value); } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/ElementWithScalarAndAttr412Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/ElementWithScalarAndAttr412Test.java new file mode 100644 index 000000000..7514ff354 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/ElementWithScalarAndAttr412Test.java @@ -0,0 +1,216 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import java.net.URI; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +public class ElementWithScalarAndAttr412Test extends XmlTestBase +{ + @JsonRootName("container") + static class Bean412 { + @JacksonXmlProperty(localName = "values") + @JacksonXmlElementWrapper(useWrapping = false) + List v; + } + + @JsonRootName("tagged") + static class TaggedInt412 { + @JacksonXmlProperty + public int id; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedBoolean412 { + @JacksonXmlProperty + public Boolean truthy; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedBooleanPrim412 { + @JacksonXmlProperty + public boolean truthy; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedDouble412 { + @JacksonXmlProperty + public Double value; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedDoublePrim412 { + @JacksonXmlProperty + public double value; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedString412 { + @JacksonXmlProperty + public String name; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedURI412 { + @JacksonXmlProperty + public URI location; + + @JacksonXmlProperty + public int count; + } + + @JsonRootName("tagged") + static class TaggedDate412 { + @JacksonXmlProperty + public Date time; + + @JacksonXmlProperty + public int count; + } + + /* + /********************************************************** + /* Test methods, main tests + /********************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#412] + public void testIntFromElemAndAttrInList() throws Exception + { + String XML = "\n" + + " \n" + + " 2812\n" + + " 15\n" + + " \n" + + " \n" + + " 42\n" + + " \n" + + " 1235\n" + + " \n" + + " \n" + + ""; + Bean412 many = MAPPER.readValue(XML, Bean412.class); + assertNotNull(many.v); +//System.err.println("XML:\n"+MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(many)); + assertEquals(2, many.v.size()); + assertEquals(2812, many.v.get(0).id); + assertEquals(15, many.v.get(0).count); + assertEquals(1235, many.v.get(1).id); + assertEquals(42, many.v.get(1).count); + } + + public void testIntFromElemAndAttr() throws Exception + { + TaggedInt412 result; + String XML = "\n" + + " 2812\n" + + " 15\n" + + ""; + result = MAPPER.readValue(XML, TaggedInt412.class); + assertEquals(2812, result.id); + assertEquals(15, result.count); + + XML = " \n" + + " 42\n" + + " 1235\n" + + " \n"; + + result = MAPPER.readValue(XML, TaggedInt412.class); + assertEquals(1235, result.id); + assertEquals(42, result.count); + } + + /* + /********************************************************** + /* Test methods, simpler for other types + /********************************************************** + */ + + public void testBooleanFromElemAndAttr() throws Exception + { + final String XML = "true3"; + { + TaggedBoolean412 result = MAPPER.readValue(XML, TaggedBoolean412.class); + assertEquals(Boolean.TRUE, result.truthy); + assertEquals(3, result.count); + } + { + TaggedBooleanPrim412 result = MAPPER.readValue(XML, TaggedBooleanPrim412.class); + assertTrue(result.truthy); + assertEquals(3, result.count); + } + } + + public void testDoubleFromElemAndAttr() throws Exception + { + final String XML = "28 0.25 "; + { + TaggedDouble412 result = MAPPER.readValue(XML, TaggedDouble412.class); + assertEquals(Double.valueOf(0.25), result.value); + assertEquals(28, result.count); + } + + { + TaggedDoublePrim412 result = MAPPER.readValue(XML, TaggedDoublePrim412.class); + assertEquals(0.25, result.value); + assertEquals(28, result.count); + } + } + + public void testStringFromElemAndAttr() throws Exception + { + TaggedString412 result = MAPPER.readValue( + "Poobah7", + TaggedString412.class); + assertEquals("Poobah", result.name); + assertEquals(7, result.count); + } + + public void testURIFromElemAndAttr() throws Exception + { + TaggedURI412 result = MAPPER.readValue( + "\n" + +" http://foo.bar\n" + +"11", + TaggedURI412.class); + assertEquals(URI.create("http://foo.bar"), result.location); + assertEquals(11, result.count); + } + + public void testDateFromElemAndAttr() throws Exception + { + TaggedDate412 result = MAPPER.readValue( + "11", + TaggedDate412.class); + assertNotNull(result.time); + assertEquals(11, result.count); + } +} + diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyBeanDeser318Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyBeanDeser318Test.java similarity index 83% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyBeanDeser318Test.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyBeanDeser318Test.java index cd01b17fc..28392f815 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyBeanDeser318Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyBeanDeser318Test.java @@ -1,6 +1,5 @@ -package com.fasterxml.jackson.dataformat.xml.failing; +package com.fasterxml.jackson.dataformat.xml.deser; -import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -43,7 +42,8 @@ public void testEmptyString() throws Exception { Wrapper value = MAPPER.readValue(s, Wrapper.class); assertEquals("id", value.id); - assertNull(value.nested); + assertNotNull(value.nested); + assertNull(value.nested.nested2); } public void testBlankString() throws Exception { @@ -57,7 +57,8 @@ public void testBlankString() throws Exception { // Cannot construct instance of `JacksonXMLTest$Nested` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (' ') Wrapper value = MAPPER.readValue(s, Wrapper.class); assertEquals("id", value.id); - assertNull(value.nested); + assertNotNull(value.nested); + assertNull(value.nested.nested2); } public void testBlankString2() throws Exception { @@ -66,14 +67,11 @@ public void testBlankString2() throws Exception { + " " + ""; - // This fails with the following exception: - // com.fasterxml.jackson.databind.exc.MismatchedInputException: - // Cannot construct instance of `JacksonXMLTest$Nested` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (' ') Wrapper value = MAPPER.readerFor(Wrapper.class) - .with(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT) .readValue(s); assertEquals("id", value.id); - assertNull(value.nested); + assertNotNull(value.nested); + assertNull(value.nested.nested2); } public void testMissing() throws Exception { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyStringValueTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyStringValueTest.java index 59e811fd8..d139962a9 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyStringValueTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyStringValueTest.java @@ -3,8 +3,11 @@ import java.util.ArrayList; import java.util.List; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; public class EmptyStringValueTest extends XmlTestBase { @@ -23,13 +26,35 @@ static class Names { public List names = new ArrayList(); } + // [dataformat-xml#25] + static class EmptyStrings25 + { + @JacksonXmlProperty(isAttribute=true) + public String a = "NOT SET"; + public String b = "NOT SET"; + } + + // [dataformat-xml#427] + static class Stuff427 { + String str; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public Stuff427(String s) { str = s; } + } + + static class Product427 { + Stuff427 stuff; + + public Product427(@JsonProperty("stuff") Stuff427 s) { stuff = s; } + } + /* /********************************************************** /* Test methods /********************************************************** */ - private final XmlMapper MAPPER = new XmlMapper(); + private final XmlMapper MAPPER = newMapper(); public void testEmptyString162() throws Exception { @@ -43,18 +68,20 @@ public void testEmptyString162() throws Exception public void testEmptyElement() throws Exception { final String XML = ""; - // Default settings: empty element becomes `null`: + + // Default settings (since 2.12): empty element does NOT become `null`: Name name = MAPPER.readValue(XML, Name.class); assertNotNull(name); - assertNull(name.first); + assertEquals("", name.first); assertEquals("", name.last); // but can be changed - XmlMapper mapper2 = new XmlMapper(); - mapper2.disable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL); + XmlMapper mapper2 = XmlMapper.builder() + .enable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .build(); name = mapper2.readValue(XML, Name.class); assertNotNull(name); - assertEquals("", name.first); + assertNull(name.first); assertEquals("", name.last); } @@ -68,4 +95,26 @@ public void testEmptyStringElement() throws Exception assertEquals("", bean.text); // assertNull(bean.text); } + + // [dataformat-xml#25] + public void testEmptyStringFromElemAndAttr() throws Exception + { + EmptyStrings25 ob = MAPPER.readValue("", + EmptyStrings25.class); + assertNotNull(ob); + assertEquals("", ob.a); + assertEquals("", ob.b); + } + + // [dataformat-xml#427] + public void testEmptyIssue427() throws Exception + { + String xml = ""; + + Product427 product = MAPPER.readValue(xml, Product427.class); + + assertNotNull(product); + assertNotNull(product.stuff); + assertEquals("", product.stuff.str); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestEnums.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EnumDeserTest.java similarity index 65% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestEnums.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EnumDeserTest.java index 0c148fe48..c4181fc8f 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestEnums.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EnumDeserTest.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.dataformat.xml.*; -public class TestEnums extends XmlTestBase +public class EnumDeserTest extends XmlTestBase { static enum TestEnum { A, B, C; } @@ -21,12 +21,21 @@ public EnumBean() { } */ private final XmlMapper MAPPER = new XmlMapper(); - - public void testEnum() throws Exception + + public void testEnumInBean() throws Exception { String xml = MAPPER.writeValueAsString(new EnumBean(TestEnum.B)); EnumBean result = MAPPER.readValue(xml, EnumBean.class); assertNotNull(result); assertEquals(TestEnum.B, result.value); } + + // [dataformat-xml#121] + public void testRootEnum() throws Exception + { + String xml = MAPPER.writeValueAsString(TestEnum.B); + TestEnum result = MAPPER.readValue(xml, TestEnum.class); + assertNotNull(result); + assertEquals(TestEnum.B, result); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/Issue274PropertyNameTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/Issue274PropertyNameTest.java index dfc28c799..6c07c0b6f 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/Issue274PropertyNameTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/Issue274PropertyNameTest.java @@ -1,10 +1,10 @@ package com.fasterxml.jackson.dataformat.xml.deser; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; // [dataformat-xml#274]: Actually passes... can not reproduce failure public class Issue274PropertyNameTest extends XmlTestBase @@ -30,7 +30,7 @@ public void setEventId(String eventId) { } } - @JacksonXmlRootElement(localName = "dataroot") + @JsonRootName("dataroot") static class RootObject { @JacksonXmlProperty(localName = "Event") Event event; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NonNamespaceAwareDeser422Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NonNamespaceAwareDeser422Test.java new file mode 100644 index 000000000..a90442639 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NonNamespaceAwareDeser422Test.java @@ -0,0 +1,132 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import java.util.List; + +import javax.xml.stream.XMLInputFactory; + +import com.ctc.wstx.stax.WstxInputFactory; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import com.fasterxml.jackson.dataformat.xml.XmlFactory; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +// [dataformat-xml#422] +public class NonNamespaceAwareDeser422Test extends XmlTestBase +{ + // [dataformat-xml#422] + @JsonIgnoreProperties(ignoreUnknown = true) // to skip `xmlns` + static class RssDocument422 { + public RssChannel channel; + } + + @JsonIgnoreProperties(ignoreUnknown = true) // to skip `xmlns` + static class RssChannel { + public String title; + public String description; + @JacksonXmlProperty(localName = "link") + public String siteUrl; + @JacksonXmlProperty(localName = "lastBuildDate") + public String updated; + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "item") + public List items; + } + + @JsonIgnoreProperties({ "category" }) + static class RssItem { + @JacksonXmlProperty(localName = "guid") + public String localId; + @JacksonXmlProperty(localName = "pubDate") + public String updated; + public String title; + @JacksonXmlProperty(localName = "link") + public String articleUrl; + @JacksonXmlProperty(localName = "dc:creator") + public String author; + @JacksonXmlProperty(localName = "content:encoded") + public String encodedContent; + @JacksonXmlProperty(localName = "description") + public String content; + } + + public void testBigDocIssue422() throws Exception + { + final XMLInputFactory xmlInputFactory = new WstxInputFactory(); + xmlInputFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false); + final XmlMapper xmlMapper = XmlMapper.builder(XmlFactory.builder() + .inputFactory(xmlInputFactory) + .build()).build(); + + final String XML = +"\n" + +"\n" + +" \n" + +" Ars Technica\n" + +" https://arstechnica.com\n" + +" Serving the Technologist for more than a decade. IT news, reviews, and analysis.\n" + +" Sun, 23 Aug 2020 23:48:25 +0000\n" + +" en-US\n" + +" hourly\n" + +" 1\n" + +" https://wordpress.org/?v=4.9.15\n" + +" \n" + +" https://cdn.arstechnica.net/wp-content/uploads/2016/10/cropped-ars-logo-512_480-32x32.png\n" + +" Ars Technica\n" + +" https://arstechnica.com\n" + +" 32\n" + +" 32\n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" Trump announces a COVID-19 Emergency Use Authorization for blood plasma\n" + +" https://arstechnica.com/?p=1700815\n" + +" Sun, 23 Aug 2020 23:26:43 +0000\n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +" https://arstechnica.com/?p=1700815\n" + +" \n" + +" \n" + +"
\"Image

Enlarge / Donald Trump gestures to Stephen Hahn, head of the FDA, at an earlier press conference. (credit: Drew Angerer)

\n" + +"

Today, President Trump held a news conference to announce that the FDA has granted an Emergency Use Authorization for the treatment of COVID-19 cases using blood plasma from those formerly infected. The move comes despite significant uncertainty regarding just how effective this treatment is, and comes just days after Trump attacked the FDA for delaying its work as part of a plot to sabotage his re-election.

\n" + +"

In the blood

\n" + +"

Plasma is the liquid portion of the blood, which (among other things) contains antibodies. It has been used to treat other infections, as some antibodies can be capable of neutralizing the infecting pathogen—binding to the bacteria or virus in a way that prevents it from entering cells. Early studies have indicated that it's relatively common for those who have had a SARS-CoV-2 infection to generate antibodies that can neutralize the virus in lab tests, although the antibody response to the virus is also highly variable.

\n" + +"

In the absence of any effective treatments, people started testing this \"convalescent plasma\" as early as March, and testing has been expanded as the pool of post-infected individuals has continued to grow. But so far, the evidence has been mixed. One of the largest studies, led by researchers at the Mayo Clinic and including over 35,000 patients, did see an effect, but it was a very mild one: mortality dropped from 11.9 percent in people who received plasma four days or more after starting treatment, compared with 8.7 percent if treatment was started earlier than that. But, critically, the study lacked a control group, leaving its authors talking about \"signatures of efficacy,\" rather than actual evidence of efficacy.

Read 7 remaining paragraphs | Comments

\n" + +" \n" + +"
]]>
\n" + +"
\n" + +"
\n" + +"
"; + + final RssDocument422 doc = xmlMapper.readerFor(RssDocument422.class) + .readValue(XML); + assertNotNull(doc); + RssChannel channel = doc.channel; + assertNotNull(channel); + assertEquals("https://arstechnica.com", channel.siteUrl); + List items = channel.items; + assertNotNull(items); + assertEquals(1, items.size()); + RssItem item = items.get(0); + assertTrue(item.encodedContent.contains("

In the blood

")); + + // for debugging: +/* System.err.println("XML:\n"+xmlMapper + .writerWithDefaultPrettyPrinter() + .writeValueAsString(doc)); + */ + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsSkipTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsSkipTest.java index e6c0a6ee8..318d2addd 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsSkipTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NullConversionsSkipTest.java @@ -44,12 +44,14 @@ public void setValue(String v) { /********************************************************** */ - private final XmlMapper MAPPER = newMapper(); + private final XmlMapper NULL_EXPOSING_MAPPER = mapperBuilder() + .enable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .build(); public void testSkipNullField1() throws Exception { // first, ok if assigning non-null to not-nullable, null for nullable - NullSkipField result = MAPPER.readValue( + NullSkipField result = NULL_EXPOSING_MAPPER.readValue( //"foo", "foo", NullSkipField.class); @@ -60,7 +62,7 @@ public void testSkipNullField1() throws Exception public void testSkipNullField2() throws Exception { // and then see that nulls are not ok for non-nullable - NullSkipField result = MAPPER.readValue("", + NullSkipField result = NULL_EXPOSING_MAPPER.readValue("", NullSkipField.class); assertEquals("b", result.noNulls); assertEquals("a", result.nullsOk); @@ -68,7 +70,7 @@ public void testSkipNullField2() throws Exception public void testSkipNullMethod1() throws Exception { - NullSkipMethod result = MAPPER.readValue( + NullSkipMethod result = NULL_EXPOSING_MAPPER.readValue( //"foo", "foo", NullSkipMethod.class); @@ -78,7 +80,7 @@ public void testSkipNullMethod1() throws Exception public void testSkipNullMethod2() throws Exception { - NullSkipMethod result = MAPPER.readValue("", + NullSkipMethod result = NULL_EXPOSING_MAPPER.readValue("", NullSkipMethod.class); assertEquals("b", result._noNulls); assertEquals("a", result._nullsOk); @@ -94,10 +96,12 @@ public void testSkipNullWithDefaults() throws Exception { // String doc = ""; String doc = ""; - StringValue result = MAPPER.readValue(doc, StringValue.class); + StringValue result = NULL_EXPOSING_MAPPER.readValue(doc, StringValue.class); assertNull(result.value); - ObjectMapper mapper = newMapper(); + ObjectMapper mapper = mapperBuilder() + .enable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .build(); mapper.configOverride(String.class) .setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.SKIP)); result = mapper.readValue(doc, StringValue.class); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NumberDeserWithXMLTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NumberDeserWithXMLTest.java new file mode 100644 index 000000000..bf5e2f9d0 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/NumberDeserWithXMLTest.java @@ -0,0 +1,88 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonUnwrapped; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// Tests copied from databind "JDKNumberDeserTest" (only a small subset) +public class NumberDeserWithXMLTest extends XmlTestBase +{ + // [databind#2644] + @JsonRootName("Root") + static class NodeRoot2644 { + public String type; + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type") + @JsonSubTypes(value = { + @JsonSubTypes.Type(value = NodeParent2644.class, name = "NodeParent") + }) + public Node2644 node; + } + + public static class NodeParent2644 extends Node2644 { } + + public static abstract class Node2644 { + @JsonProperty("amount") + BigDecimal val; + + public BigDecimal getVal() { + return val; + } + + public void setVal(BigDecimal val) { + this.val = val; + } + } + + // [databind#2784] + static class BigDecimalHolder2784 { + public BigDecimal value; + } + + @JsonRootName("Nested") + static class NestedBigDecimalHolder2784 { + @JsonUnwrapped + public BigDecimalHolder2784 holder; + } + + /* + /********************************************************************** + /* Test methods + /********************************************************************** + */ + + private final XmlMapper MAPPER = newMapper(); + + // [databind#2644] + public void testBigDecimalSubtypes() throws Exception + { + ObjectMapper mapper = mapperBuilder() + .registerSubtypes(NodeParent2644.class) + .build(); + NodeRoot2644 root = mapper.readValue("\n" + +"NodeParent" + +"9999999999999999.99\n" + +"\n", + NodeRoot2644.class + ); + + assertEquals(new BigDecimal("9999999999999999.99"), root.node.getVal()); + } + + // [databind#2784] + public void testBigDecimalUnwrapped() throws Exception + { + // mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); + final String DOC = "5.00"; + NestedBigDecimalHolder2784 result = MAPPER.readValue(DOC, NestedBigDecimalHolder2784.class); + assertEquals(new BigDecimal("5.00"), result.holder.value); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/RootValueDeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/RootValueDeserTest.java new file mode 100644 index 000000000..32135e344 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/RootValueDeserTest.java @@ -0,0 +1,38 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import java.math.BigInteger; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// New tests (2.12) for root-level values +public class RootValueDeserTest extends XmlTestBase +{ + private final XmlMapper MAPPER = newMapper(); + + /* + /********************************************************** + /* Test methods, scalars + /********************************************************** + */ + + public void testNumbers() throws Exception + { + _testScalar(Integer.valueOf(42), "42"); + _testScalar(Long.valueOf(-137L), "-137"); + _testScalar(Double.valueOf(0.25), "0.25"); + _testScalar(BigInteger.valueOf(31337), "31337"); + } + + private void _testScalar(Object input, String exp) throws Exception { + _testScalar(input, input.getClass(), exp); + } + + private void _testScalar(Object input, Class type, String exp) throws Exception + { + String xml = MAPPER.writeValueAsString(input).trim(); + assertEquals(exp, xml); + Object result = MAPPER.readValue(xml, input.getClass()); + assertEquals(input, result); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/SimpleStringValuesTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/SimpleStringValuesTest.java index ce2a9cff3..37f60f1e2 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/SimpleStringValuesTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/SimpleStringValuesTest.java @@ -37,13 +37,15 @@ public void testSimpleStringElement() throws Exception assertEquals("text!", bean.text); } + // 03-Jul-2020, tatu: This is actually not a good test starting with 2.12 as + // empty String can be used in two different ways... behavior change b/w 2.11 + // and 2.12; 2.11 would lead to coercion from empty Object into default-ctor + // build Bean, but with gets empty String, passed via String-creator. public void testMissingString() throws Exception { - StringBean baseline = new StringBean(); - // then missing StringBean bean = MAPPER.readValue("", StringBean.class); assertNotNull(bean); - assertEquals(baseline.text, bean.text); + assertEquals("", bean.text); } /* diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestDeserialization.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestDeserialization.java index b6cc7a7e6..f25dd2c16 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestDeserialization.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/TestDeserialization.java @@ -2,6 +2,7 @@ import java.util.*; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -21,14 +22,32 @@ static class Optional { public String type = "NOT SET"; } + // [dataformat-xml#219] + static class Worker219 + { + @JacksonXmlProperty(localName = "developer") + String developer; + @JacksonXmlProperty(localName = "tester") + String tester; + @JacksonXmlProperty(localName = "manager") + String manager; + } + + // [dataformat-xml#219] + @JsonRootName("line") + static class Line219 { + public String code; //This should ideally be complex type + public String amount; + } + /* /********************************************************** /* Unit tests /********************************************************** */ - private final XmlMapper MAPPER = new XmlMapper(); - + private final XmlMapper MAPPER = newMapper(); + /** * Unit test to ensure that we can successfully also round trip * example Bean used in Jackson tutorial @@ -49,7 +68,7 @@ public void testFromAttribute() throws Exception assertEquals("abc", bean.text); } - // [Issue#14] + // [dataformat-xml#14] public void testMapWithAttr() throws Exception { final String xml = "John Smith"; @@ -68,7 +87,7 @@ public void testMapWithAttr() throws Exception assertNotNull(map); } - // // Tests for [Issue#64] + // // Tests for [dataformat-xml#64] public void testOptionalAttr() throws Exception { @@ -79,6 +98,10 @@ public void testOptionalAttr() throws Exception assertEquals("work", ob.type); } + // 03-Jul-2020, tatu: Due to change on deserialization of root-level scalars, + // this test that passed on 2.11 is no longer valid (it wasn't even before + // wrt compatibility of serialization) + /* public void testMissingOptionalAttr() throws Exception { Optional ob = MAPPER.readValue("123-456-7890", @@ -87,4 +110,34 @@ public void testMissingOptionalAttr() throws Exception assertEquals("123-456-7890", ob.number); assertEquals("NOT SET", ob.type); } + */ + + // [dataformat-xml#219] + public void testWithAttribute219Worker() throws Exception + { + final String DOC = +"\n" + +" test1\n" + +" test2\n" + +" test3\n" + +"" + ; + Worker219 result = MAPPER.readValue(DOC, Worker219.class); + assertNotNull(result); + assertEquals("test3", result.manager); + } + + // [dataformat-xml#219] + public void testWithAttribute219Line() throws Exception + { + final String DOC = +"\n" + +" qsd\n" + +" 138\n" + +"" + ; + Line219 result = MAPPER.readValue(DOC, Line219.class); + assertNotNull(result); + assertEquals("138", result.amount); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/UntypedObjectDeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/UntypedObjectDeserTest.java new file mode 100644 index 000000000..47e784da2 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/UntypedObjectDeserTest.java @@ -0,0 +1,84 @@ +package com.fasterxml.jackson.dataformat.xml.deser; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class UntypedObjectDeserTest extends XmlTestBase +{ + private final ObjectMapper XML_MAPPER = newMapper(); + + // for [dataformat-xml#205], handling "untyped" ({@code java.lang.Object}-targeted) + // deserialization, including handling of element sequences + public void testRepeatingElements() throws Exception + { + final String XML = + "\n" + + " John\n" + + " Jose\n" + + " Maria\n" + + " \n" + + " 3\n" + + " \n" + + " Spike\n" + + " 12\n" + + " \n" + + " \n" + + " Brutus\n" + + " 9\n" + + " \n" + + " \n" + + " Bob\n" + + " 14\n" + + " \n" + + " \n" + + ""; + final JsonNode fromXml = XML_MAPPER.valueToTree(XML_MAPPER.readValue(XML, Object.class)); + final ObjectNode exp = XML_MAPPER.createObjectNode(); + exp.put("name", "John"); + { + exp.putArray("parent") + .add("Jose") + .add("Maria"); + ArrayNode dogs = exp.putObject("dogs") + .put("count", "3") + .putArray("dog"); + dogs.addObject() + .put("name", "Spike") + .put("age", "12"); + dogs.addObject() + .put("name", "Brutus") + .put("age", "9"); + dogs.addObject() + .put("name", "Bob") + .put("age", "14"); + } + if (!fromXml.equals(exp)) { + ObjectWriter w = new JsonMapper().writerWithDefaultPrettyPrinter(); + fail("Expected:\n"+w.writeValueAsString(exp)+"\ngot:\n"+w.writeValueAsString(fromXml)); + } + } + + // [dataformat-xml#405]: support mixed content + public void testMixedContent() throws Exception + { + final String XML = "first123secondabclast"; + final JsonNode fromXml = XML_MAPPER.valueToTree(XML_MAPPER.readValue(XML, Object.class)); + final ObjectNode exp = XML_MAPPER.createObjectNode(); + exp.putArray("") + .add("first") + .add("second") + .add("last"); + exp.put("a", "123"); + exp.put("b", "abc"); + + if (!fromXml.equals(exp)) { + ObjectWriter w = new JsonMapper().writerWithDefaultPrettyPrinter(); + fail("Expected:\n"+w.writeValueAsString(exp)+"\ngot:\n"+w.writeValueAsString(fromXml)); + } + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/builder/BuilderWithXmlText345Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/builder/BuilderWithXmlText345Test.java new file mode 100644 index 000000000..710a0b9ee --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/builder/BuilderWithXmlText345Test.java @@ -0,0 +1,87 @@ +package com.fasterxml.jackson.dataformat.xml.deser.builder; + +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; + +public class BuilderWithXmlText345Test extends XmlTestBase +{ + @JsonRootName("example") + @JsonDeserialize(builder = Example345.ExampleBuilder.class) + public static class Example345 { + String name; + + String value; + + public Example345(String name, String value) { + this.name = name; + this.value = value; + } + + public static ExampleBuilder builder() { + return new ExampleBuilder(); + } + + @JacksonXmlProperty(isAttribute = true) + public String getName() { + return name; + } + + @JacksonXmlText + public String getValue() { + return value; + } + + @JsonPOJOBuilder(withPrefix = "") + public static class ExampleBuilder { + private String name; + private String value; + + public Example345 build() { + return new Example345(name, value); + } + + public ExampleBuilder name(String name) { + this.name = name; + return this; + } + + @JacksonXmlText + public ExampleBuilder value(String value) { + this.value = value; + return this; + } + } + } + + /* + /********************************************************************** + /* Test methods + /********************************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#345] + public void testXmlTextViaBuilder345() throws Exception + { + Example345 in = Example345.builder() + .name("name") + .value("value") + .build(); + + String xml = MAPPER.writeValueAsString(in); + Example345 out = MAPPER.readValue(xml, Example345.class); + + assertEquals(in.getName(), out.getName()); + assertEquals(in.getValue(), out.getValue()); + assertEquals( + "value", + xml + ); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceStringToIntsTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceStringToIntsTest.java new file mode 100644 index 000000000..0045833f8 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceStringToIntsTest.java @@ -0,0 +1,177 @@ +package com.fasterxml.jackson.dataformat.xml.deser.convert; + +import java.math.BigInteger; +import java.util.concurrent.atomic.AtomicLong; + +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.cfg.CoercionAction; +import com.fasterxml.jackson.databind.cfg.CoercionInputShape; +import com.fasterxml.jackson.databind.type.LogicalType; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// 2020-12-18, tatu: Modified from "jackson-databind" version: XML +// backend MUST NOT prevent coercion from String since XML has no +// native number representation (although TBH JsonParser.isExpectedNumberInt() +// can work around that in many cases) +public class CoerceStringToIntsTest + extends XmlTestBase +{ + private final ObjectMapper DEFAULT_MAPPER = newMapper(); + private final ObjectMapper MAPPER_LEGACY_FAIL = mapperBuilder() + .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + .build(); + + private final ObjectMapper MAPPER_TO_EMPTY; { + MAPPER_TO_EMPTY = newMapper(); + MAPPER_TO_EMPTY.coercionConfigFor(LogicalType.Integer) + .setCoercion(CoercionInputShape.String, CoercionAction.AsEmpty); + } + + private final ObjectMapper MAPPER_TRY_CONVERT; { + MAPPER_TRY_CONVERT = newMapper(); + MAPPER_TRY_CONVERT.coercionConfigFor(LogicalType.Integer) + .setCoercion(CoercionInputShape.String, CoercionAction.TryConvert); + } + + private final ObjectMapper MAPPER_TO_NULL; { + MAPPER_TO_NULL = newMapper(); + MAPPER_TO_NULL.coercionConfigFor(LogicalType.Integer) + .setCoercion(CoercionInputShape.String, CoercionAction.AsNull); + } + + private final ObjectMapper MAPPER_TO_FAIL; { + MAPPER_TO_FAIL = newMapper(); + MAPPER_TO_FAIL.coercionConfigFor(LogicalType.Integer) + .setCoercion(CoercionInputShape.String, CoercionAction.Fail); + } + + protected static class BooleanWrapper { + public Boolean b; + + public BooleanWrapper() { } + public BooleanWrapper(Boolean value) { b = value; } + } + + protected static class IntWrapper { + public int i; + + public IntWrapper() { } + public IntWrapper(int value) { i = value; } + } + + protected static class LongWrapper { + public long l; + + public LongWrapper() { } + public LongWrapper(long value) { l = value; } + } + + protected static class DoubleWrapper { + public double d; + + public DoubleWrapper() { } + public DoubleWrapper(double value) { d = value; } + } + + /* + /******************************************************** + /* Test methods, legacy setting + /******************************************************** + */ + + // Works by default (as per databind defaulting); but also works + // even if seemingly prevented -- this because XML has no native + // number type and Strings present all scalar values, essentially + + public void testDefaultStringToIntCoercion() throws Exception { + _verifyLegacyFromStringSucceeds(DEFAULT_MAPPER); + } + + public void testLegacyFailStringToInt() throws Exception { + _verifyLegacyFromStringSucceeds(MAPPER_LEGACY_FAIL); + } + + private void _verifyLegacyFromStringSucceeds(ObjectMapper mapper) throws Exception + { + // by default, should be ok + Integer I = DEFAULT_MAPPER.readValue("28", Integer.class); + assertEquals(28, I.intValue()); + { + IntWrapper w = DEFAULT_MAPPER.readValue("37", + IntWrapper.class); + assertEquals(37, w.i); + } + + Long L = DEFAULT_MAPPER.readValue("39", Long.class); + assertEquals(39L, L.longValue()); + { + LongWrapper w = DEFAULT_MAPPER.readValue("-13", + LongWrapper.class); + assertEquals(-13L, w.l); + } + + Short S = DEFAULT_MAPPER.readValue("42", Short.class); + assertEquals(42, S.intValue()); + + BigInteger biggie = DEFAULT_MAPPER.readValue("95007", BigInteger.class); + assertEquals(95007, biggie.intValue()); + + AtomicLong atom = DEFAULT_MAPPER.readValue("25236", AtomicLong.class); + assertEquals(25236L, atom.get()); + } + + /* + /******************************************************** + /* Test methods, CoerceConfig, integers-from-String + /******************************************************** + */ + + // When explicitly enabled, should pass + + public void testCoerceConfigStringToNull() throws Exception { + _verifyCoercionFromStringSucceeds(MAPPER_TO_NULL); + } + + // But even if blocked, or changed to null, should pass since with + // XML, "String" is a native representation of numbers + + public void testCoerceConfigStringToEmpty() throws Exception { + _verifyCoercionFromStringSucceeds(MAPPER_TO_EMPTY); + } + + public void testCoerceConfigStringConvert() throws Exception { + _verifyCoercionFromStringSucceeds(MAPPER_TRY_CONVERT); + } + + public void testCoerceConfigFailFromString() throws Exception { + _verifyCoercionFromStringSucceeds(MAPPER_TO_FAIL); + } + + private void _verifyCoercionFromStringSucceeds(ObjectMapper mapper) throws Exception + { + assertEquals(Integer.valueOf(12), mapper.readValue("12", Integer.class)); + assertEquals(Integer.valueOf(34), mapper.readValue("34", Integer.TYPE)); + { + IntWrapper w = mapper.readValue( "", IntWrapper.class); + assertEquals(-225, w.i); + } + + assertEquals(Long.valueOf(34), mapper.readValue("34", Long.class)); + assertEquals(Long.valueOf(534), mapper.readValue("534", Long.TYPE)); + { + LongWrapper w = mapper.readValue("-225", + LongWrapper.class); + assertEquals(-225L, w.l); + } + + assertEquals(Short.valueOf((short)12), mapper.readValue("12", Short.class)); + assertEquals(Short.valueOf((short) 344), mapper.readValue("344", Short.TYPE)); + + assertEquals(Byte.valueOf((byte)12), mapper.readValue("12", Byte.class)); + assertEquals(Byte.valueOf((byte) -99), mapper.readValue("-99", Byte.TYPE)); + + assertEquals(BigInteger.valueOf(1242L), + mapper.readValue("1242", BigInteger.class)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceToBooleanTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceToBooleanTest.java new file mode 100644 index 000000000..cdd446ead --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/convert/CoerceToBooleanTest.java @@ -0,0 +1,127 @@ +package com.fasterxml.jackson.dataformat.xml.deser.convert; + +import java.io.IOException; +import java.util.concurrent.atomic.AtomicBoolean; + +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.cfg.CoercionAction; +import com.fasterxml.jackson.databind.cfg.CoercionInputShape; +import com.fasterxml.jackson.databind.type.LogicalType; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// 2020-12-18, tatu: Modified from "jackson-databind" version: XML +// backend MUST NOT prevent coercion from String since XML has no +// native boolean representation +public class CoerceToBooleanTest + extends XmlTestBase +{ + static class BooleanPOJO { + public boolean value; + + public void setValue(boolean v) { value = v; } + } + + private final ObjectMapper DEFAULT_MAPPER = newMapper(); + + private final ObjectMapper MAPPER_STRING_TO_BOOLEAN_FAIL; { + MAPPER_STRING_TO_BOOLEAN_FAIL = newMapper(); + MAPPER_STRING_TO_BOOLEAN_FAIL.coercionConfigFor(LogicalType.Boolean) + .setCoercion(CoercionInputShape.String, CoercionAction.Fail); + } + + private final ObjectMapper MAPPER_EMPTY_TO_BOOLEAN_FAIL; { + MAPPER_EMPTY_TO_BOOLEAN_FAIL = newMapper(); + MAPPER_EMPTY_TO_BOOLEAN_FAIL.coercionConfigFor(LogicalType.Boolean) + .setCoercion(CoercionInputShape.EmptyString, CoercionAction.Fail); + } + + /* + /********************************************************** + /* Test methods: default, legacy configuration, from String + /********************************************************** + */ + + // for [databind#403] + public void testEmptyStringFailForBooleanPrimitive() throws IOException + { + final ObjectReader reader = MAPPER_EMPTY_TO_BOOLEAN_FAIL + .readerFor(BooleanPOJO.class); + try { + reader.readValue(""); + fail("Expected failure for boolean + empty String"); + } catch (JsonMappingException e) { + verifyException(e, "Cannot coerce empty String"); + verifyException(e, "to `boolean` value"); + } + } + + public void testDefaultStringToBooleanCoercionOk() throws Exception { + _verifyStringToBooleanOk(DEFAULT_MAPPER); + } + + /* + /********************************************************** + /* Test methods: CoercionConfig, from String + /********************************************************** + */ + + public void testStringToBooleanOkDespiteCoercionConfig() throws Exception { + _verifyStringToBooleanOk(MAPPER_STRING_TO_BOOLEAN_FAIL); + } + + /* + /********************************************************** + /* Verification + /********************************************************** + */ + + public void _verifyStringToBooleanOk(ObjectMapper mapper) throws Exception + { + // first successful coercions, basic types: + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "true"), Boolean.TYPE, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "false"), Boolean.TYPE, Boolean.FALSE); + + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "true"), Boolean.class, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "false"), Boolean.class, Boolean.FALSE); + + // and then allowed variants: + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "True"), Boolean.TYPE, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "True"), Boolean.class, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "TRUE"), Boolean.TYPE, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "TRUE"), Boolean.class, Boolean.TRUE); + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "False"), Boolean.TYPE, Boolean.FALSE); + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "False"), Boolean.class, Boolean.FALSE); + _verifyCoerceSuccess(mapper, _xmlWrapped("boolean", "FALSE"), Boolean.TYPE, Boolean.FALSE); + _verifyCoerceSuccess(mapper, _xmlWrapped("Boolean", "FALSE"), Boolean.class, Boolean.FALSE); + + // and then Special boolean derivatives: + // Alas, AtomicBoolean.equals() does not work so... + final ObjectReader r = mapper.readerFor(AtomicBoolean.class); + + AtomicBoolean ab = r.readValue(_xmlWrapped("AtomicBoolean", "true")); + assertTrue(ab.get()); + + ab = r.readValue(_xmlWrapped("AtomicBoolean", "false")); + assertFalse(ab.get()); + } + + /* + /********************************************************** + /* Other helper methods + /********************************************************** + */ + + private String _xmlWrapped(String element, String value) { + return String.format("<%s>%s", element, value, element); + } + + private void _verifyCoerceSuccess(ObjectMapper mapper, + String input, Class type, Object exp) throws IOException + { + Object result = mapper.readerFor(type) + .readValue(input); + assertEquals(exp.getClass(), result.getClass()); + assertEquals(exp, result); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/CaseInsensitiveDeser273Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/CaseInsensitiveDeser273Test.java deleted file mode 100644 index e3103a917..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/CaseInsensitiveDeser273Test.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - -public class CaseInsensitiveDeser273Test extends XmlTestBase -{ - // [dataformat-xml#273] - static class Depots273 - { - public String command; - public String taskId; - - @JacksonXmlElementWrapper(useWrapping = false) - public List element; - - public void setElement(List l) { -//System.err.println("setElement: "+l); - element = l; - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - static class Depot273 - { - @JacksonXmlProperty(isAttribute = true) - public String number; - - @JacksonXmlProperty(isAttribute = true) - public String name; - - public void setNumber(String n) { -//System.err.println("SetNumber: '"+n+"'"); - number = n; - } - public void setName(String n) { -//System.err.println("setName: '"+n+"'"); - name = n; - } - } - - /* - /******************************************************** - /* Test methods - /******************************************************** - */ - - private final ObjectMapper INSENSITIVE_MAPPER = mapperBuilder() - .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES) - .build(); - - // [dataformat-xml#273] - public void testCaseInsensitiveComplex() throws Exception - { - final String DOC = -"\n"+ -" \n"+ -" \n"+ -"" - ; - - Depots273 result = INSENSITIVE_MAPPER.readValue(DOC, Depots273.class); - assertNotNull(result); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestConflictingGetters.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ConflictingGetters27Test.java similarity index 90% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestConflictingGetters.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ConflictingGetters27Test.java index ea8ae68c6..0629e20ef 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestConflictingGetters.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ConflictingGetters27Test.java @@ -1,14 +1,14 @@ package com.fasterxml.jackson.dataformat.xml.failing; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -public class TestConflictingGetters extends XmlTestBase +public class ConflictingGetters27Test extends XmlTestBase { - @JacksonXmlRootElement(localName = "output") + @JsonRootName("output") static class Bean { public BeanInfo[] beanInfo; public BeanInfo[] beanOther; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ElementWrapperViaCreator149Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ElementWrapperViaCreator149Test.java new file mode 100644 index 000000000..7477515b0 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ElementWrapperViaCreator149Test.java @@ -0,0 +1,60 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import java.util.Arrays; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.ObjectMapper; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +// 13-Nov-2020, tatu: Not quite sure how to configure test to pass; +// seems like it should work but does not. Leaving for future generations +// to figure out... +public class ElementWrapperViaCreator149Test extends XmlTestBase +{ + @JsonRootName("body") + static class Body149 { + final String type; + + @JacksonXmlProperty(localName="label") + final List labels; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + public Body149(@JacksonXmlProperty(localName="type") + String type, + @JacksonXmlElementWrapper(localName="labels") + @JacksonXmlProperty(localName="label") + List labels) + { + this.type = type; + this.labels = labels; + } + } + + /* + /********************************************************************** + /* Test methods + /********************************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#149] + public void testElementWrapper149() throws Exception + { + final String XML = "\n" + + " TYPE\n" + + " \n" + + ""; + Body149 result = MAPPER.readValue(XML, Body149.class); + assertEquals("TYPE", result.type); + assertNotNull(result.labels); + assertEquals(Arrays.asList("foo", "bar"), result.labels); + +//System.err.println("XML: "+MAPPER.writeValueAsString(result)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyListDeser124Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyListDeser124Test.java deleted file mode 100644 index 1bcc00db1..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EmptyListDeser124Test.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.*; - -// for [dataformat-xml#124] -public class EmptyListDeser124Test extends XmlTestBase -{ - public static class TestList { - @JsonProperty("list") - public List list; - } - - // [dataformat-xml#124] - public void test124() throws Exception { - final XmlMapper xmlMapper = new XmlMapper(); - TestList originalObject = new TestList(); - originalObject.list = new ArrayList(); - String xml = xmlMapper.writeValueAsString(originalObject); -//System.err.println(xml); // print > - - TestList result = xmlMapper.readValue(xml, TestList.class); - - assertNotNull(result.list); - assertEquals(0, result.list.size()); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EnumIssue9Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EnumIssue9Test.java index 2385f77ff..c7988819c 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EnumIssue9Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/EnumIssue9Test.java @@ -2,8 +2,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; - import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; @@ -29,14 +27,13 @@ public UntypedEnumBean() { } /********************************************************** */ - private final XmlMapper MAPPER = new XmlMapper(); - + private final XmlMapper MAPPER = newMapper(); + public void testUntypedEnum() throws Exception { - ObjectMapper mapper = new XmlMapper(); - String xml = mapper.writeValueAsString(new UntypedEnumBean(TestEnum.B)); + String xml = MAPPER.writeValueAsString(new UntypedEnumBean(TestEnum.B)); - UntypedEnumBean result = mapper.readValue(xml, UntypedEnumBean.class); + UntypedEnumBean result = MAPPER.readValue(xml, UntypedEnumBean.class); assertNotNull(result); assertNotNull(result.value); Object ob = result.value; @@ -47,13 +44,4 @@ public void testUntypedEnum() throws Exception assertEquals(TestEnum.B, result.value); } - - // [dataformat-xml#121] - public void testRootEnumIssue121() throws Exception - { - String xml = MAPPER.writeValueAsString(TestEnum.B); - TestEnum result = MAPPER.readValue(xml, TestEnum.class); - assertNotNull(result); - assertEquals(TestEnum.B, result); - } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingNamespace326Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingNamespace326Test.java deleted file mode 100644 index df18595a3..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingNamespace326Test.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import javax.xml.stream.*; - -import com.ctc.wstx.stax.WstxInputFactory; -import com.ctc.wstx.stax.WstxOutputFactory; -import com.fasterxml.jackson.databind.*; - -import com.fasterxml.jackson.dataformat.xml.*; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -// for [dataformat-xml#326] -public class FailingNamespace326Test extends XmlTestBase -{ - @JacksonXmlRootElement(localName = "new") - static class Bean { - @JacksonXmlProperty(isAttribute = true) - public String source="ECOM"; - public Member member; - - public Bean(int id, String name) { - this.member=new Member(id, name); - } - - public Member getMember() { - return member; - } - } - - static class Member { - private final int id; - private final String name; - - public Member(int id, String name) { - this.id = id; - this.name = name; - } - - public int getId() { - return id; - } - - public String getName() { - return name; - } - } - - public void testIssue311() throws Exception { - XMLInputFactory xmlInputFactory = new WstxInputFactory(); - XMLOutputFactory xmlOutputFactory = new WstxOutputFactory(); - - /* Setting this to true makes the application run but does not write namespace */ - xmlOutputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, false); - - XmlMapper mapper = new XmlMapper(xmlInputFactory); - mapper.enable(SerializationFeature.INDENT_OUTPUT); - - XMLStreamWriter writer = xmlOutputFactory.createXMLStreamWriter(System.out); - - startDocument(writer); - Bean bean=new Bean(1, "Dude"); - mapper.writeValue(writer, bean); - endDocument(writer); - } - - protected void startDocument(XMLStreamWriter writer) throws XMLStreamException { - writer.writeStartDocument("utf-8", "1.0"); - writer.writeCharacters("\n"); - writer.setDefaultNamespace("http://eClub.Schemas.ImportContact"); - writer.writeStartElement("contacts"); - writer.writeDefaultNamespace( "http://eClub.Schemas.ImportContact"); - writer.writeCharacters("\n"); - } - - protected void endDocument(XMLStreamWriter writer) throws XMLStreamException { - writer.writeCharacters("\n"); - writer.writeEndDocument(); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Issue37AdapterTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Issue37AdapterTest.java index 5b1a2c8de..14d5a9e22 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Issue37AdapterTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Issue37AdapterTest.java @@ -11,8 +11,11 @@ import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; import com.fasterxml.jackson.databind.type.TypeFactory; import com.fasterxml.jackson.dataformat.xml.*; -import com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; +// 30-Jun-2020, tatu: This is deferred and possibly won't be fixed +// at all. But leaving failing test here just in case future brings +// alternate approach to do something. public class Issue37AdapterTest extends XmlTestBase { @XmlJavaTypeAdapter(URLEncoderMapDataAdapter.class) @@ -107,7 +110,7 @@ public void setUp() throws Exception _nonJaxbMapper = new XmlMapper(); // Use JAXB-then-Jackson annotation introspector AnnotationIntrospector intr = - XmlAnnotationIntrospector.Pair.instance(new XmlJaxbAnnotationIntrospector(TypeFactory.defaultInstance()), + XmlAnnotationIntrospector.Pair.instance(new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()), new JacksonAnnotationIntrospector()); _jaxbMapper.setAnnotationIntrospector(intr); } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/JsonNodeBasicSer441Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/JsonNodeBasicSer441Test.java new file mode 100644 index 000000000..7a23db911 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/JsonNodeBasicSer441Test.java @@ -0,0 +1,37 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// for [dataformat-xml#441] +public class JsonNodeBasicSer441Test extends XmlTestBase +{ + final private ObjectMapper XML_MAPPER = newMapper(); + + public void testSimpleNode() throws Exception + { + ObjectNode xml = XML_MAPPER.createObjectNode(); + ObjectNode root = xml.putObject("root"); + root.put("id", 13); + root.put("enabled", true); +//System.err.println("XML/object: "+XML_MAPPER.writeValueAsString(xml)); + assertEquals("13true", + XML_MAPPER.writeValueAsString(xml)); + } + + public void testArrayNode() throws Exception + { + ObjectNode xml = XML_MAPPER.createObjectNode(); + ObjectNode root = xml.putObject("root"); + ArrayNode arr = root.putArray("array"); + arr.add("first"); + ObjectNode second = arr.addObject(); + second.put("value", 137); + +//System.err.println("XML/array: "+XML_MAPPER.writeValueAsString(xml)); + assertEquals("first137", + XML_MAPPER.writeValueAsString(xml)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser294Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser294Test.java deleted file mode 100644 index 54ef4af5c..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser294Test.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -public class ListDeser294Test extends XmlTestBase -{ - @JacksonXmlRootElement(localName = "levels") - static class RootLevel { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "sublevel") - public List sublevels = new ArrayList<>(); - } - - @JsonPropertyOrder({ "id", "sublevel" }) // fails -// @JsonPropertyOrder({ "sublevel", "id" }) // works - static class Sublevel { - public Integer id; - public String sublevel; - } - - /* - /********************************************************************** - /* Test methods - /********************************************************************** - */ - - private final XmlMapper MAPPER = newMapper(); - - public void testNestedLists294() throws Exception - { - RootLevel tree = new RootLevel(); - tree.sublevels.add(_newSublevel(1, "Name A")); - tree.sublevels.add(_newSublevel(2, "Name B")); - String xml = MAPPER - .writerWithDefaultPrettyPrinter() - .writeValueAsString(tree); -//System.err.println("XML:\n"+xml); - RootLevel resTree = MAPPER.readValue(xml, RootLevel.class); - assertNotNull(resTree); - assertNotNull(resTree.sublevels); - assertEquals(2, resTree.sublevels.size()); - assertEquals("Name B", resTree.sublevels.get(1).sublevel); - } - - private Sublevel _newSublevel(Integer id, String sublevel) { - Sublevel res = new Sublevel(); - res.id = id; - res.sublevel = sublevel; - return res; - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser319Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser319Test.java deleted file mode 100644 index 0ba89f9dc..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser319Test.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import java.util.*; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; - -public class ListDeser319Test extends XmlTestBase -{ - static class Value319 { - public Long orderId, orderTypeId; - } - - /* - /********************************************************************** - /* Test methods - /********************************************************************** - */ - - private final XmlMapper MAPPER = newMapper(); - - public void testEmptyList319() throws Exception - { - final String DOC = ""; - List value = MAPPER.readValue(DOC, - new TypeReference>() { }); - assertNotNull(value); - assertEquals(0, value.size()); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/MixedContentTreeRead226Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/MixedContentTreeRead226Test.java deleted file mode 100644 index 764f775fd..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/MixedContentTreeRead226Test.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; - -public class MixedContentTreeRead226Test extends XmlTestBase -{ - public void testMixed226() throws Exception - { - final String XML = "\nlorem ipsum dolor\n"; - XmlMapper mapper = new XmlMapper(); - JsonNode root = mapper.readTree(XML); - assertNotNull(root); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PojoAsAttributeSer128Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PojoAsAttributeSer128Test.java new file mode 100644 index 000000000..6d1717c61 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PojoAsAttributeSer128Test.java @@ -0,0 +1,46 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + + +// [dataformat-xml#128]: Should ignore "as-attribute" setting for POJO +public class PojoAsAttributeSer128Test extends XmlTestBase +{ + static class Bean { + public int value = 42; + } + + @JsonRootName("root") + @JsonPropertyOrder({ "start", "bean", "end" }) + static class Container { + @JacksonXmlProperty(isAttribute = true) + public String start = "!start"; + + @JacksonXmlProperty(isAttribute = true) + protected Bean bean = new Bean(); + + @JacksonXmlProperty(isAttribute = true) + public String end = "!end"; + } + + /* + /******************************************************** + /* Test methods + /******************************************************** + */ + + private final XmlMapper MAPPER = newMapper(); + + public void testAttributeDeser128() throws Exception + { + final String output = MAPPER.writeValueAsString(new Container()).trim(); +//System.err.println(output); + assertEquals("42", + output); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList426Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList426Test.java new file mode 100644 index 000000000..41306aefa --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList426Test.java @@ -0,0 +1,112 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import java.io.IOException; +import java.util.List; + +import com.fasterxml.jackson.annotation.*; + +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; +import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +public class PolymorphicList426Test extends XmlTestBase +{ + static class Auto { + @JacksonXmlProperty(localName = "Object") + @JacksonXmlElementWrapper(useWrapping = false) +// @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List carParts; + } + + @JsonTypeIdResolver(CarPartsResolver.class) + @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.PROPERTY, property = "type") + abstract static class CarParts { + @JacksonXmlProperty(isAttribute = true) // The is triggering the issue. + public String uid; + + @JacksonXmlProperty(localName = "Object") + @JacksonXmlElementWrapper(useWrapping = false) +// @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List carParts; + } + + static class Engine extends CarParts{} + static class Chassis extends CarParts{} + static class Motor extends CarParts{} + static class Body extends CarParts{} + + static class CarPartsResolver extends TypeIdResolverBase { + private JavaType superType; + + @Override + public void init(JavaType javaType) { + this.superType = javaType; + } + + @Override + public String idFromValue(Object o) { + return idFromValueAndType(o, o.getClass()); + } + + @Override + public String idFromValueAndType(Object o, Class aClass) { + return aClass.getSimpleName(); + } + + @Override + public JavaType typeFromId(DatabindContext context, String id) throws IOException { + Class subType = null; + switch (id) { + case "Engine": subType = Engine.class; break; + case "Chassis": subType = Chassis.class; break; + case "Motor": subType = Motor.class; break; + case "Body": subType = Body.class; break; + } + return context.constructSpecializedType(superType, subType); + } + + @Override + public JsonTypeInfo.Id getMechanism() { + return JsonTypeInfo.Id.CUSTOM; + } + } + + /* + /******************************************************** + /* Test methods + /******************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#426] + public void testPolymorphicList426() throws Exception + { + String xml = "" + +"\n" + +" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +""; + Auto result = MAPPER.readValue(xml, Auto.class); + assertNotNull(result); + assertNotNull(result.carParts); + assertEquals(2, result.carParts.size()); + CarParts cp = result.carParts.get(0); + + // for debugging: +//System.err.println("XML:\n"+MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(result)); + + assertNotNull(cp); + assertNotNull(cp.carParts); + + // So far so good, but fails here: + assertEquals(2, cp.carParts.size()); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestDeserialization.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestDeserialization.java deleted file mode 100644 index 3de5b9b00..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestDeserialization.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - -public class TestDeserialization extends XmlTestBase -{ - private static class EmptyStrings - { - @JacksonXmlProperty(isAttribute=true) - public String a = "NOT SET"; - public String b = "NOT SET"; - } - - private final XmlMapper MAPPER = new XmlMapper(); - - // [dataformat-xml#25] - public void testEmptyStringFromElemAndAttr() throws Exception - { - EmptyStrings ob = MAPPER.readValue("", - EmptyStrings.class); - assertNotNull(ob); - assertEquals("", ob.a); - assertEquals("", ob.b); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestEmptyContent.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestEmptyContent.java deleted file mode 100644 index a5d9334bf..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestEmptyContent.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.failing; - -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; - -/** - * Test case(s) to see that we can map "empty" content into null, for convenience. - * Currently Stax parser will throw an exception; we could either use buffering, - * or catch the EOFException and take that as a hint. - */ -public class TestEmptyContent extends XmlTestBase -{ - static class EmptyBean { } - - /** - * [Issue#60]: should be able to detect "no content", ideally. - */ - public void testNoContent() throws Exception - { - XmlMapper mapper = new XmlMapper(); - assertNull(mapper.readValue("", EmptyBean.class)); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUntypedListSerialization.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UntypedListSerialization8Test.java similarity index 82% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUntypedListSerialization.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UntypedListSerialization8Test.java index 4ac906922..f0d1863b7 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUntypedListSerialization.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UntypedListSerialization8Test.java @@ -4,13 +4,13 @@ import java.util.ArrayList; import java.util.List; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -public class TestUntypedListSerialization extends XmlTestBase +public class UntypedListSerialization8Test extends XmlTestBase { - @JacksonXmlRootElement(localName="L") + @JsonRootName("L") static class UntypedListBean { public final Object list; @@ -23,7 +23,7 @@ public UntypedListBean() { } } - @JacksonXmlRootElement(localName="L") + @JsonRootName("L") static class TypedListBean { public final List list; @@ -35,14 +35,14 @@ public TypedListBean() { list = l; } } - + /* /********************************************************** /* Unit tests /********************************************************** */ - private final XmlMapper MAPPER = new XmlMapper(); + private final XmlMapper MAPPER = newMapper(); /* * For [dataformat-xml#8] -- Will not use wrapping, if type is not statically known diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UnwrappedAndList299DeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UnwrappedAndList299DeserTest.java new file mode 100644 index 000000000..626db2024 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/UnwrappedAndList299DeserTest.java @@ -0,0 +1,61 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.*; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; + +public class UnwrappedAndList299DeserTest extends XmlTestBase +{ + static class Request { + @JsonUnwrapped + public Composite composite = new Composite(); + } + + static class Composite { + public String messageId; + public Integer number; + + @JacksonXmlElementWrapper(useWrapping=false) + public List
headers = new ArrayList<>(); + } + + static class Header { + public String headerId; + } + + private final ObjectMapper MAPPER = newMapper(); + + public void testXmlMarshallingAndUnmarshalling() throws Exception { + final Request request = new Request(); + request.composite.messageId = "ABC"; + request.composite.number = 123; + + final Header header1 = new Header(); + header1.headerId = "headerID1"; + final Header header2 = new Header(); + header2.headerId = "headerID2"; + + request.composite.headers.add(header1); + request.composite.headers.add(header2); + + String xmlString = MAPPER.writerWithDefaultPrettyPrinter() + .writeValueAsString(request); + +//System.err.println("XML:\n"+xmlString); + + final Request anotherRequest = MAPPER.readValue(xmlString, Request.class); + + assertEquals(request.composite.messageId, anotherRequest.composite.messageId); + assertEquals(request.composite.number, anotherRequest.composite.number); + + assertEquals("ABC", anotherRequest.composite.messageId); + assertEquals(new Integer(123), anotherRequest.composite.number); + assertEquals(2, anotherRequest.composite.headers.size()); + assertEquals("headerID1", anotherRequest.composite.headers.get(0).headerId); + assertEquals("headerID2", anotherRequest.composite.headers.get(1).headerId); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/VerifyRootLocalName247Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/VerifyRootLocalName247Test.java new file mode 100644 index 000000000..e9f4d2308 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/VerifyRootLocalName247Test.java @@ -0,0 +1,40 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class VerifyRootLocalName247Test extends XmlTestBase +{ + // [dataformat-xml#247] + static class Root { + public int value; + } + + /* + /********************************************************************** + /* Test methods + /********************************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#247] + public void testRootNameValidation247() throws Exception + { + Root root = MAPPER + .readerFor(Root.class) +// 16-Nov-2020, tatu: no time to implement for 2.12, hopefully next version? +// .with(FromXmlParser.Feature.ENFORCE_VALID_ROOT_NAME) + .readValue("42"); + assertEquals(42, root.value); + + // so far so good. But why no validation for root local name? + try { + MAPPER.readValue("42", Root.class); + fail("Should not allow wrong local name!"); + } catch (JsonProcessingException e) { + verifyException(e, "Foobar"); + } + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/XmlTextViaCreator306Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/XmlTextViaCreator306Test.java new file mode 100644 index 000000000..e5d9b60bf --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/XmlTextViaCreator306Test.java @@ -0,0 +1,115 @@ +package com.fasterxml.jackson.dataformat.xml.failing; + +import java.beans.ConstructorProperties; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; + +// [dataformat-xml#306]: Problem is that `@XmlText` has no nominal property name +// of empty String (""), and that is not properly bound. Worse, empty String has +// special meaning so that annotation CANNOT specify it, either. +public class XmlTextViaCreator306Test extends XmlTestBase +{ + // [dataformat-xml#306] + @JsonRootName("ROOT") + static class Root { + @JacksonXmlProperty(localName = "CHILD") + final Child child; + + public Root(Child child) { + this.child = child; + } + + public Child getChild() { + return child; + } + } + + static class Child { + @JacksonXmlProperty(localName = "attr", isAttribute = true) + String attr; + + @JacksonXmlText + String el; + + @ConstructorProperties({"attr", "el"}) + Child(String attr, String el) { + this.attr = attr; + this.el = el; + } + } + + @JsonRootName("ROOT") + static class RootWithoutConstructor { + @JacksonXmlProperty(localName = "CHILD") + final ChildWithoutConstructor child; + + @ConstructorProperties({"child"}) + public RootWithoutConstructor(ChildWithoutConstructor child) { + this.child = child; + } + + public ChildWithoutConstructor getChild() { + return child; + } + } + + static class ChildWithoutConstructor { + @JacksonXmlProperty(isAttribute = true) + public String attr; + + @JacksonXmlText + public String el; + } + + // [dataformat-xml#423] + static class Sample423 + { + final String text; + final String attribute; + + @JsonCreator + public Sample423(@JacksonXmlText String text, + @JacksonXmlProperty(localName = "attribute", isAttribute = true) + String attribute) { + this.text = text; + this.attribute = attribute; + } + } + + /* + /******************************************************** + /* Test methods + /******************************************************** + */ + + private final XmlMapper MAPPER = newMapper(); + + // [dataformat-xml#306] + public void testIssue306WithCtor() throws Exception + { + final String XML = "text"; + Root root = MAPPER.readValue(XML, Root.class); + assertNotNull(root); + } + + public void testIssue306NoCtor() throws Exception + { + final String XML = "text"; + RootWithoutConstructor rootNoCtor = MAPPER.readValue(XML, RootWithoutConstructor.class); + assertNotNull(rootNoCtor); + } + + // [dataformat-xml#423] + public void testXmlTextViaCtor423() throws Exception + { + final String XML = "text value"; + Sample423 result = MAPPER.readValue(XML, Sample423.class); + assertEquals("attrValue", result.attribute); + assertEquals("text value", result.text); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/AttributesWithJAXBTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/AttributesWithJAXBTest.java index 5b59320d0..e2513b000 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/AttributesWithJAXBTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/AttributesWithJAXBTest.java @@ -42,7 +42,6 @@ public Problem(String id, String description) { public void testTwoAttributes() throws IOException { XmlMapper mapper = new XmlMapper(); -// mapper.setAnnotationIntrospector(new XmlJaxbAnnotationIntrospector(TypeFactory.defaultInstance())); mapper.setAnnotationIntrospector(new JaxbAnnotationIntrospector(TypeFactory.defaultInstance())); String xml = mapper.writeValueAsString(new Jurisdiction()); assertEquals("", xml); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/BuilderWithJAXB291Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/BuilderWithJAXB291Test.java index 8adfb85f6..e5d4d1349 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/BuilderWithJAXB291Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/BuilderWithJAXB291Test.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; // Test for [dataformat-xml#291]: works via field, not constructor // (name mismatch to fix in test case) @@ -27,7 +28,7 @@ static class Address private final String country; private final String county; - private Address(AddressBuilder addressbuilder) { + Address(AddressBuilder addressbuilder) { this.address1 = addressbuilder.address1; this.city = addressbuilder.city; this.stateProvince = addressbuilder.stateProvince; @@ -118,7 +119,7 @@ public void testBuilder291() throws Exception " 94132\n" + ""; - XmlJaxbAnnotationIntrospector xmlIntr = new XmlJaxbAnnotationIntrospector(TypeFactory.defaultInstance()); + AnnotationIntrospector xmlIntr = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()); AnnotationIntrospector intr = XmlAnnotationIntrospector.Pair.instance (xmlIntr, new JacksonAnnotationIntrospector()); XmlMapper mapper = mapperBuilder() diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/ElementWrapperTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/ElementWrapperTest.java index 339c86228..82d36975c 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/ElementWrapperTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/ElementWrapperTest.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; public class ElementWrapperTest extends XmlTestBase { @@ -44,7 +45,7 @@ public void testElementWrapper() throws Exception XmlMapper _jaxbMapper = new XmlMapper(); // Use JAXB-then-Jackson annotation introspector AnnotationIntrospector intr = XmlAnnotationIntrospector.Pair.instance - (new XmlJaxbAnnotationIntrospector(TypeFactory.defaultInstance()), + (new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()), new JacksonAnnotationIntrospector()); _jaxbMapper.setAnnotationIntrospector(intr); @@ -66,8 +67,9 @@ public void testElementWrapper() throws Exception // And with JAXB, default should be "no wrapper" public void testNoElementWrapper() throws Exception { - XmlMapper jaxbMapper = new XmlMapper(); - jaxbMapper.setAnnotationIntrospector(new XmlJaxbAnnotationIntrospector(TypeFactory.defaultInstance())); + XmlMapper jaxbMapper = mapperBuilder() + .annotationIntrospector(new JaxbAnnotationIntrospector(TypeFactory.defaultInstance())) + .build(); MyPerson2 person = new MyPerson2(); person.name = "Jay"; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JAXBObjectId170Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JAXBObjectId170Test.java index 42e766fca..70e01071a 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JAXBObjectId170Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JAXBObjectId170Test.java @@ -8,10 +8,11 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; +import com.fasterxml.jackson.databind.type.TypeFactory; import com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; public class JAXBObjectId170Test extends XmlTestBase { @@ -116,11 +117,13 @@ public void testPolyIdList178() throws Exception "\n" ; - XmlMapper mapper = new XmlMapper(); - XmlJaxbAnnotationIntrospector xmlIntr = new XmlJaxbAnnotationIntrospector(mapper.getTypeFactory()); - xmlIntr.setDefaultUseWrapper(false); + JaxbAnnotationIntrospector xmlIntr = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()); AnnotationIntrospector intr = XmlAnnotationIntrospector.Pair.instance (xmlIntr, new JacksonAnnotationIntrospector()); + XmlMapper mapper = mapperBuilder() + .defaultUseWrapper(false) + .annotationIntrospector(intr) + .build(); // should be default but doesn't seem to be? mapper.setAnnotationIntrospector(intr); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JaxbXmlValue418Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JaxbXmlValue418Test.java new file mode 100644 index 000000000..da48968df --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/JaxbXmlValue418Test.java @@ -0,0 +1,121 @@ +package com.fasterxml.jackson.dataformat.xml.jaxb; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlValue; + +import com.fasterxml.jackson.annotation.JsonRootName; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; + +// Problem with handling of `@XmlValue` via JAXBAnnotationIntrospector +// is that by default it gives implicit name of `value` for virtual +// property. Although accessor itself will be specially processed, this +// may prevent normal combining of getter/setter/field combo. +// To prevent issues it is necessary to use one of work-arounds: +// +// 1. Annotate all relevant accessors, not just one (since implicit name +// binding can not be relied on) +// 2. Override default implicit name to be `null`, which should allow +// combination of accessors +public class JaxbXmlValue418Test extends XmlTestBase +{ + // [dataformat-xml#418] + @XmlRootElement(name = "ROOT") + static class RootWithJaxbAnnotations { + @XmlAttribute(name = "CHILD") + JaxbChild child = new JaxbChild(); + } + + static class JaxbChild { + @XmlAttribute + String attr = "attr_value"; + + // NOTE! One work-around for issue would be to move this to `getEl()` + @XmlValue + String el = "text"; + + public String getAttr() { + return this.attr; + } + + public String getEl() { + return this.el; + } + + public void setAttr(String attr) { + this.attr = attr; + } + + public void setEl(String el) { + this.el = el; + } + } + + @JsonRootName("ROOT") + public static class RootWithJacksonAnnotations { + @JacksonXmlProperty(localName = "CHILD") + JacksonChild child = new JacksonChild(); + } + + public static class JacksonChild { + @JacksonXmlProperty(isAttribute = true) + String attr = "attr_value"; + + @JacksonXmlText + String el = "text"; + + public String getAttr() { + return this.attr; + } + + public String getEl() { + return this.el; + } + + public void setAttr(String attr) { + this.attr = attr; + } + + public void setEl(String el) { + this.el = el; + } + } + + /* + /********************************************************************** + /* Test methods + /********************************************************************** + */ + + private final ObjectMapper VANILLA_MAPPER = newMapper(); + + private static final String EXPECTED_418 = "text"; + + // [dataformat-xml#418] + public void testWithJaxbAnnotations() throws Exception { + final RootWithJaxbAnnotations value = new RootWithJaxbAnnotations(); + + // 13-Nov-2020, tatu: 2 main ways to resolve the problem, either (a) move + // annotation to getter or (b) remove "implicit name" for `@XmlValue`. + // We'll do latter here: + final XmlMapper mapper = XmlMapper.builder() + .addModule(new com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule() + .setNameUsedForXmlValue(null) + ) + .build(); + final String xml = mapper.writeValueAsString(value); + assertEquals(EXPECTED_418, xml); + } + + public void testWithJacksonAnnotations() throws Exception { + final RootWithJacksonAnnotations value = new RootWithJacksonAnnotations(); + + assertEquals(EXPECTED_418, VANILLA_MAPPER.writeValueAsString(value)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/NamespaceViaJAXB18Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/NamespaceViaJAXB18Test.java new file mode 100644 index 000000000..e593af4e4 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/jaxb/NamespaceViaJAXB18Test.java @@ -0,0 +1,63 @@ +package com.fasterxml.jackson.dataformat.xml.jaxb; + +import com.fasterxml.jackson.databind.type.TypeFactory; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; + +public class NamespaceViaJAXB18Test extends XmlTestBase +{ + final static String TEST_NAMESPACE = "http://namespace-base"; + + @XmlRootElement(namespace = TEST_NAMESPACE) + interface Facility { } + + static class House implements Facility { + @XmlAttribute + public String getName() { return "Bob"; } + } + + @XmlRootElement(namespace = "", name = "Houzz") + static class HouseWithNoNamespace implements Facility { + @XmlAttribute + public String getName() { return "Bill"; } + } + + // Also: for better or worse, cannot only override local name so: + @XmlRootElement(name = "Houzz2") + static class HouseWithNoNamespace2 implements Facility { + @XmlAttribute + public String getName() { return "Frank"; } + } + + private final XmlMapper MAPPER = mapperBuilder() + .annotationIntrospector(new JaxbAnnotationIntrospector(TypeFactory.defaultInstance())) + .build(); + + // [dataformat-xml#18] + public void testNamespaceViaJAXB() throws Exception + { + String xml = MAPPER.writeValueAsString(new House()); + if (!xml.contains(" list; + } + + // [dataformat-xml#177] static class Config { @JacksonXmlProperty(isAttribute=true) @@ -23,6 +34,11 @@ static class Entry public String id; } + // [dataformat-xml#319] + static class Value319 { + public Long orderId, orderTypeId; + } + /* /********************************************************** /* Test methods @@ -30,7 +46,20 @@ static class Entry */ private final XmlMapper MAPPER = new XmlMapper(); - + + // [dataformat-xml#124] + public void test124() throws Exception { + TestList124 originalObject = new TestList124(); + originalObject.list = new ArrayList(); + String xml = MAPPER.writeValueAsString(originalObject); + + TestList124 result = MAPPER.readValue(xml, TestList124.class); + + assertNotNull(result.list); + assertEquals(0, result.list.size()); + } + + // [dataformat-xml#177] public void testEmptyList() throws Exception { Config r = MAPPER.readValue( @@ -44,4 +73,32 @@ public void testEmptyList() throws Exception assertEquals(1, r.entry.size()); assertEquals("foo", r.entry.get(0).id); } + + // [dataformat-xml#319] + public void testEmptyList319() throws Exception + { + final String DOC = ""; + + List list = MAPPER.readValue(DOC, new TypeReference>() { }); + assertNotNull(list); + assertEquals(0, list.size()); + + Object result = MAPPER.readValue(DOC, Value319[].class); + assertNotNull(result); + assertEquals(Value319[].class, result.getClass()); + Value319[] array = (Value319[]) result; + assertEquals(0, array.length); + } + + // [dataformat-xml#435] + public void testEmptyListAsNull435() throws Exception + { + XmlMapper mapper = mapperBuilder() + .enable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .build(); + List result = mapper.readValue("", + new TypeReference>() { + }); + assertNull(result); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/Issue101UnwrappedListAttributesTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/Issue101UnwrappedListAttributesTest.java index 2bf62d1e2..10bba59f3 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/Issue101UnwrappedListAttributesTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/Issue101UnwrappedListAttributesTest.java @@ -3,6 +3,7 @@ import java.util.*; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.*; @@ -10,26 +11,8 @@ // Failing unit test(s) wrt [Issue#64] public class Issue101UnwrappedListAttributesTest extends XmlTestBase { - static class Optional { - @JacksonXmlText - public String number = "NOT SET"; - - @JacksonXmlProperty(isAttribute=true) - public String type = "NOT SET"; - - public Optional() { } - - // uncommenting this ALSO works: -// public Optional(String n) { number = n; } - } - - static class Optionals { - @JacksonXmlElementWrapper(useWrapping = false) - public List optional; - } - - // For [Issue#101] - @JacksonXmlRootElement(localName = "root") + // For [dataformat-xml#101] + @JsonRootName("root") @JsonPropertyOrder({ "unwrapped", "name" }) static class Root { @JacksonXmlProperty(localName = "unwrapped") @@ -62,24 +45,7 @@ public UnwrappedElement (String id, String type) { private final XmlMapper MAPPER = new XmlMapper(); - // // [Issue#64] - public void testOptionalsWithMissingType() throws Exception - { -// Optionals ob = MAPPER.readValue("123-456-7890", - Optionals ob = MAPPER.readValue("123-456-7890", - Optionals.class); - assertNotNull(ob); - assertNotNull(ob.optional); - assertEquals(1, ob.optional.size()); - -// System.err.println("ob: " + ob); // works fine - - Optional opt = ob.optional.get(0); - assertEquals("123-456-7890", opt.number); - assertEquals("NOT SET", opt.type); - } - - // [Issue#101] + // [dataformat-xml#101] public void testWithTwoAttributes() throws Exception { final String EXP = "" diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListAsObjectTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListAsObjectTest.java index 1caf050b2..d4bd15c97 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListAsObjectTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListAsObjectTest.java @@ -46,10 +46,10 @@ static final class Values extends LinkedList public void testCollection() throws Exception { final Values values = new XmlMapper().readValue("" + - " c" + - " d" + - "", - Values.class); + " c" + + " d" + + "", + Values.class); assertEquals(2, values.getValues().size(), 2); assertEquals("c", values.getValues().get(0).getV()); assertEquals("d", values.getValues().get(1).getV()); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser191Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser191Test.java deleted file mode 100644 index b6fd760d3..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser191Test.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.lists; - -import java.util.ArrayList; - -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.dataformat.xml.*; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; - -public class ListDeser191Test extends XmlTestBase -{ - static class TestList { - @JacksonXmlElementWrapper(useWrapping = true, localName = "items") - @JacksonXmlProperty(localName = "item") - public ArrayList items; - } - - static class ListItem { - @JacksonXmlProperty(isAttribute = true) - public String name; - } - - public void testListDeser() throws Exception - { - ObjectMapper mapper = new XmlMapper(); - final String XML = -"\n"+ -" \n"+ -" \n"+ -" \n"+ // important: at least one ws char between start/end -" \n"+ -" \n"+ -"" - ; - TestList testList = mapper.readValue(XML, TestList.class); - assertNotNull(testList); - assertNotNull(testList.items); - assertEquals(3, testList.items.size()); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser393Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser393Test.java new file mode 100644 index 000000000..8a5bc5958 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser393Test.java @@ -0,0 +1,82 @@ +package com.fasterxml.jackson.dataformat.xml.lists; + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonRootName; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; + +public class ListDeser393Test extends XmlTestBase +{ + @JsonRootName("prices") + static class Prices393 { + private List price = new ArrayList(); + + public void setPrice(List price) { + this.price = price; + } + + @JacksonXmlElementWrapper(useWrapping = false) + public List getPrice() { + return this.price; + } + } + + static class Price393 { + private String price; + private String num; + + protected Price393() { } + public Price393(String p, String n) { + price = p; + num = n; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getPrice() { + return this.price; + } + + public void setNum(String num) { + this.num = num; + } + + public String getNum() { + return this.num; + } + } + + /* + /******************************************************** + /* Test methods + /******************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#393] + public void testDeser393() throws Exception + { + String content = + "\n" + + " \n" + + " 100\n" + + " 7.0\n" + + " \n" + + " \n" + + " 100\n" + + " 4.0\n" + + " " + + "\n"; + Prices393 result = MAPPER.readValue(content, Prices393.class); + assertNotNull(result); + assertNotNull(result.getPrice()); + assertEquals(2, result.getPrice().size()); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser399Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser399Test.java new file mode 100644 index 000000000..948feb0c1 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeser399Test.java @@ -0,0 +1,49 @@ +package com.fasterxml.jackson.dataformat.xml.lists; + +import java.util.*; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +public class ListDeser399Test extends XmlTestBase +{ + static class Main { + @JacksonXmlProperty(localName = "test") + @JacksonXmlElementWrapper(useWrapping = false) + List list = new ArrayList(); + } + + static class Test { + @JacksonXmlProperty(localName = "test") + @JacksonXmlElementWrapper(useWrapping = false) + List list = new ArrayList(); + } + + private final XmlMapper MAPPER = newMapper(); + + public void testIssue399() throws Exception { + final String XML = +"
\n" + +" \n" + +" \n" + +" \n" + +" \n" + +//" \n" + +//" \n" + +" \n" + +" \n" + +" \n" + +" \n" + +"
"; + Main main = MAPPER.readValue(XML, Main.class); + assertNotNull(main); + assertNotNull(main.list); + assertEquals(2, main.list.size()); + assertNotNull(main.list.get(0)); + assertNotNull(main.list.get(0).list); + assertEquals(1, main.list.get(0).list.size()); + assertNotNull(main.list.get(1)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeserializationTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeserializationTest.java index 0f511ef5c..a0427ff76 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeserializationTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListDeserializationTest.java @@ -1,8 +1,14 @@ package com.fasterxml.jackson.dataformat.xml.lists; +import java.math.BigDecimal; import java.util.*; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; + import com.fasterxml.jackson.databind.SerializationFeature; + import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.*; @@ -15,7 +21,7 @@ public class ListDeserializationTest extends XmlTestBase /********************************************************** */ - @JacksonXmlRootElement(localName = "person", namespace ="http://example.org/person" ) + @JsonRootName(value = "person", namespace ="http://example.org/person" ) public static class Person { @JacksonXmlProperty( isAttribute = true ) @@ -69,6 +75,131 @@ static class ListBeanUnwrapped public List values; } + // [dataformat-xml#191] + static class TestList191 { + @JacksonXmlElementWrapper(useWrapping = true, localName = "items") + @JacksonXmlProperty(localName = "item") + public ArrayList items; + } + + static class ListItem191 { + @JacksonXmlProperty(isAttribute = true) + public String name; + } + + // [dataformat-xml#256] + static class ExampleObject256 { + public List levelOne; + + public List getLevelOne() { return levelOne; } + + static class LevelOne { + public LevelTwo levelTwo; + + public LevelTwo getLevelTwo() { return levelTwo; } + } + + static class LevelTwo { + public String fieldOne; + public String fieldTwo; + + public String getFieldOne() { return fieldOne; } + public String getFieldTwo() { return fieldTwo; } + } + } + + @JsonRootName("Object") + static abstract class ExampleObjectMixin { + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "LevelOne") + abstract List getLevelOne(); + + @JacksonXmlElementWrapper(useWrapping = false) + @JsonProperty("LevelOne") // This is a workaround to set the element name, @JacksonXmlProperty seems to get ignored + abstract void setLevelOne(List levelOne); + } + + static abstract class LevelOneMixin { + @JacksonXmlProperty(localName = "LevelTwo") + abstract ExampleObject256.LevelTwo getLevelTwo(); + + @JsonProperty("LevelTwo") + abstract void setLevelTwo(ExampleObject256.LevelTwo levelTwo); + } + + static abstract class LevelTwoMixin { + @JacksonXmlProperty(localName = "Field1") + abstract String getFieldOne(); + + @JsonProperty("Field1") + abstract void setFieldOne(String fieldOne); + + @JacksonXmlProperty(localName = "Field2") + abstract String getFieldTwo(); + + @JsonProperty("Field2") + abstract void setFieldTwo(String fieldTwo); + } + + // [dataformat-xml#294] + @JsonRootName("levels") + static class RootLevel294 { + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "sublevel") + public List sublevels = new ArrayList<>(); + } + + @JsonPropertyOrder({ "id", "sublevel" }) + static class Sublevel294 { + public Integer id; + public String sublevel; + } + + @JsonRootName("Product") + static class Product433 { + @JsonProperty("Prices") + public Prices433 prices; + } + + // [dataformat-xml#307] + @JsonRootName("customer") + static class CustomerWithoutWrapper307 { + public Long customerId; + public String customerName; + + @JacksonXmlElementWrapper(useWrapping = false) + public List account; + } + + static class Account307 { + public Long accountId; + public String accountName; + public String postcode; + } + + // [dataformat-xml#433] + static class Prices433 { + @JsonProperty("Price") + @JacksonXmlElementWrapper(useWrapping=false) + public List price; + + public List getPrice() { + if (price == null) { + price = new ArrayList(); + } + return this.price; + } + } + + static class Price433 { + @JsonProperty("Start") + public Integer start; + @JsonProperty("End") + public Integer end; + @JsonProperty("Price") + public BigDecimal price; + } + /* /********************************************************** /* Unit tests @@ -164,4 +295,122 @@ public void testUnwrappedListBeanDeser() throws Exception assertEquals(Integer.valueOf(2), bean.values.get(1)); assertEquals(Integer.valueOf(3), bean.values.get(2)); } + + // [dataformat-xml#191] + public void testListDeser191() throws Exception + { + final String XML = +"\n"+ +" \n"+ +" \n"+ +" \n"+ // important: at least one ws char between start/end +" \n"+ +" \n"+ +"" + ; + TestList191 testList = MAPPER.readValue(XML, TestList191.class); + assertNotNull(testList); + assertNotNull(testList.items); + assertEquals(3, testList.items.size()); + } + + // [dataformat-xml#256] + public void testListWithMixinDeser256() throws Exception + { + final String XML = + "\n" + + " \n" + + " \n" + + " Value1\n" + + " Value2\n" + + " \n" + + " \n" + + ""; + final XmlMapper mapper = XmlMapper.builder() + .addMixIn(ExampleObject256.class, ExampleObjectMixin.class) + .addMixIn(ExampleObject256.LevelOne.class, LevelOneMixin.class) + .addMixIn(ExampleObject256.LevelTwo.class, LevelTwoMixin.class) + .build(); + ExampleObject256 result = mapper.readValue(XML, ExampleObject256.class); + assertNotNull(result); + assertNotNull(result.levelOne); + assertEquals(1, result.levelOne.size()); + assertNotNull(result.levelOne.get(0)); + assertNotNull(result.levelOne.get(0).levelTwo); + assertEquals("Value1", result.levelOne.get(0).levelTwo.fieldOne); + assertEquals("Value2", result.levelOne.get(0).levelTwo.fieldTwo); + } + + // [dataformat-xml#294] + public void testNestedLists294() throws Exception + { + RootLevel294 tree = new RootLevel294(); + tree.sublevels.add(_newSublevel(1, "Name A")); + tree.sublevels.add(_newSublevel(2, "Name B")); + String xml = MAPPER + .writerWithDefaultPrettyPrinter() + .writeValueAsString(tree); +//System.err.println("XML:\n"+xml); + RootLevel294 resTree = MAPPER.readValue(xml, RootLevel294.class); + assertNotNull(resTree); + assertNotNull(resTree.sublevels); + assertEquals(2, resTree.sublevels.size()); + assertEquals("Name B", resTree.sublevels.get(1).sublevel); + } + + private Sublevel294 _newSublevel(Integer id, String sublevel) { + Sublevel294 res = new Sublevel294(); + res.id = id; + res.sublevel = sublevel; + return res; + } + + // [dataformat-xml#307] + public void testListDeser307() throws Exception + { + final String XML = "\n" + + "\n" + + " 1\n" + + " Michael Judy\n" + + " \n" + + " 100\n" + + " Michael\n" + + " \n" + + " \n" + + " \n" + + " 200\n" + + " Judy\n" + + " \n" + + " \n" + + ""; + CustomerWithoutWrapper307 result = + MAPPER.readValue(XML, CustomerWithoutWrapper307.class); + assertNotNull(result); + assertNotNull(result.account); + assertEquals(2, result.account.size()); + } + + // [dataformat-xml#433] + public void testListDeser433() throws Exception { + final String XML = +"\n" + +" \n" + +" \n" + +" 50\n" + +" 99\n" + +" 2.53\n" + +" \n" + +" \n" + +""; + + Product433 main = MAPPER.readValue(XML, Product433.class); + assertNotNull(main); + assertNotNull(main.prices); + Prices433 p = main.prices; + assertNotNull(p.price); + assertEquals(1, p.price.size()); + Price433 price = p.price.get(0); + assertEquals(Integer.valueOf(99), price.end); + assertEquals(new BigDecimal("2.53"), price.price); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListRoundtripTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListRoundtripTest.java index 413762616..f6faae2e5 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListRoundtripTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListRoundtripTest.java @@ -3,14 +3,14 @@ import java.util.*; import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.*; public class ListRoundtripTest extends XmlTestBase { - @JacksonXmlRootElement(localName="parents") + @JsonRootName("parents") public static class Parents { @JacksonXmlElementWrapper(useWrapping=false) public List parent = new ArrayList(); @@ -46,8 +46,7 @@ public Prop(String name, String value) { } } - // For [Issue#58] - @JacksonXmlRootElement(localName = "point") + @JsonRootName("point") static class Point { @JacksonXmlProperty(localName = "x", isAttribute = true) int x; @@ -58,7 +57,7 @@ public Point() { } public Point(int x, int y) { this.x = x; this.y = y; } } - @JacksonXmlRootElement(localName = "Points") + @JsonRootName("Points") static class PointContainer { @JacksonXmlElementWrapper(useWrapping = false) @JacksonXmlProperty(localName = "point") diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListSerializationTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListSerializationTest.java index ade6fa04c..0135a2190 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListSerializationTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListSerializationTest.java @@ -2,8 +2,10 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; @@ -44,13 +46,35 @@ public StringListBean(String... texts) } } + // [dataformat-xml#148] + static class Bean148 { + @JsonProperty("item") + @JacksonXmlElementWrapper(localName = "list") + public Iterator items() { + return new Iterator() { + int item = 3; + + @Override + public boolean hasNext() { + return item > 0; + } + + @Override + public String next() { + item--; + return Integer.toString(item); + } + }; + } + } + /* /********************************************************** /* Unit tests /********************************************************** */ - private final XmlMapper MAPPER = new XmlMapper(); + private final XmlMapper MAPPER = newMapper(); public void testSimpleWrappedList() throws IOException { @@ -70,4 +94,11 @@ public void testStringList() throws IOException +"c" +"", xml); } + + // [dataformat-xml#148] + public void testIteratorSerialization() throws Exception + { + assertEquals("210", + MAPPER.writeValueAsString(new Bean148()).trim()); + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributes.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributes.java deleted file mode 100644 index 75e928c55..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributes.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.lists; - -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.dataformat.xml.*; -import com.fasterxml.jackson.dataformat.xml.annotation.*; - -public class ListWithAttributes extends XmlTestBase -{ - // [Issue#43] - static class Name { - @JacksonXmlProperty(isAttribute=true) - public String language; - - @JacksonXmlText - public String text; - -// public String data; - - public Name() { } - } - - static class RoomName { - @JacksonXmlElementWrapper(localName = "names", useWrapping=true) - @JsonProperty("name") - public List names; - } - - // [Issue#99]: allow skipping unknown properties - static class Root { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "value") - public List values; - } - - public static class Value { - @JacksonXmlProperty(isAttribute = true) - public int id; - } - - // [Issue#108]: unwrapped lists, more than one entry, id attributes - - static class Foo { - @JacksonXmlElementWrapper(useWrapping = false) - public List firstBar = new ArrayList(); - @JacksonXmlElementWrapper(useWrapping = false) - public List secondBar = new ArrayList(); - } - - static class Bar { - public String value; - - @JacksonXmlProperty(isAttribute = true) - public int id; - } - - /* - /********************************************************** - /* Test methods - /********************************************************** - */ - - // [Issue#43] - public void testIssue43() throws Exception - { - String xmlData = "" - +"SPECIAL" - +""; - - XmlMapper xmlMapper = new XmlMapper(); - RoomName roomName = xmlMapper.readValue(xmlData, RoomName.class); - assertEquals(1, roomName.names.size()); - assertEquals("SPECIAL", roomName.names.get(0).text); - } - - // [Issue#99]: allow skipping unknown properties - public void testListWithAttributes() throws Exception - { - String source = "" - + " " - + " " - + ""; - ObjectMapper mapper = new XmlMapper() - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); - Root root = mapper.readValue(source, Root.class); - assertNotNull(root.values); - assertEquals(1, root.values.size()); - } - - // [Issue#108]: unwrapped lists, more than one entry, id attributes - public void testIdsFromAttributes() throws Exception { - XmlMapper xmlMapper = new XmlMapper(); - Foo foo = new Foo(); - Bar bar1 = new Bar(); - bar1.id = 1; - bar1.value = "FIRST"; - foo.firstBar.add(bar1); - Bar bar2 = new Bar(); - bar2.value = "SECOND"; - bar2.id = 2; - foo.secondBar.add(bar2); - String string = xmlMapper.writeValueAsString(foo); - Foo fooRead = xmlMapper.readValue(string, Foo.class); - assertEquals(foo.secondBar.get(0).id, fooRead.secondBar.get(0).id); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributesDeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributesDeserTest.java new file mode 100644 index 000000000..ca8320af9 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/ListWithAttributesDeserTest.java @@ -0,0 +1,252 @@ +package com.fasterxml.jackson.dataformat.xml.lists; + +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.*; + +import com.fasterxml.jackson.dataformat.xml.*; +import com.fasterxml.jackson.dataformat.xml.annotation.*; + +public class ListWithAttributesDeserTest extends XmlTestBase +{ + // [dataformat-xml#43] + static class Name { + @JacksonXmlProperty(isAttribute=true) + public String language; + + @JacksonXmlText + public String text; + +// public String data; + + public Name() { } + } + + static class RoomName { + @JacksonXmlElementWrapper(localName = "names", useWrapping=true) + @JsonProperty("name") + public List names; + } + + // [dataformat-xml#99]: allow skipping unknown properties + static class Root { + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "value") + public List values; + } + + public static class Value { + @JacksonXmlProperty(isAttribute = true) + public int id; + } + + // [dataformat-xml#108]: unwrapped lists, more than one entry, id attributes + static class Foo { + @JacksonXmlElementWrapper(useWrapping = false) + public List firstBar = new ArrayList(); + @JacksonXmlElementWrapper(useWrapping = false) + public List secondBar = new ArrayList(); + } + + static class Bar { + public String value; + + @JacksonXmlProperty(isAttribute = true) + public int id; + } + + // [dataformat-xml#301]: mismatched attribute to skip + static class Parent301 { + @JacksonXmlProperty(localName = "MY_ATTR", isAttribute = true) + public String myAttribute; + + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "MY_PROPERTY") + public List childrenA = new ArrayList<>(); + + @JacksonXmlElementWrapper(useWrapping = false) + @JacksonXmlProperty(localName = "CHILDB") + public List childrenB = new ArrayList<>(); + + } + + static class ChildA301 { } + + @JsonIgnoreProperties(ignoreUnknown = true) + static class ChildB301 { + @JacksonXmlProperty(localName = "MY_PROPERTY") + public Double value; + } + + // [dataformat-xml#314] + static class Customer314 { + @JacksonXmlElementWrapper(localName = "Customer", useWrapping = false) + @JacksonXmlProperty(localName = "Address") + public List address; + } + + static class Address314 { + public String stateProv; + public CountryName314 countryName; + } + + static class CountryName314 { + public String code; + @JacksonXmlText + public String name; + } + + // [dataformat-xml#390] + @JsonRootName("many") + static class Many390 { + @JacksonXmlProperty(localName = "one") + @JacksonXmlElementWrapper(useWrapping = false) + List ones; + } + + static class One390 { + @JacksonXmlProperty + String value; + @JacksonXmlProperty + String another; + + public void setAnother(String s) { + another = s; + } + } + + /* + /********************************************************** + /* Test methods + /********************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + private final ObjectMapper UPPER_CASE_MAPPER = mapperBuilder() + .propertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE) + .build(); + + // [dataformat-xml#43] + public void testIssue43() throws Exception + { + String xmlData = "" + +"SPECIAL" + +""; + + RoomName roomName = MAPPER.readValue(xmlData, RoomName.class); + assertEquals(1, roomName.names.size()); + assertEquals("SPECIAL", roomName.names.get(0).text); + } + + // [dataformat-xml#99]: allow skipping unknown properties + public void testListWithAttributes() throws Exception + { + String source = "" + + " " + + " " + + ""; + ObjectReader r = MAPPER.readerFor(Root.class) + .without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + Root root = r.readValue(source, Root.class); + assertNotNull(root.values); + assertEquals(1, root.values.size()); + } + + // [dataformat-xml#108]: unwrapped lists, more than one entry, id attributes + public void testIdsFromAttributes() throws Exception { + Foo foo = new Foo(); + Bar bar1 = new Bar(); + bar1.id = 1; + bar1.value = "FIRST"; + foo.firstBar.add(bar1); + Bar bar2 = new Bar(); + bar2.value = "SECOND"; + bar2.id = 2; + foo.secondBar.add(bar2); + String string = MAPPER.writeValueAsString(foo); + Foo fooRead = MAPPER.readValue(string, Foo.class); + assertEquals(foo.secondBar.get(0).id, fooRead.secondBar.get(0).id); + } + + public void testIssue301WithAttr() throws Exception { + final String XML = + "" + + " " + + " 12.25" + + " " + + ""; + Parent301 result = MAPPER.readValue(XML, Parent301.class); + assertNotNull(result); + assertNotNull(result.childrenB); + assertEquals(1, result.childrenB.size()); + assertEquals(Double.valueOf(12.25), result.childrenB.get(0).value); + } + + // [dataformat-xml#314] + public void testDeser314Order1() throws Exception + { + String content = "" + + "\n" + + "
\n" + + " Niedersachsen\n" + + " Deutschland\n" + + "
\n" + + "
" + ; + Customer314 result = UPPER_CASE_MAPPER.readValue(content, Customer314.class); + assertNotNull(result); + } + + public void testDeser314Order2() throws Exception + { + String content = "" + + "\n" + + "
\n" + + " Deutschland\n" + + " Niedersachsen\n" + + "
\n" + + "
" + ; + Customer314 result = UPPER_CASE_MAPPER.readValue(content, Customer314.class); + assertNotNull(result); + } + + public void testDeser314Address() throws Exception + { + String content = "" + + "
\n" + + " Deutschland\n" + + " Niedersachsen\n" + + "
\n" + ; + Address314 result = UPPER_CASE_MAPPER.readValue(content, Address314.class); + assertNotNull(result); + } + + // [dataformat-xml#390] + public void testDeser390() throws Exception + { + String XML = "\n" + + " \n" + + " foo\n" + + " stuff\n" + + " \n" + + " \n" + + " foo2\n" + + " stuff2\n" + + " \n" + + ""; + Many390 many = MAPPER.readValue(XML, Many390.class); + assertNotNull(many.ones); +//System.err.println("XML:\n"+MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(many)); + assertEquals(2, many.ones.size()); + assertEquals("foo", many.ones.get(0).value); + assertEquals("stuff", many.ones.get(0).another); + assertEquals("foo2", many.ones.get(1).value); + assertEquals("stuff2", many.ones.get(1).another); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUnwrappedDeserIssue86.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists86Test.java similarity index 63% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUnwrappedDeserIssue86.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists86Test.java index 862809994..670e75e99 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/TestUnwrappedDeserIssue86.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedLists86Test.java @@ -1,18 +1,20 @@ -package com.fasterxml.jackson.dataformat.xml.failing; +package com.fasterxml.jackson.dataformat.xml.lists; import java.util.Arrays; import java.util.List; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.annotation.JsonInclude.Include; + import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -public class TestUnwrappedDeserIssue86 extends XmlTestBase +public class NestedUnwrappedLists86Test extends XmlTestBase { - @JacksonXmlRootElement(localName = "test") + @JsonRootName("test") public static class Issue86 { @JacksonXmlProperty(localName = "id", isAttribute = true) @@ -39,7 +41,17 @@ public boolean equals(final Object other) { } final Issue86 otherIssue86 = (Issue86) other; - return otherIssue86.id.equals(id) && otherIssue86.children.equals(children); + return Objects.equals(id, otherIssue86.id) + && Objects.deepEquals(children, otherIssue86.children); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{id='").append(id) + .append("', children=").append(children) + .append('}'); + return sb.toString(); } } @@ -48,20 +60,20 @@ public boolean equals(final Object other) { /* Test methods /*********************************************************************** */ - + public void testDeserializeUnwrappedListWhenLocalNameForRootElementAndXmlPropertyMatch() throws Exception { - final String source = - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + + final String sourceIndented = + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + ""; - + final String sourceCompact = sourceIndented.replaceAll("\n", ""); final Issue86 before = new Issue86("0", Arrays.asList(new Issue86("0.1", Arrays.asList(new Issue86("0.1.1", null))), @@ -74,11 +86,9 @@ public void testDeserializeUnwrappedListWhenLocalNameForRootElementAndXmlPropert mapper.setSerializationInclusion(Include.NON_NULL); final String xml = mapper.writeValueAsString(before); - assertEquals(source, xml); + assertEquals(sourceCompact, xml); - final Issue86 after = mapper.readValue(xml, Issue86.class); + final Issue86 after = mapper.readValue(sourceIndented, Issue86.class); assertEquals(before, after); } - - } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedListsTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedListsTest.java index cf71382ea..19104a771 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedListsTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/NestedUnwrappedListsTest.java @@ -3,7 +3,8 @@ import java.util.List; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; + import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; @@ -33,7 +34,7 @@ static class VehicleActivity { */ protected XmlMapper _xmlMapper = mapperBuilder() - .propertyNamingStrategy(new PropertyNamingStrategy.UpperCamelCaseStrategy()) + .propertyNamingStrategy(new PropertyNamingStrategies.UpperCamelCaseStrategy()) .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) .defaultUseWrapper(false) .build(); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList97Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/PolymorphicList97Test.java similarity index 94% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList97Test.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/lists/PolymorphicList97Test.java index 5ea3ca380..90dfdd7b2 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/failing/PolymorphicList97Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/PolymorphicList97Test.java @@ -1,9 +1,10 @@ -package com.fasterxml.jackson.dataformat.xml.failing; +package com.fasterxml.jackson.dataformat.xml.lists; + +import java.util.*; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; - -import java.util.*; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.*; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/RootListHandlingTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/RootListHandlingTest.java index 643949c22..d601314ea 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/RootListHandlingTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/RootListHandlingTest.java @@ -3,13 +3,13 @@ import java.util.*; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** * Tests for verifying that Lists (and arrays) can be serialized even @@ -17,7 +17,7 @@ */ public class RootListHandlingTest extends XmlTestBase { - @JacksonXmlRootElement(localName="SR") + @JsonRootName("SR") @JsonPropertyOrder({ "id", "name", "description" }) public static class SampleResource { private Long id; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/UnwrappedListsTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/UnwrappedListsTest.java index 6b6bfe7b3..4e2af61fb 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/UnwrappedListsTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/lists/UnwrappedListsTest.java @@ -38,7 +38,7 @@ static class DefaultList { public Value[] value; } - // [Issue#64] + // [dataformat-xml#64] static class Optionals { @JacksonXmlElementWrapper(useWrapping = false) public List optional; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/BadEncodingTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/BadEncodingTest.java new file mode 100644 index 000000000..aef424976 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/BadEncodingTest.java @@ -0,0 +1,25 @@ +package com.fasterxml.jackson.dataformat.xml.misc; + +import java.util.Map; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// [dataformat-xml#428]: problem with an encoding supported via JDK +public class BadEncodingTest extends XmlTestBase +{ +// private static final String xml = ""; + private static final String xml = ""; + + private final ObjectMapper XML_MAPPER = newMapper(); + + public void testEncoding() throws Exception { + final byte[] b = xml.getBytes("UTF-8"); + assertNotNull(XML_MAPPER.readValue(b, Map.class)); + +// try (InputStream in = new ByteArrayInputStream(b)) { +// XML_MAPPER.readValue(in, Map.class); +// } + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/NodeTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/NodeTest.java deleted file mode 100644 index ad87ac75a..000000000 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/NodeTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.fasterxml.jackson.dataformat.xml.misc; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.XmlTestBase; - -public class NodeTest extends XmlTestBase -{ - public void testMixed() throws Exception - { - final XmlMapper xmlMapper = new XmlMapper(); - final ObjectMapper jsonMapper = new ObjectMapper(); - - JsonNode root = xmlMapper.readTree("first4second"); - String json = jsonMapper.writeValueAsString(root); - - System.out.println("-> "+json); - } -} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/ObjectId104Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/ObjectId104Test.java index 171a55409..656f5d60d 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/ObjectId104Test.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/ObjectId104Test.java @@ -26,15 +26,15 @@ public IdWrapper(int v) { } static class ValueNode { - public List value= new ArrayList(); + public List value = new ArrayList(); public IdWrapper next; public ValueNode() { this(0); } public ValueNode(int v) { value.add(v); } } - - private final XmlMapper MAPPER = new XmlMapper(); - + + private final XmlMapper MAPPER = newMapper(); + // Another test to ensure ordering is not required (i.e. can do front references) public void testSimpleCollectionDeserWithForwardRefs() throws Exception { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java index c4b6e4078..59a8676bb 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameTest.java @@ -6,9 +6,13 @@ import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.PropertyName; + import com.fasterxml.jackson.dataformat.xml.*; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +// NOTE: even tho `@JacksonXmlRootElement` will be deprecated in near +// future (possibly in 2.13) -- to be replaced by `@JsonRootName` -- this +// test will use it to ensure we handle both annotations as expected public class RootNameTest extends XmlTestBase { static class RootBeanBase diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameWrapping374Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameWrapping374Test.java new file mode 100644 index 000000000..e7471722d --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/RootNameWrapping374Test.java @@ -0,0 +1,28 @@ +package com.fasterxml.jackson.dataformat.xml.misc; + +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.dataformat.xml.*; + +public class RootNameWrapping374Test extends XmlTestBase +{ + @JsonRootName("Root") + static class Root { + public int id = 1; + } + + private final XmlMapper MAPPER = mapperBuilder() + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .build(); + + public void testUnwrappedRoundTrip() throws Exception + { + String xml = MAPPER.writeValueAsString(new Root()); + assertEquals("1", xml); +//System.err.println("XML: "+xml); + Root result = MAPPER.readValue(xml, Root.class); + assertNotNull(result); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/TextValueTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/TextValueTest.java index bca6bd0a5..da2f87e98 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/TextValueTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/TextValueTest.java @@ -4,7 +4,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.databind.exc.MismatchedInputException; import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; @@ -138,8 +139,8 @@ public void testAlternateTextElementName() throws IOException try { MAPPER.readValue(XML, JAXBStyle.class); fail("Should have failed"); - } catch (JsonProcessingException e) { - verifyException(e, "Unrecognized"); + } catch (MismatchedInputException e) { + verifyException(e, "Cannot construct instance of"); } JacksonXmlModule module = new JacksonXmlModule(); module.setXMLTextElementName("value"); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeBasicDeserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeBasicDeserTest.java new file mode 100644 index 000000000..dfb373f28 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeBasicDeserTest.java @@ -0,0 +1,53 @@ +package com.fasterxml.jackson.dataformat.xml.node; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.node.JsonNodeType; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class JsonNodeBasicDeserTest extends XmlTestBase +{ + final private ObjectMapper XML_MAPPER = newMapper(); + + public void testSimpleNode() throws Exception + { + JsonNode root = XML_MAPPER.readTree(""); + assertTrue(root.isObject()); + assertEquals(1, root.size()); + assertEquals("123", root.get("attr").textValue()); + } + + // [dataformat-xml#403]: Allow sequences + public void testRepeated() throws Exception + { + JsonNode root = XML_MAPPER.readTree("ab"); + assertTrue(root.isObject()); + JsonNode arr = root.get("value"); + assertEquals(JsonNodeType.ARRAY, arr.getNodeType()); + assertTrue(arr.isArray()); + assertEquals(2, arr.size()); + assertEquals("a", root.at("/value/0").asText()); + assertEquals("b", root.at("/value/1").asText()); + } + + // [dataformat-xml#405]: support mixed content + public void testMixedContent() throws Exception + { + JsonNode fromXml = XML_MAPPER.readTree("first123secondabclast"); + final ObjectNode exp = XML_MAPPER.createObjectNode(); + exp.putArray("") + .add("first") + .add("second") + .add("last"); + exp.put("a", "123"); + exp.put("b", "abc"); + + if (!fromXml.equals(exp)) { + ObjectWriter w = new JsonMapper().writerWithDefaultPrettyPrinter(); + fail("Expected:\n"+w.writeValueAsString(exp)+"\ngot:\n"+w.writeValueAsString(fromXml)); + } + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeMixedContent403Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeMixedContent403Test.java new file mode 100644 index 000000000..a8426f976 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/node/JsonNodeMixedContent403Test.java @@ -0,0 +1,53 @@ +package com.fasterxml.jackson.dataformat.xml.node; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class JsonNodeMixedContent403Test extends XmlTestBase +{ + final private ObjectMapper XML_MAPPER = newMapper(); + + final private ObjectMapper JSON_MAPPER = new JsonMapper(); + + public void testMixedContentBefore() throws Exception + { + // First, before elements: + assertEquals(JSON_MAPPER.readTree(a2q("{'':'before','a':'1','b':'2'}")), + XML_MAPPER.readTree("before12")); + } + + public void testMixedContentBetween() throws Exception + { + // Second, between + assertEquals(JSON_MAPPER.readTree(a2q("{'a':'1','':'between','b':'2'}")), + XML_MAPPER.readTree("1between2")); + } + + public void testMixedContentAfter() throws Exception + { + // and then after + assertEquals(JSON_MAPPER.readTree(a2q("{'a':'1','b':'2','':'after'}")), + XML_MAPPER.readTree("12after")); + } + + public void testMultipleMixedContent() throws Exception + { + // and then after + assertEquals(JSON_MAPPER.readTree( + a2q("{'':['first','second','third'],'a':'1','b':'2'}")), + XML_MAPPER.readTree("first1second2third")); + } + + // [dataformat-xml#226] + public void testMixed226() throws Exception + { + final String XML = "\n" + +"mixed1 leaf" + +" mixed2\n" + +""; + assertEquals(JSON_MAPPER.readTree( + a2q("{'a':{'':['mixed1 ',' mixed2'],'b':'leaf'}}")), + XML_MAPPER.readTree(XML)); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/Base64VariantWriteTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/Base64VariantWriteTest.java new file mode 100644 index 000000000..bec34c9c2 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/Base64VariantWriteTest.java @@ -0,0 +1,97 @@ +package com.fasterxml.jackson.dataformat.xml.ser; + +import com.fasterxml.jackson.core.Base64Variant; +import com.fasterxml.jackson.core.Base64Variants; +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +import static org.junit.Assert.*; + +public class Base64VariantWriteTest extends XmlTestBase +{ + public static class BinaryValue { + public byte[] value; + + protected BinaryValue() { } + public BinaryValue(byte[] v) { + value = v; + } + } + + private final byte[] BINARY_DATA; + { + try { + BINARY_DATA = "abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890X".getBytes("UTF-8"); + } catch (Exception e) { + throw new Error(e); + } + } + + private final static String XML_MIME_NO_LINEFEEDS = +"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwWA=="; + + private final static String XML_MIME = +"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpamtsbW5vcHFyc3R1\n" ++"dnd4eXoxMjM0NTY3ODkwWA=="; + private final static String XML_MOD_FOR_URL = +"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwWA"; + private final static String XML_PEM = +"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpamts\n" ++"bW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwWA=="; + + private final XmlMapper MAPPER = newMapper(); + + public void testBinaryVariantsCompact() throws Exception + { + _testBinaryVariants(Base64Variants.MIME, XML_MIME, false); + + _testBinaryVariants(Base64Variants.MIME_NO_LINEFEEDS, XML_MIME_NO_LINEFEEDS, false); + _testBinaryVariants(Base64Variants.MODIFIED_FOR_URL, XML_MOD_FOR_URL, false); + _testBinaryVariants(Base64Variants.PEM, XML_PEM, false); + + // default pre-2.12 was "MIME", despite Jackson/json default of "MIME_NO_LINEFEEDS, + // so kept the same for 2.12 by changing XMLMapper defaults + _testBinaryVariants(null, XML_MIME, false); + } + + public void testBinaryVariantsPretty() throws Exception + { + _testBinaryVariants(Base64Variants.MIME, XML_MIME, true); + + _testBinaryVariants(Base64Variants.MIME_NO_LINEFEEDS, XML_MIME_NO_LINEFEEDS, true); + _testBinaryVariants(Base64Variants.MODIFIED_FOR_URL, XML_MOD_FOR_URL, true); + _testBinaryVariants(Base64Variants.PEM, XML_PEM, true); + + // default pre-2.12 was "MIME", despite Jackson/json default of "MIME_NO_LINEFEEDS, + // so kept the same for 2.12 by changing XMLMapper defaults + _testBinaryVariants(null, XML_MIME, true); + } + + private void _testBinaryVariants(Base64Variant b64v, String expEncoded, + boolean indent) throws Exception + { + ObjectWriter w = MAPPER.writer(); + if (indent) { + w = w.withDefaultPrettyPrinter(); + } + ObjectReader r = MAPPER.readerFor(BinaryValue.class); + if (b64v != null) { + w = w.with(b64v); + r = r.with(b64v); + } + final String EXP = indent ? + "\n "+expEncoded+"\n" : + ""+expEncoded+""; + final String xml = w.writeValueAsString(new BinaryValue(BINARY_DATA)).trim(); + +//System.err.println("EXP:\n"+EXP+"\nACT:\n"+xml+"\n"); + + assertEquals(EXP, xml); + + // and read back just for shirts & goggles + BinaryValue result = r.readValue(EXP); + assertArrayEquals(BINARY_DATA, result.value); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/CustomSerializerTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/CustomSerializerTest.java new file mode 100644 index 000000000..143a6a60e --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/CustomSerializerTest.java @@ -0,0 +1,36 @@ +package com.fasterxml.jackson.dataformat.xml.ser; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class CustomSerializerTest extends XmlTestBase +{ + @SuppressWarnings("serial") + static class CustomSerializer extends StdScalarSerializer + { + public CustomSerializer() { super(String.class); } + + @Override + public void serialize(String value, JsonGenerator jgen, + SerializerProvider provider) throws IOException { + jgen.writeString("custom:"+value); + } + } + + // for [dataformat-xml#41] + public void testCustomSerializer() throws Exception + { + SimpleModule module = new SimpleModule(); + module.addSerializer(String.class, new CustomSerializer()); + final XmlMapper mapper = XmlMapper.builder() + .addModule(module) + .build(); + assertEquals("custom:foo", mapper.writeValueAsString("foo")); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/EmptyPolymorphicTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/EmptyPolymorphicTest.java similarity index 89% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/misc/EmptyPolymorphicTest.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/ser/EmptyPolymorphicTest.java index 86df3421c..671c985f1 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/misc/EmptyPolymorphicTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/EmptyPolymorphicTest.java @@ -1,11 +1,11 @@ -package com.fasterxml.jackson.dataformat.xml.misc; +package com.fasterxml.jackson.dataformat.xml.ser; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -// test(s) for [dataformat-xml#111] +// test(s) for [dataformat-xml#169] public class EmptyPolymorphicTest extends XmlTestBase { static class Data { @@ -32,9 +32,9 @@ static class EmptyProxy implements Proxy { } /* Test methods /********************************************************** */ - - protected XmlMapper MAPPER = new XmlMapper(); - + + private final XmlMapper MAPPER = newMapper(); + public void testEmpty() throws Exception { String xml = MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(new Data("Foobar")); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/PolymorphicSerialization389Test.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/PolymorphicSerialization389Test.java new file mode 100644 index 000000000..be3b8d9b9 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/PolymorphicSerialization389Test.java @@ -0,0 +1,53 @@ +package com.fasterxml.jackson.dataformat.xml.ser; + +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +public class PolymorphicSerialization389Test extends XmlTestBase +{ + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") + @JsonSubTypes({ + @JsonSubTypes.Type(value = ConcreteModel.class, name = "ConcreteModel") + }) + public abstract class AbstractModel { + + @JacksonXmlProperty(isAttribute = true) + public Long id; + + @JacksonXmlProperty(isAttribute = true) + public String name; + } + + @JsonRootName("Concrete") + public class ConcreteModel extends AbstractModel { + @JacksonXmlProperty(isAttribute = true) + public String someAdditionalField; + } + + /* + /********************************************************** + /* Test methods + /********************************************************** + */ + + private final ObjectMapper MAPPER = newMapper(); + + // [dataformat-xml#389] + public void testIssue389() throws Exception + { + ConcreteModel concreteModel = new ConcreteModel(); + concreteModel.id = 1L; + concreteModel.name = "Bob"; + concreteModel.someAdditionalField = "..."; + + String xml1 = MAPPER.writeValueAsString(concreteModel); + String xml2 = MAPPER.writerFor(ConcreteModel.class) + .writeValueAsString(concreteModel); + assertEquals(xml1, xml2); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/RawValueSerializationTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/RawValueSerializationTest.java new file mode 100644 index 000000000..d7b811efd --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/RawValueSerializationTest.java @@ -0,0 +1,35 @@ +package com.fasterxml.jackson.dataformat.xml.ser; + +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRawValue; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// [dataformat-xml#269] +public class RawValueSerializationTest extends XmlTestBase +{ + @JsonPropertyOrder({ "id", "raw" }) + static class RawWrapper { + public int id = 42; + + @JsonRawValue + public String raw = "Mixed content"; + } + + /* + /******************************************************** + /* Test methods + /******************************************************** + */ + + private final XmlMapper MAPPER = newMapper(); + + public void testRawValueSerialization() throws Exception + { + assertEquals("" + +"42" + +"Mixed content" + +"", + MAPPER.writeValueAsString(new RawWrapper()).trim()); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestBinaryStreamToXMLSerialization.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestBinaryStreamToXMLSerialization.java index edcebcf2e..43526ad84 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestBinaryStreamToXMLSerialization.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestBinaryStreamToXMLSerialization.java @@ -11,7 +11,7 @@ */ public class TestBinaryStreamToXMLSerialization extends XmlTestBase { - private final XmlMapper MAPPER = new XmlMapper(); + private final XmlMapper MAPPER = newMapper(); public void testWith0Bytes() throws Exception { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestIndentation.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestIndentation.java index 9046b3a9a..67bac9466 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestIndentation.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestIndentation.java @@ -173,7 +173,7 @@ public void testMultiLevel172() throws Exception .with(ToXmlGenerator.Feature.WRITE_XML_DECLARATION) .writeValueAsString(root); // unify possible apostrophes to quotes - xml = aposToQuotes(xml); + xml = a2q(xml); // with indentation, should get linefeeds in prolog/epilog too assertEquals("\n" +"\n" diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestJDKSerializability.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestJDKSerializability.java index d7f6e8d76..d5962dfca 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestJDKSerializability.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestJDKSerializability.java @@ -4,12 +4,11 @@ import javax.xml.namespace.QName; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.dataformat.xml.XmlFactory; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; /** * Unit test related to core [Issue#31] (https://github.com/FasterXML/jackson-core/issues/31) @@ -17,7 +16,7 @@ */ public class TestJDKSerializability extends XmlTestBase { - @JacksonXmlRootElement(localName="MyPojo") + @JsonRootName("MyPojo") static class MyPojo { public int x; int y; diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestNamespaces.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestNamespaces.java index 356d19def..90bea4707 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestNamespaces.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestNamespaces.java @@ -1,5 +1,7 @@ package com.fasterxml.jackson.dataformat.xml.ser; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -7,32 +9,80 @@ public class TestNamespaces extends XmlTestBase { + final static String CHILD_NS = "uri:child"; + @JacksonXmlRootElement(localName="person", namespace="http://example.org/person" ) static class Person { private String name; - @JacksonXmlProperty(namespace = "http://example.org/person") + @JacksonXmlProperty(namespace = "http://example.org/personXML") public String getName() { return name; } public void setName(String name) { this.name = name; } } - + + // New with 2.12: `@JsonProperty` allows use of "namespace" too; also + // we test already existing (since 2.4) namespace support of + // `@JsonRootName` as well + @JsonRootName(value="person", namespace="http://example.org/person" ) + static class PersonWithRootName + { + private String name; + + @JsonProperty(namespace = "http://example.org/personJSON") + public String getName() { return name; } + public void setName(String name) { + this.name = name; + } + } + + static class Issue395 { + @JacksonXmlProperty(isAttribute = true, namespace = "http://www.w3.org/XML/1998/namespace", + localName = "lang") + public String lang = "en-US"; + } + + @JsonRootName("Root") + static class ChildWithNsXmlProp { + @JacksonXmlProperty(namespace = CHILD_NS, localName = "ChildXML") + public int child = 4; + } + + @JsonRootName("Root") + static class ChildWithNsJsonProp { + @JsonProperty(namespace = CHILD_NS, value = "ChildJSON") + public int child = 4; + } + /* /********************************************************** /* Unit tests /********************************************************** */ - - // [Issue-26]: should prefer the "default namespace" - public void testRootNamespace() throws Exception + + private final XmlMapper MAPPER = newMapper(); + + // [dataformat-xml#26]: should prefer the "default namespace" + public void testRootNamespaceOlder() throws Exception { Person person = new Person(); person.setName( "hello" ); - - XmlMapper xmlMapper = new XmlMapper(); - String xml = xmlMapper.writeValueAsString(person); + _verifyPerson(MAPPER, person); + } + + // and a variant with `@JsonRootName` + public void testRootNamespaceNewer() throws Exception + { + PersonWithRootName person = new PersonWithRootName(); + person.setName( "hello" ); + _verifyPerson(MAPPER, person); + } + + private void _verifyPerson(XmlMapper mapper, Object value) throws Exception + { + String xml = MAPPER.writeValueAsString(value); // should use "the default namespace"... final String PREFIX = "", xml.trim()); + } + + public void testXmlNamespaceWithXmlProp() throws Exception { + _verifyChild(MAPPER, new ChildWithNsXmlProp()); + } + + // Jackson 2.12 allows "namespace" with `@JsonProperty` too; verify + public void testXmlNamespaceWithJsonProp() throws Exception { + _verifyChild(MAPPER, new ChildWithNsJsonProp()); + } + + private void _verifyChild(XmlMapper mapper, Object value) throws Exception + { + String xml = MAPPER.writeValueAsString(value); + final String PREFIX = "<"; + if (!xml.startsWith(PREFIX)) { + fail("Expected XML to begin with '"+PREFIX+"', instead got: "+xml); + } + // but that's just a prereq... need actual namespace declaration next + String rest = xml.substring(PREFIX.length()).trim(); + rest = rest.substring(0, rest.indexOf('>')); + if (!rest.contains(CHILD_NS)) { + fail("Expected declaration for namespace '"+CHILD_NS + +"' in XML; do not see one in fragment: ["+rest+"]"); + } + } } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerialization.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerialization.java index ac85f660f..5f468fac6 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerialization.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerialization.java @@ -3,10 +3,7 @@ import java.io.*; import java.util.*; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer; -import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData; @@ -56,6 +53,12 @@ static class NsElemBean public String text = "blah"; } + static class NsElemBean2 + { + @JsonProperty(namespace="http://foo") + public String text = "blah"; + } + static class CDataStringBean { @JacksonXmlCData @@ -68,17 +71,6 @@ static class CDataStringArrayBean public String[] value = {" - { - public CustomSerializer() { super(String.class); } - - @Override - public void serialize(String value, JsonGenerator jgen, - SerializerProvider provider) throws IOException { - jgen.writeString("custom:"+value); - } - } - static class CustomMap extends LinkedHashMap { } /* @@ -87,7 +79,7 @@ static class CustomMap extends LinkedHashMap { } /********************************************************** */ - protected XmlMapper _xmlMapper = new XmlMapper(); + private final XmlMapper _xmlMapper = new XmlMapper(); public void testSimpleAttribute() throws IOException { @@ -103,6 +95,14 @@ public void testSimpleNsElem() throws IOException // here we assume woodstox automatic prefixes, not very robust but: assertEquals("blah", xml); } + + public void testSimpleNsElemWithJsonProp() throws IOException + { + String xml = _xmlMapper.writeValueAsString(new NsElemBean2()); + xml = removeSjsxpNamespace(xml); + // here we assume woodstox automatic prefixes, not very robust but: + assertEquals("blah", xml); + } public void testSimpleAttrAndElem() throws IOException { @@ -111,7 +111,6 @@ public void testSimpleAttrAndElem() throws IOException assertEquals("whatever", xml); } - @SuppressWarnings("boxing") public void testMap() throws IOException { // First, map in a general wrapper @@ -166,16 +165,7 @@ public void testCDataStringArray() throws IOException xml = removeSjsxpNamespace(xml); assertEquals("", xml); } - - // for [dataformat-xml#41] - public void testCustomSerializer() throws Exception - { - JacksonXmlModule module = new JacksonXmlModule(); - module.addSerializer(String.class, new CustomSerializer()); - XmlMapper xml = new XmlMapper(module); - assertEquals("custom:foo", xml.writeValueAsString("foo")); - } - + // manual 'test' to see "what would JAXB do?" /* public void testJAXB() throws Exception diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationAttr.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationAttr.java index cf0393e3b..518335a97 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationAttr.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationAttr.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; public class TestSerializationAttr extends XmlTestBase { @@ -18,7 +17,7 @@ static class NsAttrBean public String attr = "3"; } - @JacksonXmlRootElement(localName="test", namespace="http://root") + @JsonRootName(value="test", namespace="http://root") static class Issue19Bean { @JsonProperty @@ -37,7 +36,7 @@ public class Jurisdiction { protected int value = 13; } - @JacksonXmlRootElement(localName = "dynaBean", namespace = "") + @JsonRootName(value = "dynaBean", namespace = "") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "class", include = JsonTypeInfo.As.PROPERTY) public class DynaBean { private final Map _properties = new TreeMap(); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationManual.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationManual.java index 0daa1b95f..d088e25f8 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationManual.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestSerializationManual.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; public class TestSerializationManual extends XmlTestBase { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestXmlDeclaration.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestXmlDeclaration.java index 0c77d8541..5edc85625 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestXmlDeclaration.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestXmlDeclaration.java @@ -2,7 +2,6 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestBase; -import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; public class TestXmlDeclaration extends XmlTestBase { diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/XsiNilSerializationTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/XsiNilSerializationTest.java new file mode 100644 index 000000000..502a67886 --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/ser/XsiNilSerializationTest.java @@ -0,0 +1,49 @@ +package com.fasterxml.jackson.dataformat.xml.ser; + +import java.io.IOException; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +// [dataformat-xml#360] +public class XsiNilSerializationTest extends XmlTestBase +{ + static class WrapperBean + { + public T value; + + public WrapperBean() { } + public WrapperBean(T v) { value = v; } + } + + private final XmlMapper MAPPER = XmlMapper.builder() + .configure(ToXmlGenerator.Feature.WRITE_NULLS_AS_XSI_NIL, true) + .build(); + + // [dataformat-xml#360] + public void testNilPropertyNoIndent() throws IOException + { + assertEquals("", + MAPPER.writeValueAsString(new WrapperBean<>(null))); + } + + // [dataformat-xml#360] + public void testNilPropertyRoot() throws IOException + { + // Not sure root element name defined but... "" is what it is :) + assertEquals("", + MAPPER.writeValueAsString(null)); + } + + // [dataformat-xml#432] + public void testNilPropertyWithIndent() throws IOException + { + final String xml = MAPPER.writerWithDefaultPrettyPrinter() + .writeValueAsString(new WrapperBean<>(null)) + .trim(); + assertEquals( +"\n" ++" \n" ++"", xml); + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/FormatDetectionTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/FormatDetectionTest.java index 18a352ad5..299b7fa8b 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/FormatDetectionTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/FormatDetectionTest.java @@ -34,85 +34,82 @@ static class ListPOJO { /* Test methods, success /********************************************************** */ + + private final XmlFactory XML_F = new XmlFactory(); public void testSimpleValidXmlDecl() throws Exception { - XmlFactory f = new XmlFactory(); - DataFormatDetector detector = new DataFormatDetector(f); + DataFormatDetector detector = new DataFormatDetector(XML_F); String XML = ""; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(XML.getBytes("UTF-8"))); assertTrue(matcher.hasMatch()); assertEquals("XML", matcher.getMatchedFormatName()); - assertSame(f, matcher.getMatch()); + assertSame(XML_F, matcher.getMatch()); assertEquals(MatchStrength.FULL_MATCH, matcher.getMatchStrength()); // ensure we could build a parser... - JsonParser jp = matcher.createParserWithMatch(); - assertToken(JsonToken.START_OBJECT, jp.nextToken()); - jp.close(); + try (JsonParser p = matcher.createParserWithMatch()) { + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + } } public void testSimpleValidRoot() throws Exception { - XmlFactory f = new XmlFactory(); - DataFormatDetector detector = new DataFormatDetector(f); + DataFormatDetector detector = new DataFormatDetector(XML_F); String XML = ""; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(XML.getBytes("UTF-8"))); assertTrue(matcher.hasMatch()); assertEquals("XML", matcher.getMatchedFormatName()); - assertSame(f, matcher.getMatch()); + assertSame(XML_F, matcher.getMatch()); assertEquals(MatchStrength.SOLID_MATCH, matcher.getMatchStrength()); // ensure we could build a parser... - JsonParser jp = matcher.createParserWithMatch(); - assertToken(JsonToken.START_OBJECT, jp.nextToken()); - jp.close(); + try (JsonParser p = matcher.createParserWithMatch()) { + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + } } public void testSimpleValidDoctype() throws Exception { - XmlFactory f = new XmlFactory(); - DataFormatDetector detector = new DataFormatDetector(f); + DataFormatDetector detector = new DataFormatDetector(XML_F); String XML = " "; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(XML.getBytes("UTF-8"))); assertTrue(matcher.hasMatch()); assertEquals("XML", matcher.getMatchedFormatName()); - assertSame(f, matcher.getMatch()); + assertSame(XML_F, matcher.getMatch()); assertEquals(MatchStrength.SOLID_MATCH, matcher.getMatchStrength()); // ensure we could build a parser... - JsonParser jp = matcher.createParserWithMatch(); - assertToken(JsonToken.START_OBJECT, jp.nextToken()); - jp.close(); + try (JsonParser p = matcher.createParserWithMatch()) { + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + } } - + public void testSimpleValidComment() throws Exception { - XmlFactory f = new XmlFactory(); - DataFormatDetector detector = new DataFormatDetector(f); - String XML = " "; + DataFormatDetector detector = new DataFormatDetector(XML_F); + String XML = " "; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(XML.getBytes("UTF-8"))); assertTrue(matcher.hasMatch()); assertEquals("XML", matcher.getMatchedFormatName()); - assertSame(f, matcher.getMatch()); + assertSame(XML_F, matcher.getMatch()); assertEquals(MatchStrength.SOLID_MATCH, matcher.getMatchStrength()); // ensure we could build a parser... - JsonParser jp = matcher.createParserWithMatch(); - assertToken(JsonToken.START_OBJECT, jp.nextToken()); - jp.close(); + try (JsonParser p = matcher.createParserWithMatch()) { + assertToken(JsonToken.START_OBJECT, p.nextToken()); + } } public void testSimpleValidPI() throws Exception { - XmlFactory f = new XmlFactory(); - DataFormatDetector detector = new DataFormatDetector(f); - String XML = ""; + DataFormatDetector detector = new DataFormatDetector(XML_F); + String XML = ""; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(XML.getBytes("UTF-8"))); assertTrue(matcher.hasMatch()); assertEquals("XML", matcher.getMatchedFormatName()); - assertSame(f, matcher.getMatch()); + assertSame(XML_F, matcher.getMatch()); assertEquals(MatchStrength.SOLID_MATCH, matcher.getMatchStrength()); // ensure we could build a parser... - JsonParser jp = matcher.createParserWithMatch(); - assertToken(JsonToken.START_OBJECT, jp.nextToken()); - jp.close(); + try (JsonParser p = matcher.createParserWithMatch()) { + assertToken(JsonToken.START_OBJECT, p.nextToken()); + } } public void testSimpleViaObjectReader() throws Exception @@ -128,7 +125,7 @@ public void testSimpleViaObjectReader() throws Exception assertEquals(1, pojo.x); assertEquals(3, pojo.y); } - + public void testListViaObjectReader() throws Exception { ObjectMapper mapper = new ObjectMapper(); @@ -154,7 +151,7 @@ public void testListViaObjectReader() throws Exception public void testSimpleInvalid() throws Exception { - DataFormatDetector detector = new DataFormatDetector(new XmlFactory()); + DataFormatDetector detector = new DataFormatDetector(XML_F); final String NON_XML = "{\"foo\":\"bar\"}"; DataFormatMatcher matcher = detector.findFormat(new ByteArrayInputStream(NON_XML.getBytes("UTF-8"))); // should not have match @@ -164,5 +161,4 @@ public void testSimpleInvalid() throws Exception // also: assertNull(matcher.createParserWithMatch()); } - } diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/StreamCapabilitiesTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/StreamCapabilitiesTest.java new file mode 100644 index 000000000..f152ca6ff --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/StreamCapabilitiesTest.java @@ -0,0 +1,21 @@ +package com.fasterxml.jackson.dataformat.xml.stream; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.StreamReadCapability; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.XmlTestBase; + +public class StreamCapabilitiesTest extends XmlTestBase +{ + private final XmlMapper MAPPER = newMapper(); + + public void testReadCapabilities() throws Exception + { + try (JsonParser p = MAPPER.createParser("")) { + assertTrue(p.getReadCapabilities().isEnabled(StreamReadCapability.DUPLICATE_PROPERTIES)); + assertTrue(p.getReadCapabilities().isEnabled(StreamReadCapability.SCALARS_AS_OBJECTS)); + assertTrue(p.getReadCapabilities().isEnabled(StreamReadCapability.UNTYPED_SCALARS)); + } + } +} diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlGeneratorTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlGeneratorTest.java index 5d3d20a12..f6ff0f882 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlGeneratorTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlGeneratorTest.java @@ -12,11 +12,12 @@ public class XmlGeneratorTest extends XmlTestBase { + private final XmlFactory XML_F = new XmlFactory(); + public void testSimpleElement() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -30,11 +31,37 @@ public void testSimpleElement() throws Exception assertEquals("value", xml); } + public void testNullValuedElement() throws Exception + { + // First explicitly written + StringWriter out = new StringWriter(); + ToXmlGenerator gen = XML_F.createGenerator(out); + gen.setNextName(new QName("root")); + gen.writeStartObject(); + gen.writeFieldName("elem"); + gen.writeNull(); + gen.writeEndObject(); + gen.close(); + String xml = removeSjsxpNamespace(out.toString()); + assertEquals("", xml); + + // and then indirectly (see [dataformat-xml#413]) + out = new StringWriter(); + gen = XML_F.createGenerator(out); + gen.setNextName(new QName("root")); + gen.writeStartObject(); + gen.writeFieldName("elem"); + gen.writeString((String) null); + gen.writeEndObject(); + gen.close(); + xml = removeSjsxpNamespace(out.toString()); + assertEquals("", xml); + } + public void testSimpleAttribute() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -52,9 +79,8 @@ public void testSimpleAttribute() throws Exception public void testSecondLevelAttribute() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); gen.setNextName(new QName("root")); gen.writeStartObject(); gen.writeFieldName("elem"); @@ -74,9 +100,8 @@ public void testSecondLevelAttribute() throws Exception public void testAttrAndElem() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); gen.setNextName(new QName("root")); gen.writeStartObject(); // and also need to force attribute @@ -109,9 +134,8 @@ public void testWriteToFile() throws Exception public void testRawSimpleValue() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -127,9 +151,8 @@ public void testRawSimpleValue() throws Exception public void testRawOffsetValue() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -145,9 +168,8 @@ public void testRawOffsetValue() throws Exception public void testRawCharArrayValue() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -163,9 +185,8 @@ public void testRawCharArrayValue() throws Exception public void testRawSimpleAttribute() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -183,9 +204,8 @@ public void testRawSimpleAttribute() throws Exception public void testRawOffsetAttribute() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); @@ -203,9 +223,8 @@ public void testRawOffsetAttribute() throws Exception public void testRawCharArratAttribute() throws Exception { - XmlFactory f = new XmlFactory(); StringWriter out = new StringWriter(); - ToXmlGenerator gen = f.createGenerator(out); + ToXmlGenerator gen = XML_F.createGenerator(out); // root name is special, need to be fed first: gen.setNextName(new QName("root")); gen.writeStartObject(); diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserTest.java index 90e3233fd..9cadd8774 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlParserTest.java @@ -3,7 +3,7 @@ import java.io.*; import com.fasterxml.jackson.core.*; - +import com.fasterxml.jackson.core.JsonParser.NumberType; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -29,29 +29,103 @@ public void setUp() throws Exception { /* /********************************************************** - /* Unit tests + /* Unit tests, simplest/manual /********************************************************** */ public void testSimplest() throws Exception { - assertEquals("{\"leaf\":\"abc\"}", - _readXmlWriteJson("abc")); + final String XML = "abc"; + // -> "{\"leaf\":\"abc\"}" + + try (JsonParser p = _xmlMapper.createParser(XML)) { + assertToken(JsonToken.START_OBJECT, p.nextToken()); + assertToken(JsonToken.FIELD_NAME, p.nextToken()); + assertEquals("leaf", p.currentName()); + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + assertEquals("abc", p.getText()); + assertToken(JsonToken.END_OBJECT, p.nextToken()); + assertNull(p.nextToken()); + } } public void testSimpleWithEmpty() throws Exception { // 21-Jun-2017, tatu: Depends on setting actually... - XmlFactory f = new XmlFactory(); - - f.enable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL); - assertEquals("{\"leaf\":null}", - _readXmlWriteJson(f, "")); - f.disable(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL); - assertEquals("{\"leaf\":\"\"}", - _readXmlWriteJson(f, "")); + + final String XML = ""; + + // -> "{"leaf":null}" + try (JsonParser p = _xmlMapper.reader().with(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .createParser(XML)) { + assertTrue(((FromXmlParser) p).isEnabled(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL)); + assertToken(JsonToken.START_OBJECT, p.nextToken()); + assertToken(JsonToken.FIELD_NAME, p.nextToken()); + assertEquals("leaf", p.currentName()); + assertToken(JsonToken.VALUE_NULL, p.nextToken()); + assertToken(JsonToken.END_OBJECT, p.nextToken()); + assertNull(p.nextToken()); + } + + // -> "{"leaf":""}" + try (JsonParser p = _xmlMapper.reader().without(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL) + .createParser(XML)) { + assertFalse(((FromXmlParser) p).isEnabled(FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL)); + assertToken(JsonToken.START_OBJECT, p.nextToken()); + assertToken(JsonToken.FIELD_NAME, p.nextToken()); + assertEquals("leaf", p.currentName()); + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + assertEquals("", p.getText()); + assertToken(JsonToken.END_OBJECT, p.nextToken()); + assertNull(p.nextToken()); + } } + /** + * Test that verifies coercion of a "simple" cdata segment within root element + * as matching scalar token, similar to how other elements work. + */ + public void testRootScalar() throws Exception + { + // 02-Jul-2020, tatu: Does not work quite yet + final String XML = "value"; + try (JsonParser p = _xmlMapper.createParser(XML)) { + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + assertEquals("value", p.getText()); + assertNull(p.nextToken()); + // should be ok to call again tho + assertNull(p.nextToken()); + } + } + + public void testRootMixed() throws Exception + { + // 02-Jul-2020, tatu: Does not work quite yet + final String XML = "valueabc"; + try (JsonParser p = _xmlMapper.createParser(XML)) { + assertToken(JsonToken.START_OBJECT, p.nextToken()); + + assertToken(JsonToken.FIELD_NAME, p.nextToken()); + assertEquals("", p.currentName()); + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + assertEquals("value", p.getText()); + + assertToken(JsonToken.FIELD_NAME, p.nextToken()); + assertEquals("child", p.currentName()); + assertToken(JsonToken.VALUE_STRING, p.nextToken()); + assertEquals("abc", p.getText()); + + assertToken(JsonToken.END_OBJECT, p.nextToken()); + assertNull(p.nextToken()); + } + } + + /* + /********************************************************** + /* Unit tests, slightly bigger, automated + /********************************************************** + */ + public void testSimpleNested() throws Exception { assertEquals("{\"a\":{\"b\":{\"c\":\"xyz\"}}}", @@ -76,7 +150,7 @@ public void testRoundTripWithSample() throws Exception // Former could be worked around; latter less so at this point. // So, for now, let's just do sort of minimal verification, manually - JsonParser p = _xmlMapper.getFactory().createParser(xml); + JsonParser p = _xmlMapper.createParser(xml); assertToken(JsonToken.START_OBJECT, p.nextToken()); // main object @@ -181,7 +255,7 @@ public void testForceElementAsArray() throws Exception xp.close(); // And then with array handling: - xp = (FromXmlParser) _xmlFactory.createParser(new StringReader(XML)); + xp = (FromXmlParser) _xmlMapper.createParser(XML); assertTrue(xp.getParsingContext().inRoot()); assertToken(JsonToken.START_OBJECT, xp.nextToken()); // @@ -224,7 +298,7 @@ public void testXmlAttributes() throws Exception { final String XML = ""; - FromXmlParser xp = (FromXmlParser) _xmlFactory.createParser(new StringReader(XML)); + FromXmlParser xp = (FromXmlParser) _xmlMapper.createParser(XML); // First: verify handling without forcing array handling: assertToken(JsonToken.START_OBJECT, xp.nextToken()); // @@ -251,6 +325,50 @@ public void testXmlAttributes() throws Exception xp.close(); } + public void testMixedContent() throws Exception + { + String exp = a2q("{'':'first','a':'123','':'second','b':'456','':'last'}"); + String result = _readXmlWriteJson("first123second456last"); + +//System.err.println("result = \n"+result); + assertEquals(exp, result); + } + + public void testInferredNumbers() throws Exception + { + final String XML = "123456789012"; + + FromXmlParser xp = (FromXmlParser) _xmlMapper.createParser(XML); + + // First: verify handling without forcing array handling: + assertToken(JsonToken.START_OBJECT, xp.nextToken()); // + assertToken(JsonToken.FIELD_NAME, xp.nextToken()); // @value1 + assertEquals("value1", xp.currentName()); + assertToken(JsonToken.VALUE_STRING, xp.nextToken()); + assertFalse(xp.isExpectedNumberIntToken()); + assertEquals("abc", xp.getText()); + + assertToken(JsonToken.FIELD_NAME, xp.nextToken()); // @value2 + assertEquals("value2", xp.getCurrentName()); + assertToken(JsonToken.VALUE_STRING, xp.nextToken()); + assertTrue(xp.isExpectedNumberIntToken()); + assertEquals(JsonToken.VALUE_NUMBER_INT, xp.currentToken()); + assertEquals(NumberType.INT, xp.getNumberType()); + assertEquals(42, xp.getIntValue()); + + assertToken(JsonToken.FIELD_NAME, xp.nextToken()); // implicit for text + assertEquals("", xp.getCurrentName()); + + assertToken(JsonToken.VALUE_STRING, xp.nextToken()); + assertTrue(xp.isExpectedNumberIntToken()); + assertEquals(JsonToken.VALUE_NUMBER_INT, xp.currentToken()); + assertEquals(NumberType.LONG, xp.getNumberType()); + assertEquals(123456789012L, xp.getLongValue()); + + assertToken(JsonToken.END_OBJECT, xp.nextToken()); // + xp.close(); + } + /* /********************************************************** /* Helper methods diff --git a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStreamTest.java b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlTokenStreamTest.java similarity index 61% rename from src/test/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStreamTest.java rename to src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlTokenStreamTest.java index 22e2efa40..2c2860f8f 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStreamTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlTokenStreamTest.java @@ -1,4 +1,4 @@ -package com.fasterxml.jackson.dataformat.xml.deser; +package com.fasterxml.jackson.dataformat.xml.stream; import java.io.*; @@ -20,7 +20,8 @@ public void testSimple() throws Exception sr.nextTag(); XmlTokenStream tokens = new XmlTokenStream(sr, XML, FromXmlParser.Feature.collectDefaults()); - assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.getCurrentToken()); + tokens.initialize(); + assertEquals(XmlTokenStream.XML_DELAYED_START_ELEMENT, tokens.getCurrentToken()); assertEquals("root", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); assertEquals("leaf", tokens.getLocalName()); @@ -31,7 +32,10 @@ public void testSimple() throws Exception assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); assertEquals("abc", tokens.getText()); assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + // 23-May-2020, tatu: Not known for END_ELEMENT, alas, so: + assertEquals("", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + assertEquals("", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_END, tokens.next()); } @@ -55,6 +59,7 @@ public void _testRootAttributes(boolean emptyAsNull) throws Exception f &= ~FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL.getMask(); } XmlTokenStream tokens = new XmlTokenStream(sr, XML, f); + tokens.initialize(); assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.getCurrentToken()); assertEquals("root", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_ATTRIBUTE_NAME, tokens.next()); @@ -88,7 +93,8 @@ private void _testEmptyTags(boolean emptyAsNull) throws Exception f &= ~FromXmlParser.Feature.EMPTY_ELEMENT_AS_NULL.getMask(); } XmlTokenStream tokens = new XmlTokenStream(sr, XML, f); - assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.getCurrentToken()); + tokens.initialize(); + assertEquals(XmlTokenStream.XML_DELAYED_START_ELEMENT, tokens.getCurrentToken()); assertEquals("root", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); assertEquals("leaf", tokens.getLocalName()); @@ -108,7 +114,8 @@ public void testNested() throws Exception sr.nextTag(); XmlTokenStream tokens = new XmlTokenStream(sr, XML, FromXmlParser.Feature.collectDefaults()); - assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.getCurrentToken()); + tokens.initialize(); + assertEquals(XmlTokenStream.XML_DELAYED_START_ELEMENT, tokens.getCurrentToken()); assertEquals("root", tokens.getLocalName()); assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); assertEquals("a", tokens.getLocalName()); @@ -124,5 +131,68 @@ public void testNested() throws Exception assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); assertEquals(XmlTokenStream.XML_END, tokens.next()); } - + + // For [dataformat-xml#402] + public void testMixedContentBetween() throws Exception + { + String XML = "first123 and second abc\n"; + XMLStreamReader sr = _staxInputFactory.createXMLStreamReader(new StringReader(XML)); + sr.nextTag(); + XmlTokenStream tokens = new XmlTokenStream(sr, XML, FromXmlParser.Feature.collectDefaults()); + tokens.initialize(); + + assertEquals(XmlTokenStream.XML_DELAYED_START_ELEMENT, tokens.getCurrentToken()); + assertEquals("root", tokens.getLocalName()); + + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("first", tokens.getText()); + + assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); + assertEquals("a", tokens.getLocalName()); + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("123", tokens.getText()); + assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals(" and second ", tokens.getText()); + + assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); + assertEquals("b", tokens.getLocalName()); + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("abc", tokens.getText()); + assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + + assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + assertEquals(XmlTokenStream.XML_END, tokens.next()); + sr.close(); + } + + // For [dataformat-xml#402] + public void testMixedContentAfter() throws Exception + { + String XML = "first123last & final"; + XMLStreamReader sr = _staxInputFactory.createXMLStreamReader(new StringReader(XML)); + sr.nextTag(); + XmlTokenStream tokens = new XmlTokenStream(sr, XML, FromXmlParser.Feature.collectDefaults()); + tokens.initialize(); + + assertEquals(XmlTokenStream.XML_DELAYED_START_ELEMENT, tokens.getCurrentToken()); + assertEquals("root", tokens.getLocalName()); + + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("first", tokens.getText()); + + assertEquals(XmlTokenStream.XML_START_ELEMENT, tokens.next()); + assertEquals("a", tokens.getLocalName()); + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("123", tokens.getText()); + assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + + assertEquals(XmlTokenStream.XML_TEXT, tokens.next()); + assertEquals("last & final", tokens.getText()); + + assertEquals(XmlTokenStream.XML_END_ELEMENT, tokens.next()); + assertEquals(XmlTokenStream.XML_END, tokens.next()); + sr.close(); + } }