class: Export

public class: Export
Author: Vlad Makarenko (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 67 $ $LastChangedDate: 2007-12-11 12:39; Complexity: 1
Dates: Created: 16.07.2009 15:16:30; Modified: 16.07.2009 15:16:30;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {7845E591-5C59-4a2c-AAA0-A1C08069961F}
Structured Export Manager. Converts PubMan item-list to one of the structured formats.
 

Goto: Custom Properties, Fields, Methods

Implements: ExportHandler

See also: ExportHandler, ExportHandlerBean, ExportTest

Appears in: exportmanager

Connections
 
Custom Properties
 
Export Attributes
Attribute Details
public static const short
  BUFFER_SIZE
Initial: 1024
public static const String
  COMPONENTS_NS
Initial: "http://www.escidoc.de/schemas/components/0.7"
public static const String
  LICENSE_AGREEMENT_NAME
Initial: "Faces_Release_Agreement_Export.pdf"
private static const Logger
  logger
Initial: Logger.getLogger(Export.class)
public static const String
  MDRECORDS_NS
Initial: "http://www.escidoc.de/schemas/metadatarecords/0.4"
private static const int
  NUMBER_OF_URL_TOKENS
Initial: 2
private static const String
  PASSWORD
Initial: "beethoven"
private static const String
  PATH_TO_RESOURCES
Initial: "resources/"
public static const String
  PROPERTIES_NS
Initial: "http://escidoc.de/core/01/properties/"
private static const String
  USER_ID
Initial: "roland"
public static const String
  XLINK_NS
Initial: "http://www.w3.org/1999/xlink"
 
Export Methods
Operation Details
private
addDescriptionEnrty(
   byte[] exportOut,
   String exportFormat,
   OutputStream aos):void
Sequential
Tags: throws=IOException,ExportManagerException
private
addLicenseAgreement(
   OutputStream os):void
Sequential
Tags: throws=IOException,ExportManagerException
Notes: Write License Agreement file to the archive OutputStream
@param af is Archive Format
public
calculateItemListFileSizes(
   String itemList):long
Sequential
Tags: throws=ExportManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#calculateItemListFileSizes(String)
public
explainFormatsXML():String
Sequential
Tags: throws=ExportManagerException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#explainFormatsXML()
private
exportFormatType(
   String exportFormat):ExportFormatTypes
Sequential
Tags: throws=ExportManagerException
Notes: Returns type of the <code>exportFormat</code>:
<code>LAYOUT</code> for citation style and <code>STRUCTURED</code> for structured export formats.
@return type of the export formats
private
fetchComponentsDo(
   OutputStream aos,
   String itemList):void
Sequential
Tags: throws=ExportManagerException
Notes: Walk around the itemList XML, fetch all files from components via URIs and put them into the archive {@link OutputStream} aos
@link OutputStream}
public
generateArchive(
   String exportFormat,
   String archiveFormat,
   byte[] exportOut,
   String itemList):byte
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#generateArchive(String, String, byte[], String) )
public
generateArchive(
   String archiveFormat,
   String itemListFiltered):byte
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#generateArchive(String, String) )
private
generateArchiveBase(
   String exportFormat,
   String archiveFormat,
   byte[] exportOut,
   String itemList,
   BufferedOutputStream bos):void
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#generateArchive(String, String, byte[], String) )
public
generateArchiveFile(
   String exportFormat,
   String archiveFormat,
   byte[] exportOut,
   String itemList):File
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#generateArchive(String, String, byte[], String) )
private
generateTmpFileName():String
Sequential
private
getFileExt(
   String af):String
Sequential
Notes: Returns file extension on hand of archive format
@return file extension
private
getFilteredNodes(
   NodeFilter nodeFilter,
   Document doc):NodeIterator
Sequential
Tags: throws=ExportManagerException
Notes: Returns <code>org.w3c.dom.traversal.NodeIterator</code> for org.w3c.dom.Document traversing
public
getOutput(
   String exportFormat,
   String outputFormat,
   String archiveFormat,
   String itemList):byte
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#getOutput(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
private
getOutputBase(
   String exportFormat,
   String outputFormat,
   String archiveFormat,
   String itemList,
   BufferedOutputStream bos):void
Sequential
Tags: throws=ExportManagerException,IOException
Notes: Base method for getOutput* methods
public
getOutputFile(
   String exportFormat,
   String outputFormat,
   String archiveFormat,
   String itemList):File
Sequential
Tags: throws=ExportManagerException,IOException
Notes: (non-Javadoc)
@see de.mpg.escidoc.services.exportmanager.ExportHandler#getOutputFile(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
private
getResource(
   String fileName):InputStream
Sequential
Tags: throws=IOException
Notes: Gets resources according to an execution environment
@return InputStream of resource
protected static
loginUser(
   String userid,
   String password):String
Sequential
Tags: throws=HttpException,IOException,ServiceException,URISyntaxException
Notes: Logs in the given user with the given password.
@return The handle for the logged in user.
private
parseDocument(
   String itemList):Document
Sequential
Tags: throws=ExportManagerException
Notes: Parses <code>itemList</code> XML to <code>org.w3c.dom.Document</code>.
@return <code>org.w3c.dom.Document</code>
private
writeFromStreamToStream(
   InputStream is,
   OutputStream os):void
Sequential
Tags: throws=IOException