class: Util

public class: Util
Author: kleinfe1 (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision$ $LastChangedDate$; Complexity: 1
Dates: Created: 16.07.2009 15:16:18; Modified: 16.07.2009 15:16:18;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {F89DB7E2-916B-4f5d-A922-CE6CFC97A650}
Helper methods for the DataAcquisition Service.
 

Goto: Custom Properties, Fields, Methods

See also: DataHandlerBean, TransformationBean

Appears in: dataacquisition

Connections
 
Custom Properties
 
Util Attributes
Attribute Details
private const String
  coneMethod
Initial: "rdf/escidocmimetypes"
Notes: Cone
private const String
  coneRel
Initial: "urn:cone:escidocmimetype:"
private const String
  dummyFormat
Initial: "unknown"
private const String
  internalFormat
Initial: "eSciDoc-publication-item"
private const String
  internalListFormat
Initial: "eSciDoc-publication-item-list"
private const Logger
  logger
Initial: Logger.getLogger(Util.class)
private const String
  transformationService
Initial: "escidoc"
private TransformationBean
  transformer
 
Util Methods
Operation Details
public
checkEscidocTransform(
   String trgFormatName,
   String trgFormatType,
   String trgFormatEncoding):boolean
Sequential
Notes: Checks if a target format can be transformed from escidoc format. Will be more dynamic in future! This part of arxiv hack for natasa ;)
@return
public
checkEscidocTransition(
   Vector metadataV,
   String identifier):boolean
Sequential
Notes: Checks if a format can use escidoc as transition format.
@return
public
createUnapiSourcesXml():byte
Sequential
Notes: Creates the source description xml
@return xml as byte[]
public
getDefaultEncoding(
   String formatName):String
Sequential
Notes: @return
public
getDefaultMimeType(
   String formatName):String
Sequential
Notes: @return
public
getFtObjectToFetch(
   DataSourceVO source,
   String formatName,
   String formatType,
   String formatEncoding):FullTextVO
Sequential
Notes: This operation return the Fulltext Object of the format to fetch from the source.
@return Fulltext Object of the format to fetch
public
getInternalFormat():String
Sequential
public
getMdObjectToFetch(
   DataSourceVO source,
   String trgFormatName,
   String trgFormatType,
   String trgFormatEndcoding):MetadataVO
Sequential
Notes: This operation return the Metadata Object of the format to fetch from the source.
@return Metadata Object of the format to fetch
public
getRidOfDuplicatesInVector(
   Vector dirtyVector):Vector
Sequential
Notes: Eliminates duplicates in a Vector.
@return Vector with unique entries
public
getTransformationService():String
Sequential
public
getTransformFormats(
   Vector fetchFormats):Vector
Sequential
Notes: This method retrieves all formats a given format can be transformed into.
@return Vector of Metadata Value Objects
private
handleDuplicateFormatNames(
   Format[] formats):Format
Sequential
Notes: This methods gets a vector of formats, checks the formats names and adds the format type to the name, if the name occurs more than once in the list.
@return Vector of FormatVOs
public
isFormatEqual(
   Format src1,
   Format src2):boolean
Sequential
Notes: Checks if two Format Objects are equal.
@return true if equal, else false
public
isMdFormatEqual(
   MetadataVO src1,
   MetadataVO src2):boolean
Sequential
Notes: Checks if the format of two MetadataVO Objects are equal.
@return true if equal, else false
public
retrieveFileEndingFromCone(
   String mimeType):String
Sequential
Notes: Retrieves the fileending for a given mimetype from the cone service
@return fileending as String
public
setEsciDocIdentifier(
   String identifier):String
Sequential
Notes: EsciDoc Identifier can consist of the citation URL, like: http://pubman.mpdl.mpg.de:8080/pubman/item/escidoc:1048:3. This method extracts the identifier from the URL
@return escidoc identifier as String
public
trimIdentifier(
   String sourceName,
   String identifier):String
Sequential
Notes: For a more flexible user input handling.
@return a trimed identifier
public
trimSourceName(
   String sourceName,
   String identifier):String
Sequential
Notes: Extracts out of a url the escidoc import source name.
@return trimmed sourceName as String
public
Util():
Sequential
Notes: Public constructor.