DLESE Tools
v1.6.0

org.dlese.dpc.xml
Class NSDL_DCToNCS_ITEMFormatConverter

java.lang.Object
  extended by org.dlese.dpc.xml.NSDL_DCToNCS_ITEMFormatConverter
All Implemented Interfaces:
XMLDocumentFormatConverter
Direct Known Subclasses:
NSDL_DCToNCS_COLLECTFormatConverter

public class NSDL_DCToNCS_ITEMFormatConverter
extends Object
implements XMLDocumentFormatConverter

Converts from NSDL_DC format to the NCS_ITEM format. NOTE: assumes nsdl_dc is version 1.02 and first transforms to nsdl_dc 1.03 before converting to ncs_item.

Version:
$Id: NSDL_DCToNCS_ITEMFormatConverter.java,v 1.3 2009/03/20 23:34:01 jweather Exp $
Author:
Ostwald
See Also:
XMLConversionService

Field Summary
protected  File format_transform_file
          NOT YET DOCUMENTED
protected  SimpleLuceneIndex index
          NOT YET DOCUMENTED
protected  File version_transform_file
          NOT YET DOCUMENTED
 
Constructor Summary
NSDL_DCToNCS_ITEMFormatConverter()
           
 
Method Summary
 String convertXML(String xml, XMLDocReader docReader, ServletContext context)
          Performs XML conversion from ADN to oai_dc format.
 String getFromFormat()
          Converts from the ncs_item format.
 String getToFormat()
          Converts to the nsdl_dc format.
protected  void getXFormFilesAndIndex(ServletContext context)
          Gets the xFormFilesAndIndex attribute of the NSDL_DCToNCS_ITEMFormatConverter object
 long lastModified(ServletContext context)
          Gets the time this converter code was last modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format_transform_file

protected File format_transform_file
NOT YET DOCUMENTED


version_transform_file

protected File version_transform_file
NOT YET DOCUMENTED


index

protected SimpleLuceneIndex index
NOT YET DOCUMENTED

Constructor Detail

NSDL_DCToNCS_ITEMFormatConverter

public NSDL_DCToNCS_ITEMFormatConverter()
Method Detail

getFromFormat

public String getFromFormat()
Converts from the ncs_item format.

Specified by:
getFromFormat in interface XMLDocumentFormatConverter
Returns:
The String "nsdl_dc".

getToFormat

public String getToFormat()
Converts to the nsdl_dc format.

Specified by:
getToFormat in interface XMLDocumentFormatConverter
Returns:
The String "ncs_item".

lastModified

public long lastModified(ServletContext context)
Gets the time this converter code was last modified. If unknown, this method should return -1.

Specified by:
lastModified in interface XMLDocumentFormatConverter
Parameters:
context - The context in which this is running.
Returns:
The time this converter code was last modified.

convertXML

public String convertXML(String xml,
                         XMLDocReader docReader,
                         ServletContext context)
Performs XML conversion from ADN to oai_dc format. Characters are encoded as UTF-8.

Specified by:
convertXML in interface XMLDocumentFormatConverter
Parameters:
xml - XML input in the 'adn' format.
docReader - A lucene doc reader for this record.
context - The servlet context where this is running.
Returns:
XML in the converted 'oai_dc' format.

getXFormFilesAndIndex

protected void getXFormFilesAndIndex(ServletContext context)
Gets the xFormFilesAndIndex attribute of the NSDL_DCToNCS_ITEMFormatConverter object

Parameters:
context - NOT YET DOCUMENTED

DLESE Tools
v1.6.0