DLESE Tools
v1.6.0

org.dlese.dpc.xml
Class ADNToLocalizedFormatConverter

java.lang.Object
  extended by org.dlese.dpc.xml.ADNToLocalizedFormatConverter
All Implemented Interfaces:
XMLFormatConverter

public class ADNToLocalizedFormatConverter
extends Object
implements XMLFormatConverter

Converts from ADN format to a localized ADN 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:
XMLConversionService

Constructor Summary
ADNToLocalizedFormatConverter()
           
 
Method Summary
 String convertXML(String xml, ServletContext context)
          Performs XML conversion from ADN to ADN localized.
 String getFromFormat()
          Converts from the ADN format.
 String getToFormat()
          Converts to the adn-localized format
 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
 

Constructor Detail

ADNToLocalizedFormatConverter

public ADNToLocalizedFormatConverter()
Method Detail

getFromFormat

public String getFromFormat()
Converts from the ADN format.

Specified by:
getFromFormat in interface XMLFormatConverter
Returns:
The String "adn".

getToFormat

public String getToFormat()
Converts to the adn-localized format

Specified by:
getToFormat in interface XMLFormatConverter
Returns:
The String "adn-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 - The context in which this is running.
Returns:
The time this converter code was last modified.

convertXML

public String convertXML(String xml,
                         ServletContext context)
Performs XML conversion from ADN to ADN localized.

Specified by:
convertXML in interface XMLFormatConverter
Parameters:
xml - XML input in the 'adn' format.
context - The context in which this is running.
Returns:
XML in the converted 'adn-localized' format.

DLESE Tools
v1.6.0