com.cysols.iodef
Class IodefCollectiveWriter

java.lang.Object
  extended by com.cysols.iodef.IodefCollectiveWriter

public class IodefCollectiveWriter
extends Object

Write XML document by some wirter classes in a lump, after validating

Author:
cysol

Constructor Summary
IodefCollectiveWriter(DocumentWriter writer)
          Create a new writer class contained specified writer.
 
Method Summary
 void addWriter(DocumentWriter writer)
          Adds the writer class
 void removeWriter(DocumentWriter writer)
          Removes the writer class.
 void validWrite(IODEFDocument iodef)
          Validates the specified iodef document object, and writes with XML document included iodef document if validation is passed.
 void validWrite(String key, IODEFDocument iodef)
          Validate the specified iodef document object, and writes with XML document included iodef document if validation is passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IodefCollectiveWriter

public IodefCollectiveWriter(DocumentWriter writer)
Create a new writer class contained specified writer.

Parameters:
writer - the concrete class for writing XML document
Method Detail

addWriter

public void addWriter(DocumentWriter writer)
Adds the writer class

Parameters:
writer - concrete class for writing XML document

removeWriter

public void removeWriter(DocumentWriter writer)
Removes the writer class.

Parameters:
writer - concrete class for writing XML document

validWrite

public void validWrite(String key,
                       IODEFDocument iodef)
                throws XMLWriteException,
                       XMLValidationError
Validate the specified iodef document object, and writes with XML document included iodef document if validation is passed.

Parameters:
key - key name
iodef - iodef docuemnt
Throws:
XMLWriteException - if writing goes wrong
XMLValidationError - if validation is not passed

validWrite

public void validWrite(IODEFDocument iodef)
                throws XMLWriteException,
                       XMLValidationError
Validates the specified iodef document object, and writes with XML document included iodef document if validation is passed.

Parameters:
iodef - iodef document
Throws:
XMLWriteException - if writing goes wrong
XMLValidationError - if validation is not passed