org.fcrepo.server.storage.types
Class XMLDatastreamProcessor

java.lang.Object
  extended by org.fcrepo.server.storage.types.XMLDatastreamProcessor

public class XMLDatastreamProcessor
extends Object

Wrapper class for a datastream that has XML metadata. Allows managed content and inline xml datastreams to be treated generically as datastreams having XML metadata content, eg for DC, RELS-EXT and RELS-INT which may be stored either inline or as managed content.

Version:
$Id$
Author:
Stephen Bayliss

Field Summary
protected  Datastream m_ds
           
protected  org.fcrepo.server.storage.types.XMLDatastreamProcessor.DS_TYPE m_dsType
           
 
Constructor Summary
XMLDatastreamProcessor(Datastream ds)
          Construct an XML Datastream Processor by wrapping an existing datastream
XMLDatastreamProcessor(String dsId)
          Construct a new XML datastream processor and the associated datastream using the datastream ID to determine the type (M or X) of datastream to construct (see fedora.fcfg for configuring the default types)
 
Method Summary
 Datastream getDatastream()
          Get the datastream wrapped by this class
 int getDSMDClass()
          Get the DSMDClass of the datastream wrapped by this class
 byte[] getXMLContent()
          Get the XML content of the datastream wrapped by this class
 byte[] getXMLContent(Context ctx)
           
 XMLDatastreamProcessor newVersion()
          Return a new XML Datastream processor wrapping a new datastream.
 void setDSMDClass(int DSMDClass)
          Set the DSMDClass of the datastream wrapped by this class
 void setXMLContent(byte[] xmlContent)
          Update the XML content of the datastream wrapped by this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_ds

protected Datastream m_ds

m_dsType

protected org.fcrepo.server.storage.types.XMLDatastreamProcessor.DS_TYPE m_dsType
Constructor Detail

XMLDatastreamProcessor

public XMLDatastreamProcessor(String dsId)
Construct a new XML datastream processor and the associated datastream using the datastream ID to determine the type (M or X) of datastream to construct (see fedora.fcfg for configuring the default types)

Parameters:
dsId -

XMLDatastreamProcessor

public XMLDatastreamProcessor(Datastream ds)
Construct an XML Datastream Processor by wrapping an existing datastream

Parameters:
ds - - datastream to wrap
Method Detail

newVersion

public XMLDatastreamProcessor newVersion()
                                  throws ServerInitializationException,
                                         ModuleInitializationException
Return a new XML Datastream processor wrapping a new datastream. The type (M or X) of the new datastream will be the same as the existing one. Use to generate new versions of existing datastreams and wrap them in an XML datastream processor.

Throws:
ServerInitializationException
ModuleInitializationException

getXMLContent

public byte[] getXMLContent()
Get the XML content of the datastream wrapped by this class

Returns:

getXMLContent

public byte[] getXMLContent(Context ctx)

getDatastream

public Datastream getDatastream()
Get the datastream wrapped by this class

Returns:

setXMLContent

public void setXMLContent(byte[] xmlContent)
Update the XML content of the datastream wrapped by this class

Parameters:
xmlContent -

setDSMDClass

public void setDSMDClass(int DSMDClass)
Set the DSMDClass of the datastream wrapped by this class

Parameters:
DSMDClass -

getDSMDClass

public int getDSMDClass()
Get the DSMDClass of the datastream wrapped by this class

Returns:


Copyright © 2011 DuraSpace. All Rights Reserved.