public class PSWriter extends Object
Constructor and Description |
---|
PSWriter()
Constructor using the default
PSWriterSettings instance. |
PSWriter(IPSWriterSettings aWriterSettings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected com.helger.xml.microdom.IMicroNode |
getAsDocument(com.helger.xml.microdom.IMicroElement aElement) |
IPSWriterSettings |
getWriterSettings() |
String |
getXMLString(IPSElement aPSElement)
Get the passed Schematron element as a String
|
String |
getXMLStringNotNull(IPSElement aPSElement)
Get the passed Schematron element as a String
|
String |
toString() |
com.helger.commons.state.ESuccess |
writeToFile(IPSElement aPSElement,
File aFile)
Write the passed Schematron element to the passed file.
|
com.helger.commons.state.ESuccess |
writeToStream(IPSElement aPSElement,
OutputStream aOS)
Write the passed Schematron element to the passed output stream.
|
com.helger.commons.state.ESuccess |
writeToWriter(IPSElement aPSElement,
Writer aWriter)
Write the passed Schematron element to the passed writer.
|
public PSWriter()
PSWriterSettings
instance.public PSWriter(@Nonnull IPSWriterSettings aWriterSettings)
aWriterSettings
- The writer settings to be used. May not be null
.@Nonnull public IPSWriterSettings getWriterSettings()
@Nonnull @OverrideOnDemand protected com.helger.xml.microdom.IMicroNode getAsDocument(@Nonnull com.helger.xml.microdom.IMicroElement aElement)
@Nonnull public com.helger.commons.state.ESuccess writeToFile(@Nonnull IPSElement aPSElement, @Nonnull File aFile)
aPSElement
- The schematron element to write. May not be null
.aFile
- The file to write things to. May not be null
.ESuccess
.@Nonnull public com.helger.commons.state.ESuccess writeToStream(@Nonnull IPSElement aPSElement, @Nonnull @WillClose OutputStream aOS)
aPSElement
- The schematron element to write. May not be null
.aOS
- The output stream to write things to. May not be null
.
The stream is automatically closed.ESuccess
.@Nonnull public com.helger.commons.state.ESuccess writeToWriter(@Nonnull IPSElement aPSElement, @Nonnull @WillClose Writer aWriter)
aPSElement
- The schematron element to write. May not be null
.aWriter
- The writer to write things to. May not be null
. The
writer is automatically closed.ESuccess
.@Nullable public String getXMLString(@Nonnull IPSElement aPSElement)
aPSElement
- The schematron element to convert to a string. May not be
null
.null
if
serialization failed.@Nullable public String getXMLStringNotNull(@Nonnull IPSElement aPSElement)
aPSElement
- The schematron element to convert to a string. May not be
null
.null
.IllegalStateException
- if serialization failedCopyright © 2014–2017 Philip Helger. All rights reserved.