Package org.dlese.dpc.xml
Class ADNToLocalizedFormatConverter
java.lang.Object
org.dlese.dpc.xml.ADNToLocalizedFormatConverter
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertXML(String xml, ServletContext context) Performs XML conversion from ADN to ADN localized.Converts from the ADN format.Converts to the adn-localized formatlonglastModified(ServletContext context) Gets the time this converter code was last modified.
-
Constructor Details
-
ADNToLocalizedFormatConverter
public ADNToLocalizedFormatConverter()
-
-
Method Details
-
getFromFormat
Converts from the ADN format.- Specified by:
getFromFormatin interfaceXMLFormatConverter- Returns:
- The String "adn".
-
getToFormat
Converts to the adn-localized format- Specified by:
getToFormatin interfaceXMLFormatConverter- Returns:
- The String "adn-localized".
-
lastModified
Gets the time this converter code was last modified. If unknown, this method should return -1.- Specified by:
lastModifiedin interfaceXMLFormatConverter- Parameters:
context- The context in which this is running.- Returns:
- The time this converter code was last modified.
-
convertXML
Performs XML conversion from ADN to ADN localized.- Specified by:
convertXMLin interfaceXMLFormatConverter- Parameters:
xml- XML input in the 'adn' format.context- The context in which this is running.- Returns:
- XML in the converted 'adn-localized' format.
-