|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAWriteUtils
public class XMCDAWriteUtils
| Constructor Summary | |
|---|---|
XMCDAWriteUtils()
|
|
| Method Summary | |
|---|---|
void |
appendTo(Collection<? extends XmlObject> xFragments,
XMCDADoc.XMCDA xmcda)
|
static void |
appendTo(Collection<? extends XmlObject> xFragments,
XMCDADoc.XMCDA xmcda,
boolean validate)
|
void |
appendTo(XmlObject fragment,
XMCDADoc.XMCDA xmcda)
|
static void |
appendTo(XmlObject fragment,
XMCDADoc.XMCDA xmcda,
boolean validate)
|
boolean |
doesValidate()
Retrieves the information whether this object only accepts to write valid documents. |
XMCDADoc |
getDoc(XmlObject fragment)
Returns a new XMCDA document containing only the given fragment. |
static XMCDADoc |
getDoc(XmlObject fragment,
boolean validate)
Returns a new XMCDA document containing only the given fragment. |
XmlOptions |
getSaveOptions()
Retrieves a writable view of the options used to save XML streams. |
void |
setValidate(boolean validate)
Enables or disables the check for validation before writing any document. |
void |
write(XMCDADoc doc,
OutputSupplier<? extends OutputStream> destination)
Writes the given XMCDA document to the given destination. |
void |
write(XMCDADoc doc,
OutputSupplier<? extends OutputStream> destination,
String versionToWrite)
Writes the given XMCDA document to the given destination. |
void |
write(XmlObject fragment,
OutputSupplier<? extends OutputStream> destination)
Writes an XMCDA document containing only the given fragment to the given destination. |
static void |
write(XmlObject fragment,
OutputSupplier<? extends OutputStream> destination,
boolean validate)
Writes an XMCDA document containing only the given fragment to the given destination. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMCDAWriteUtils()
| Method Detail |
|---|
public static void appendTo(Collection<? extends XmlObject> xFragments,
XMCDADoc.XMCDA xmcda,
boolean validate)
public void appendTo(Collection<? extends XmlObject> xFragments,
XMCDADoc.XMCDA xmcda)
public static void appendTo(XmlObject fragment,
XMCDADoc.XMCDA xmcda,
boolean validate)
public void appendTo(XmlObject fragment,
XMCDADoc.XMCDA xmcda)
public void write(XMCDADoc doc,
OutputSupplier<? extends OutputStream> destination)
throws IOException
doc - not null, must conform to the XMCDA schema.destination - not null.
IOException - if an exception happens while opening or closing the given writer, or while writing to the
destination.
public void write(XmlObject fragment,
OutputSupplier<? extends OutputStream> destination)
throws IOException
fragment - not null, must conform to the relevant schema, must be allowed as a direct child of the
XMCDA tag.destination - not null.
IOException - if an exception happens while opening or closing the given writer, or while writing to the
destination.
public static void write(XmlObject fragment,
OutputSupplier<? extends OutputStream> destination,
boolean validate)
throws IOException
true, the fragment must be valid and the written document is guaranteed to be valid.
fragment - not null, must conform to the relevant schema, must be allowed as a direct child of the
XMCDA tag.destination - not null.validate - if true, this method will assert that the written document is valid. This is recommanded.
IOException - if an exception happens while opening or closing the given writer, or while writing to the
destination.
public static XMCDADoc getDoc(XmlObject fragment,
boolean validate)
fragment - not null, must conform to the relevant schema, must be allowed as a direct child of the
XMCDA tag.validate - if true, this method will assert that the returned document is valid. This is
recommanded.
null.public XMCDADoc getDoc(XmlObject fragment)
fragment - not null, must conform to the relevant schema, must be allowed as a direct child of the
XMCDA tag.
null.setValidate(boolean)public boolean doesValidate()
true.
true if this object validates documents before writing them.public void setValidate(boolean validate)
true, thus
this object validates each document before returning or writing them. It is not recommanded to disable validation
but it can be useful for debug.
validate - false to allow invalid documents.
public void write(XMCDADoc doc,
OutputSupplier<? extends OutputStream> destination,
String versionToWrite)
throws IOException
doc - not null, must conform to the XMCDA schema.destination - not null.versionToWrite - null for .
IOException - if an exception happens while opening or closing the given writer, or while writing to the
destination.setValidate(boolean)public XmlOptions getSaveOptions()
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||