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.
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.
|
protected int |
getMaxIndent()
Returns the
Serializer.SERIALIZER_maxIndent setting value for this session. |
protected char |
getQuoteChar()
Returns the
Serializer.SERIALIZER_quoteChar setting value for this session. |
Validator |
getValidator(SerializerPipe out,
Object o)
Returns an XML-Schema validator based on the output returned by
doSerialize(SerializerPipe, Object) ; |
protected boolean |
isTrimStrings()
Returns the
Serializer.SERIALIZER_trimStrings setting value for this session. |
protected boolean |
isUseWhitespace()
Returns the
Serializer.SERIALIZER_useWhitespace setting value for this session. |
asMap, findNsfMappings, getXmlWriter, isAddBeanTypeProperties, isHtmlMode, serializeAnything
isWriterSerializer, serialize
canIgnoreValue, createBeanTypeNameProperty, createPipe, generalize, getBeanTypeName, getExpectedRootType, getInitialDepth, getJavaMethod, getLastLocation, getListener, getListener, getMaxDepth, getResponseHeaders, getUriResolver, isDetectRecursions, isIgnoreRecursions, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimNulls, onBeanGetterException, onError, pop, push, relativizeUri, resolveUri, serialize, setCurrentClass, setCurrentProperty, sort, sort, toList, toString, trim, willRecurse
_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanMeta, getBeanRegistry, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getLocale, getMediaType, getStringBuilder, getTimeZone, isBean, isBean, isDebug, isIgnoreUnknownBeanProperties, newBean, newBean, newBeanMap, newBeanMap, newInstance, newInstance, newInstanceFromOuter, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, 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 Exception
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.Exception
- If thrown from underlying stream, or if the input contains a syntax error or is malformed.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 isUseWhitespace()
SerializerSession
Serializer.SERIALIZER_useWhitespace
setting value for this session.isUseWhitespace
in class SerializerSession
Serializer.SERIALIZER_useWhitespace
setting value for this session.protected int getMaxIndent()
SerializerSession
Serializer.SERIALIZER_maxIndent
setting value for this session.getMaxIndent
in class SerializerSession
Serializer.SERIALIZER_maxIndent
setting value for this session.protected boolean isTrimStrings()
SerializerSession
Serializer.SERIALIZER_trimStrings
setting value for this session.isTrimStrings
in class SerializerSession
Serializer.SERIALIZER_trimStrings
setting value for this session.protected char getQuoteChar()
SerializerSession
Serializer.SERIALIZER_quoteChar
setting value for this session.getQuoteChar
in class SerializerSession
Serializer.SERIALIZER_quoteChar
setting value for this session.Copyright © 2018 Apache. All rights reserved.