Package org.apache.juneau.marshall.xml
Class XmlSerializerSession.Builder<SELF extends XmlSerializerSession.Builder<SELF>>
java.lang.Object
org.apache.juneau.marshall.ContextSession.Builder<SELF>
org.apache.juneau.marshall.MarshallingSession.Builder<SELF>
org.apache.juneau.marshall.MarshallingTraverseSession.Builder<SELF>
org.apache.juneau.marshall.serializer.SerializerSession.Builder<SELF>
org.apache.juneau.marshall.serializer.WriterSerializerSession.Builder<SELF>
org.apache.juneau.marshall.xml.XmlSerializerSession.Builder<SELF>
- Direct Known Subclasses:
HtmlSerializerSession.Builder,SoapXmlSerializerSession.Builder,XmlDocSerializerSession.Builder,XmlSerializerSession.DefaultBuilder
- Enclosing class:
- XmlSerializerSession
public abstract static class XmlSerializerSession.Builder<SELF extends XmlSerializerSession.Builder<SELF>>
extends WriterSerializerSession.Builder<SELF>
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNamespaceUrisToRoot(boolean value) Add namespace URLs to the root element.autoDetectNamespaces(boolean value) Auto-detect namespace usage.build()Build the object.defaultNamespace(String value) Default namespace.enableNamespaces(boolean value) Enable support for XML namespaces.Adds a property to this session.textNodeDelimiter(String value) Text node delimiter.Methods inherited from class org.apache.juneau.marshall.serializer.WriterSerializerSession.Builder
maxIndent, quoteChar, streamCharset, useWhitespaceMethods inherited from class org.apache.juneau.marshall.serializer.SerializerSession.Builder
addBeanTypes, addRootType, javaMethod, keepNullProperties, nonDefault, resolver, schema, schemaDefault, sortCollections, sortMaps, trimEmptyCollections, trimEmptyMaps, trimStrings, uriContextMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseSession.Builder
initialDepthMethods inherited from class org.apache.juneau.marshall.MarshallingSession.Builder
activeView, locale, mediaType, mediaTypeDefault, timeZone, timeZoneDefaultMethods inherited from class org.apache.juneau.marshall.ContextSession.Builder
apply, cvt, debug, properties, self, unmodifiable
-
Constructor Details
-
Builder
Constructor- Parameters:
ctx- The context creating this session.
Cannot benull .
-
-
Method Details
-
build
Description copied from class:MarshallingSession.BuilderBuild the object.- Overrides:
buildin classWriterSerializerSession.Builder<SELF extends XmlSerializerSession.Builder<SELF>>- Returns:
- The built object.
-
addNamespaceUrisToRoot
Add namespace URLs to the root element.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
autoDetectNamespaces
Auto-detect namespace usage.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
defaultNamespace
Default namespace.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
enableNamespaces
Enable support for XML namespaces.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
textNodeDelimiter
Text node delimiter.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
property
Description copied from class:ContextSession.BuilderAdds a property to this session.If the key matches a known session property (e.g.
"debug" or"ContextSession.debug" ), the value is converted viaBasicConverterand routed to the corresponding typed setter. Unknown keys are stored in the raw session properties map.- Overrides:
propertyin classWriterSerializerSession.Builder<SELF extends XmlSerializerSession.Builder<SELF>>- Parameters:
key- The property key.
Cannot benull .value- The property value.
Can benull (resets typed properties to their default; removes raw properties).- Returns:
- This object.
-