|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.macewan.ims.enterprise.io.IMSEnterpriseProcessor
ca.macewan.ims.enterprise.io.IMSEnterpriseExportProcessor
ca.macewan.ims.enterprise.io.IMSEnterpriseWriter
IMSEnterpriseWriter
lets you write an entire IMS enterprise XML file in one
write action. This is as opposed to the IMSEnterpriseBuilder
class,
which writes the top-level elements of an IMS enterprise XML document one at a time. The advantages
of this writer as opposed to the builder class are mainly in terms of coding simplicity and
convenience. Note, however, that building large IMS enterprise structures in memory prior to writing
them can lead to out-of-memory issues.
IMSEnterpriseWriter writer = new IMSEnterpriseWriter(); writer.write(enterprise, someOutputStream);
Constructor Summary | |
IMSEnterpriseWriter()
Creates a default IMSEnterpriseWriter using the system JSR173 XMLOutputFactory
class for writing the XML document. |
|
IMSEnterpriseWriter(String writerClass)
Creates an IMSEnterpriseWriter where the method argument is used to specify the
JSR173 XMLOutputFactory class to be used. |
Method Summary | |
boolean |
isIMSValidating()
Returns true if IMS enterprise validation is turned on. |
void |
setIMSValidating(boolean v)
Turn IMS enterprise validation on or off. |
void |
write(Enterprise enterprise,
OutputStream out)
Attempts to write the complete XML enterprise information in the Enterprise
object to the OutputStream . |
void |
write(Enterprise enterprise,
Writer out)
Attempts to write the complete XML enterprise information in the Enterprise
object to the Writer . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IMSEnterpriseWriter()
IMSEnterpriseWriter
using the system JSR173 XMLOutputFactory
class for writing the XML document.
public IMSEnterpriseWriter(String writerClass)
IMSEnterpriseWriter
where the method argument is used to specify the
JSR173 XMLOutputFactory class to be used. Check the JSR173 documentation for more information.
writerClass
- The XMLOutputFactory class to use.Method Detail |
public void setIMSValidating(boolean v)
true
, the writer will call
the validate
method on the IMS enterprise objects being written, and the
write
method may throw an
IMSEnterpriseException
if the information in the
XML file is not valid according to the IMS enterprise specification.
v
- Whether or not to enable IMS enterprise validation.public boolean isIMSValidating()
true
if IMS enterprise validation is turned on.
public void write(Enterprise enterprise, OutputStream out) throws IMSEnterpriseException
Enterprise
object to the OutputStream
.
enterprise
- The IMS Enterprise
object to write.out
- The stream to write to.
IMSEnterpriseException
- Exceptions may be thrown regarding IMS enterprise
validation (see setIMSValidating
) or general XML writing
errors.public void write(Enterprise enterprise, Writer out) throws IMSEnterpriseException
Enterprise
object to the Writer
.
enterprise
- The IMS Enterprise
object to write.out
- The writer to write to.
IMSEnterpriseException
- Exceptions may be thrown regarding IMS enterprise
validation (see setIMSValidating
) or general XML writing
errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |