Package org.dlese.dpc.xml
Class SimpleXMLFormatConverter
java.lang.Object
org.dlese.dpc.xml.SimpleXMLFormatConverter
- All Implemented Interfaces:
XMLFormatConverter
A simple demonstraion implementation of the
XMLFormatConverter interface. Just
appends a comment to the end of the XML content. Can be used on any XML format for
demonstration and testing.- Author:
- John Weatherley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertXML(String xml, ServletContext context) Performs XML conversion from the input format to the output format by simply adding a coment to the end of the input XML record.This converter can convert from any format.This converter can convert to any format.longlastModified(ServletContext context) Gets the time this converter code was last modified.
-
Constructor Details
-
SimpleXMLFormatConverter
public SimpleXMLFormatConverter()
-
-
Method Details
-
getFromFormat
This converter can convert from any format.- Specified by:
getFromFormatin interfaceXMLFormatConverter- Returns:
- An empty string, since there is no format association.
-
getToFormat
This converter can convert to any format.- Specified by:
getToFormatin interfaceXMLFormatConverter- Returns:
- An empty string, since there is no format association.
-
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 the input format to the output format by simply adding a coment to the end of the input XML record.- Specified by:
convertXMLin interfaceXMLFormatConverter- Parameters:
xml- XML input in the 'from' format.context- The context in which this is running.- Returns:
- XML in the converted 'to' format.
-