DLESE Tools
v1.2

org.dlese.dpc.xml
Interface XMLFormatConverter

All Known Implementing Classes:
ADNToBriefMetaFormatConverter, SimpleXMLFormatConverter

public interface XMLFormatConverter

Implementations of this interface are used by the XMLConversionService to convert XML from one format to another.

Author:
John Weatherley
See Also:
XMLConversionService

Method Summary
 String convertXML(String xml, ServletContext context)
          Performs XML conversion from the input format to the output format.
 String getFromFormat()
          The metadataPrefix of the format from which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".
 String getToFormat()
          The metadataPrefix of the format to which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".
 long lastModified(ServletContext context)
          Gets the time this converter code was last modified.
 

Method Detail

getFromFormat

public String getFromFormat()
The metadataPrefix of the format from which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".

Returns:
The metadataPrefix of the format being converted.

getToFormat

public String getToFormat()
The metadataPrefix of the format to which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".

Returns:
The metadataPrefix of the format being output.

convertXML

public String convertXML(String xml,
                         ServletContext context)
Performs XML conversion from the input format to the output format. This method should retrun null if the conversion fails for any reason.

Parameters:
xml - XML input in the 'from' format.
context - The context in which this is running.
Returns:
XML in the converted 'to' format.

lastModified

public long lastModified(ServletContext context)
Gets the time this converter code was last modified. If unknown, this method should return -1.

Parameters:
context - The context in which this is running.
Returns:
The time this converter code was last modified.

DLESE Tools
v1.2