class: DataHandlerBean

public class: DataHandlerBean
Author: Friederike Kleinfercher (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 16.07.2009 15:16:16; Modified: 16.07.2009 15:16:16;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {A1A72658-3592-4d62-9A17-EEFA905C008B}
This class provides the ejb implementation of the {@link DataHandler} interface.
 

Goto: Custom Properties, Fields, Methods, Tagged Values

Implements: DataHandler

See also: UnapiServlet, FileVO, DataSourceVO, DataSourceHandlerBean, Util, DataHandler

Appears in: dataacquisition

Connections
 
Custom Properties
 
DataHandlerBean Attributes
Attribute Details
private FileVO
  componentVO
Initial: null
private String
  contentCategorie
private String
  contentType
Notes: Additional data info
private DataSourceVO
  currentSource
Initial: null
private const String
  fetchTypeESCIDOCTRANS
Initial: "ESCIDOCTRANS"
private const String
  fetchTypeFILEDATA
Initial: "FILEDATA"
private const String
  fetchTypeTEXTUALDATA
Initial: "TEXTUALDATA"
private const String
  fetchTypeUNKNOWN
Initial: "UNKNOWN"
private String
  fileEnding
private URL
  itemUrl
private const Logger
  logger
Initial: Logger.getLogger(DataHandlerBean.class)
private const String
  regex
Initial: "GETID"
private DataSourceHandlerBean
  sourceHandler
private Util
  util
private String
  visibility
Initial: "PRIVATE"
 
DataHandlerBean Methods
Operation Details
public
currentDate():long
Sequential
Notes: method for retrieving the current sys date.
@return current date
public
DataHandlerBean():
Sequential
Notes: public constructor for DataHandlerBean class.
public
doFetch(
   String sourceName,
   String identifier):byte
Sequential
Tags: throws=SourceNotAvailableException,AccessException,IdentifierNotRecognisedException,FormatNotRecognisedException,RuntimeException,FormatNotAvailableException
Notes: {@inheritDoc}
public
doFetch(
   String sourceName,
   String identifier,
   String trgFormatName,
   String trgFormatType,
   String trgFormatEncoding):byte
Sequential
Tags: throws=SourceNotAvailableException,AccessException,IdentifierNotRecognisedException,FormatNotRecognisedException,RuntimeException,FormatNotAvailableException
Notes: {@inheritDoc}
public
doFetch(
   String sourceName,
   String identifier,
   Format[] formats):byte
Sequential
Tags: throws=SourceNotAvailableException,IdentifierNotRecognisedException,FormatNotRecognisedException,RuntimeException,FormatNotAvailableException
Notes: {@inheritDoc}
public
doFetch(
   String sourceName,
   String identifier,
   String[] formats):byte
Sequential
Tags: throws=SourceNotAvailableException,IdentifierNotRecognisedException,FormatNotRecognisedException,RuntimeException,FormatNotAvailableException
Notes: {@inheritDoc}
public
doFetch(
   String sourceName,
   String identifier,
   String formatName):byte
Sequential
Tags: throws=SourceNotAvailableException,IdentifierNotRecognisedException,FormatNotRecognisedException,RuntimeException,AccessException,FormatNotAvailableException
Notes: {@inheritDoc}
public
explainSources():String
Sequential
Tags: throws=RuntimeException
Notes: {@inheritDoc}
private
fetchData(
   String identifier,
   Format[] formats):byte
Sequential
Tags: throws=SourceNotAvailableException,RuntimeException,FormatNotAvailableException
Notes: Operation for fetching data of type FILE.
@param importSource
@param listOfFormats
@return byte[] of the fetched file, zip file if more than one record was fetched
private
fetchEjbFile(
   FullTextVO ft,
   String identifier):byte
Sequential
Tags: throws=IdentifierNotRecognisedException,RuntimeException
Notes: Fetches a eSciDoc Record from eSciDoc system.
@return itemXML as String
private
fetchEjbRecord(
   MetadataVO md,
   String identifier):String
Sequential
Tags: throws=IdentifierNotRecognisedException,RuntimeException
Notes: Fetches a eSciDoc Record from eSciDoc system.
@return itemXML as String
private
fetchFile(
   FullTextVO fulltext):byte
Sequential
Tags: throws=SourceNotAvailableException,RuntimeException,AccessException,FormatNotAvailableException
Notes: Handlers the http request to fetch a file from an external source.
@param importSource
@return byte[] of the fetched file
private
fetchHttpFile(
   FullTextVO ft):byte
Sequential
Tags: throws=IdentifierNotRecognisedException,RuntimeException,AccessException
Notes: Fetches a file via http protocol.
@param importSource
@return fetched file as byte[]
private
fetchHttpRecord(
   MetadataVO md):String
Sequential
Tags: throws=IdentifierNotRecognisedException,RuntimeException,AccessException
Notes: Fetches a record via http protocol.
@param importSource
@return
public
fetchMetadatafromURL(
   URL url):byte
Sequential
Tags: throws=SourceNotAvailableException,RuntimeException,AccessException
Notes: fetch data from a given url.
@return byte[]
private
fetchOAIRecord(
   MetadataVO md):String
Sequential
Tags: throws=SourceNotAvailableException,AccessException,IdentifierNotRecognisedException,RuntimeException
Notes: Fetches an OAI record for given record identifier.
@param sourceURL
@return itemXML
private
fetchTextualData(
   String identifier,
   String trgFormatName,
   String trgFormatType,
   String trgFormatEncoding):String
Sequential
Tags: throws=IdentifierNotRecognisedException,AccessException,SourceNotAvailableException,FormatNotAvailableException,FormatNotRecognisedException
Notes: Operation for fetching data of type TEXTUALDATA.
@param format
@return itemXML
public
getComponentVO():FileVO
Sequential
public
getContentCategory():String
Sequential
public
getContentType():String
Sequential
public
getCurrentSource():DataSourceVO
Sequential
private
getFetchingType(
   String trgFormatName,
   String trgFormatType,
   String trgFormatEncoding):String
Sequential
Tags: throws=FormatNotAvailableException
Notes: Decide which kind of data has to be fetched.
@param source
@param format
@return type of data to be fetched {TEXTUALDATA, FILEDATA, ESCIDOCTRANS, UNKNOWN}
public
getFileEnding():String
Sequential
public
getItemUrl():URL
Sequential
public
getVisibility():Visibility
Sequential
public
retrieveComponentContent(
   String identifier,
   String url):byte
Sequential
Notes: Retrieves the content of a component from different escidoc instances.
@return content of a component as byte[]
public
setComponentVO(
   FileVO componentVO):void
Sequential
public
setContentCategorie(
   String contentCategorie):void
Sequential
public
setContentType(
   String contentType):void
Sequential
public
setCurrentSource(
   DataSourceVO currentSource):void
Sequential
public
setFileEnding(
   String fileEnding):void
Sequential
public
setFileProperties(
   FullTextVO fulltext):void
Sequential
Notes: Sets the properties for a file.
public
setItemUrl(
   URL itemUrl):void
Sequential
public
setVisibility(
   String visibility):void
Sequential
 
DataHandlerBean Tagged Values
Tag Value Notes
annotations @Remote@RemoteBinding(jndiBinding = DataHandler.SERVICE_NAME)@Stateless@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)