Class DLESEAnnoToLocalizedFormatConverter

java.lang.Object
org.dlese.dpc.xml.DLESEAnnoToLocalizedFormatConverter
All Implemented Interfaces:
XMLFormatConverter

public class DLESEAnnoToLocalizedFormatConverter extends Object implements XMLFormatConverter
Converts from DLESE Anno format to a localized DLESE Anno format, which contains no namespace declarations. Localized XML may be accessed using XPath notation without the local-name() function, making it easier to use.
Author:
John Weatherley
See Also:
  • Constructor Details

    • DLESEAnnoToLocalizedFormatConverter

      public DLESEAnnoToLocalizedFormatConverter()
  • Method Details

    • getFromFormat

      public String getFromFormat()
      Converts from the DLESE Anno format.
      Specified by:
      getFromFormat in interface XMLFormatConverter
      Returns:
      The String "dlese_anno".
    • getToFormat

      public String getToFormat()
      Converts to the dlese_anno-localized format
      Specified by:
      getToFormat in interface XMLFormatConverter
      Returns:
      The String "dlese_anno-localized".
    • 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 XMLFormatConverter
      Parameters:
      context - Servlet context
      Returns:
      The time this converter code was last modified.
    • convertXML

      public String convertXML(String xml, ServletContext context)
      Performs XML conversion from DLESE Anno to DLESE Anno localized.
      Specified by:
      convertXML in interface XMLFormatConverter
      Parameters:
      xml - XML input in the 'dlese_anno' format.
      context - Servlet context
      Returns:
      XML in the converted 'dlese_anno-localized' format.