edu.harvard.hul.ois.mets.helper
Class PreformedXML

java.lang.Object
  extended byedu.harvard.hul.ois.mets.helper.PreformedXML
All Implemented Interfaces:
MetsSerializable

public class PreformedXML
extends java.lang.Object
implements MetsSerializable

Class encapsulating pre-formed XML. When serialized, no XML escaping is performed on this data.


Constructor Summary
PreformedXML()
          Instantiate a PreformedXML object.
PreformedXML(java.io.Reader reader)
          Instantiate a PreformedXML object with a content reader.
PreformedXML(java.lang.String content)
          Instantiate a PreformedXML object with string content.
 
Method Summary
 void add(java.lang.String content)
          Add additional PreformedXML content.
 java.util.List getContent()
          Get content model.
 void read(MetsReader r)
          This method is provided to satisfy the MetsSerializable interface, but it is never invoked.
 void write(MetsWriter w)
          Serialize this element, with no XML escaping, and its content model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreformedXML

public PreformedXML()
Instantiate a PreformedXML object.


PreformedXML

public PreformedXML(java.lang.String content)
Instantiate a PreformedXML object with string content.

Parameters:
content - String content

PreformedXML

public PreformedXML(java.io.Reader reader)
Instantiate a PreformedXML object with a content reader. Objects instantiated with this constructor must not attempt to add content to the list returned by the getContent() method.

Parameters:
reader - Reader
Method Detail

getContent

public java.util.List getContent()
Get content model.

Specified by:
getContent in interface MetsSerializable
Returns:
Null

add

public void add(java.lang.String content)
Add additional PreformedXML content.

Parameters:
content - PreformedXML content

read

public void read(MetsReader r)
          throws MetsException
This method is provided to satisfy the MetsSerializable interface, but it is never invoked.

Specified by:
read in interface MetsSerializable
Parameters:
r - Reader
Throws:
MetsException

write

public void write(MetsWriter w)
           throws MetsException
Serialize this element, with no XML escaping, and its content model.

Specified by:
write in interface MetsSerializable
Parameters:
w - Writer
Throws:
MetsException