edu.harvard.hul.ois.mets
Class Stream

java.lang.Object
  extended byedu.harvard.hul.ois.mets.helper.MetsElement
      extended byedu.harvard.hul.ois.mets.helper.MetsVElement
          extended byedu.harvard.hul.ois.mets.Stream
All Implemented Interfaces:
MetsSerializable, MetsValidatable

public class Stream
extends MetsVElement

This class encapsulates the <stream> element. See <http://www.loc.gov/standards/mets/>.


Field Summary
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
_valid
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
_attrs, _content, _localName, _namespace, _qName, _schema
 
Constructor Summary
Stream()
          Instantiate a new Stream object.
 
Method Summary
 java.util.Map getADMID()
          Return map IDREFS to administrative metadata.
 java.util.Map getDMDID()
          Return map IDREFS to descriptive metadata.
 java.lang.String getOWNERID()
          Return stream OWNERID.
 java.lang.String getStreamType()
          Return stream type.
 void read(MetsReader r)
          De-serialize the content of the file into this element using the given reader.
static Stream reader(MetsReader r)
          Instantiate a Stream object de-serialized from the input stream.
 void setADMID(java.lang.String ADMID)
          Set ADMID of AmdSec element.
 void setADMID(java.lang.String ADMID, MetsIDElement elem)
          Set ADMID of AmdSec element, with referenced element.
 void setDMDID(java.lang.String DMDID)
          Set DMDID of DmdSec element.
 void setDMDID(java.lang.String DMDID, DmdSec elem)
          Set DMDID of DmdSec element, with referenced element.
 void setOWNERID(java.lang.String id)
          Set stream OWNERID.
 void setStreamType(java.lang.String type)
          Set stream type.
 void validateThisIDREFs(MetsValidator v)
          Validate ID/IDREF consistency with the given validator.
 void write(MetsWriter w)
          Serialize the content of this element using the given writer.
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
isValid, validate, validateIDREFs, validateThis
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
getContent, getLocalName, getNamespace, getQName, getSchemas, init, setSchema, setSchema, writeSchemas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stream

public Stream()
Instantiate a new Stream object.

Method Detail

getADMID

public java.util.Map getADMID()
Return map IDREFS to administrative metadata.

Returns:
Map

getDMDID

public java.util.Map getDMDID()
Return map IDREFS to descriptive metadata.

Returns:
Map

getOWNERID

public java.lang.String getOWNERID()
Return stream OWNERID.

Returns:
OWNERID

getStreamType

public java.lang.String getStreamType()
Return stream type.

Returns:
Stream type

setADMID

public void setADMID(java.lang.String ADMID)
Set ADMID of AmdSec element.

Parameters:
ADMID - Element IDREF

setADMID

public void setADMID(java.lang.String ADMID,
                     MetsIDElement elem)
Set ADMID of AmdSec element, with referenced element.

Parameters:
ADMID - Element IDREF
elem - Element (or NULL)

setDMDID

public void setDMDID(java.lang.String DMDID)
Set DMDID of DmdSec element.

Parameters:
DMDID - Element IDREF

setDMDID

public void setDMDID(java.lang.String DMDID,
                     DmdSec elem)
Set DMDID of DmdSec element, with referenced element.

Parameters:
DMDID - Element IDREF
elem - Element (or NULL)

setOWNERID

public void setOWNERID(java.lang.String id)
Set stream OWNERID.

Parameters:
id - OWNERID

setStreamType

public void setStreamType(java.lang.String type)
Set stream type.

Parameters:
type - Stream type

reader

public static Stream reader(MetsReader r)
                     throws MetsException
Instantiate a Stream object de-serialized from the input stream.

Parameters:
r - Reader
Returns:
Stream object
Throws:
MetsException - De-serializing exception

read

public void read(MetsReader r)
          throws MetsException
De-serialize the content of the file into this element using the given reader.

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

write

public void write(MetsWriter w)
           throws MetsException
Serialize the content of this element using the given writer.

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

validateThisIDREFs

public void validateThisIDREFs(MetsValidator v)
                        throws MetsException
Validate ID/IDREF consistency with the given validator.

Overrides:
validateThisIDREFs in class MetsVElement
Parameters:
v - Validator
Throws:
MetsException - Validation exception