DLESE Tools
v1.6.0

org.dlese.dpc.xml
Class NCS_ITEMToNSDL_DCFormatConverter

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

public class NCS_ITEMToNSDL_DCFormatConverter
extends Object
implements XMLDocumentFormatConverter

Converts from NCS_ITEM to NSDL_DC format.

Author:
Ostwald
See Also:
XMLConversionService

Field Summary
protected  SimpleLuceneIndex index
           
protected  File transform_file
           
 
Constructor Summary
NCS_ITEMToNSDL_DCFormatConverter()
           
 
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)
           
 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

transform_file

protected File transform_file

index

protected SimpleLuceneIndex index
Constructor Detail

NCS_ITEMToNSDL_DCFormatConverter

public NCS_ITEMToNSDL_DCFormatConverter()
Method Detail

getFromFormat

public String getFromFormat()
Converts from the ncs_item format.

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

getToFormat

public String getToFormat()
Converts to the nsdl_dc format.

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

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)

DLESE Tools
v1.6.0