|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.sandbox.xmlutilities.OutputFormat.Builder
public static final class OutputFormat.Builder
Builder for declarative construction of OutputFormat
.
Field Summary | |
---|---|
private OutputFormat |
outputFormat
Under-layering output format. |
Constructor Summary | |
---|---|
private |
OutputFormat.Builder(OutputFormat.OutputMethod method,
String customCode)
Creates new Builder with valid output method. |
Method Summary | |
---|---|
OutputFormat.Builder |
addCdataSectionElement(Element element)
Adds specified Element into CDATA section element list. |
OutputFormat.Builder |
addCdataSectionElement(String elementName)
Adds element name as is into CDATA section element list. |
OutputFormat.Builder |
addCdataSectionElement(String namespaceUri,
String localName)
Adds specified local name with optional name space URI into CDATA section element list. |
OutputFormat.Builder |
asStandalone()
Sets standalone flag. |
OutputFormat |
build()
Returns under-layering Output Format object. |
Properties |
buildToTransformerOutputProperties()
Creates Properties ready to use in setOutputProperties(java.util.Properties) . |
OutputFormat.Builder |
dontOmitXmlDeclaration()
Sets omit XML Declaration flag to no . |
OutputFormat.Builder |
indent()
Sets indent flag. |
OutputFormat.Builder |
omitXmlDeclaration()
Sets omit XML Declaration flag to yes . |
OutputFormat.Builder |
setDoctypePublic(String doctype)
Sets DOCTYPE PUBLIC |
OutputFormat.Builder |
setDoctypeSystem(String doctype)
Sets DOCTYPE SYSTEM. |
OutputFormat.Builder |
setEncoding(Charset charset)
Sets encoding from specified Charset. |
OutputFormat.Builder |
setEncoding(String encoding)
Sets encoding. |
OutputFormat.Builder |
setIndent(OutputFormat.Boolean state)
Sets indent flag. |
OutputFormat.Builder |
setMediaType(String mediaType)
Sets media type. |
OutputFormat.Builder |
setOmitXmlDeclaration(OutputFormat.Boolean state)
Sets omit XML Declaration flag. |
OutputFormat.Builder |
setStandalone(OutputFormat.Boolean state)
Sets standalone flag. |
OutputFormat.Builder |
setVersion(String version)
Sets version. |
OutputFormat.Builder |
withCustomProperty(String key,
String value)
Adds custom property which does not exist already and is not one of the properties managed by this builder. |
OutputFormat.Builder |
withDefaultVersion()
Sets default version for XML and HTML output method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final OutputFormat outputFormat
Constructor Detail |
---|
private OutputFormat.Builder(OutputFormat.OutputMethod method, String customCode)
method
- methodcustomCode
- custom code for CUSTOM
Method Detail |
---|
public OutputFormat build()
public Properties buildToTransformerOutputProperties()
setOutputProperties(java.util.Properties)
.
public OutputFormat.Builder setVersion(String version)
version
- text
public OutputFormat.Builder withDefaultVersion()
public OutputFormat.Builder setEncoding(String encoding)
encoding
- text
public OutputFormat.Builder setEncoding(Charset charset)
charset
- Charset to use
public OutputFormat.Builder setOmitXmlDeclaration(OutputFormat.Boolean state)
state
- new state
public OutputFormat.Builder omitXmlDeclaration()
yes
.
public OutputFormat.Builder dontOmitXmlDeclaration()
no
.
public OutputFormat.Builder setStandalone(OutputFormat.Boolean state)
state
- new state
public OutputFormat.Builder asStandalone()
public OutputFormat.Builder setDoctypePublic(String doctype)
doctype
- DOCTYPE PUBLIC
public OutputFormat.Builder setDoctypeSystem(String doctype)
doctype
- DOCTYPE SYSTEM
public OutputFormat.Builder addCdataSectionElement(String elementName)
elementName
- name to add
public OutputFormat.Builder addCdataSectionElement(String namespaceUri, String localName)
namespaceUri
- optional name space URIlocalName
- element name
public OutputFormat.Builder addCdataSectionElement(Element element)
Element
into CDATA section element list. The element is resolved to
qualified name.
element
- element to add
public OutputFormat.Builder setIndent(OutputFormat.Boolean state)
state
- state
public OutputFormat.Builder indent()
public OutputFormat.Builder setMediaType(String mediaType)
mediaType
- media type
public OutputFormat.Builder withCustomProperty(String key, String value)
key
- keyvalue
- value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |