public class XmlSchemaSerializerSession extends XmlSerializerSession
XmlSchemaSerializer
.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused within the same thread.
XmlSerializerSession.ContentResult
indent
Modifier | Constructor and Description |
---|---|
protected |
XmlSchemaSerializerSession(XmlSerializer ctx,
SerializerSessionArgs args)
Create a new session using properties specified in the context.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doSerialize(SerializerPipe out,
Object o)
Serializes a POJO to the specified output stream or writer.
|
Validator |
getValidator(SerializerPipe out,
Object o)
Returns an XML-Schema validator based on the output returned by
doSerialize(SerializerPipe, Object) ; |
protected boolean |
isTrimStrings()
Configuration property: Trim strings.
|
ObjectMap |
toMap()
Returns the properties defined on this bean context as a simple map for debugging purposes.
|
findNsfMappings, getDefaultNamespace, getNamespaces, getXmlWriter, getXsNamespace, isAddBeanTypes, isAddNamespaceUrisToRoot, isAutoDetectNamespaces, isEnableNamespaces, isHtmlMode, serializeAnything
createPipe, getMaxIndent, getQuoteChar, isUseWhitespace, isWriterSerializer, serialize, serializeToString
canIgnoreValue, createBeanTypeNameProperty, createDefaultVarResolverSession, generalize, getBeanTypeName, getExpectedRootType, getJavaMethod, getListener, getListener, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, getUriResolver, getVarResolver, isAddRootType, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimNullProperties, onBeanGetterException, onError, push2, relativizeUri, resolve, resolveUri, serialize, sort, sort, swap, toList, toString, trim, varSessionObject
getInitialDepth, getLastLocation, getMaxDepth, getStack, isDetectRecursions, isIgnoreRecursions, pop, push, setCurrentClass, setCurrentProperty, willRecurse
_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionaryClasses, getBeanFieldVisibility, getBeanFilters, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getExamples, getExcludeProperties, getImplClasses, getIncludeProperties, getLocale, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPojoSwaps, getPropertyNamer, getSchema, getStringBuilder, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isDebug, isFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnorePropertiesWithoutSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasProperty, hasWarnings, toString
protected XmlSchemaSerializerSession(XmlSerializer ctx, SerializerSessionArgs args)
ctx
- The context creating this session object.
The context contains all the configuration settings for this object.args
- Runtime arguments.
These specify session-level information such as locale and URI context.
It also include session-level properties that override the properties defined on the bean and
serializer contexts.protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException
SerializerSession
This method should NOT close the context object.
doSerialize
in class XmlSerializerSession
out
- Where to send the output from the serializer.o
- The object to serialize.IOException
- Thrown by underlying stream.SerializeException
- Problem occurred trying to serialize object.public Validator getValidator(SerializerPipe out, Object o) throws Exception
doSerialize(SerializerPipe, Object)
;out
- The target writer.o
- The object to serialize.Exception
- If a problem was detected in the XML-Schema output produced by this serializer.protected boolean isTrimStrings()
SerializerSession
isTrimStrings
in class SerializerSession
String.trim()
before being serialized.Serializer.SERIALIZER_trimStrings
public ObjectMap toMap()
Session
toMap
in class XmlSerializerSession
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.