Class NSDL_DCToNCS_ITEMFormatConverter

java.lang.Object
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:
  • Field Details

    • 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 Details

    • NSDL_DCToNCS_ITEMFormatConverter

      public NSDL_DCToNCS_ITEMFormatConverter()
  • Method Details

    • 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