Package org.dlese.dpc.xml
Interface XMLDocumentFormatConverter
- All Known Implementing Classes:
ADNToNSDLDCFormatConverter,ADNToOAIDCFormatConverter,NCS_COLLECTToNSDL_DCFormatConverter,NCS_ITEMToNSDL_DCFormatConverter,NSDL_DCToNCS_COLLECTFormatConverter,NSDL_DCToNCS_ITEMFormatConverter
public interface XMLDocumentFormatConverter
Implementations of this interface are used by the
XMLConversionService to
convert content from one format to another. The input content may be in the form of a
String or a Lucene Document or both.- Author:
- John Weatherley
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionconvertXML(String xml, XMLDocReader docReader, ServletContext context) Performs XML conversion from the input format to the output format and may use content available in the given LuceneDocument.The metadataPrefix of the format from which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".The metadataPrefix of the format to which this XMLFormatConverter converts, for example "dlese_ims," "adn" or "oai_dc".longlastModified(ServletContext context) Gets the time this converter code was last modified.
-
Method Details
-
getFromFormat
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
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
Performs XML conversion from the input format to the output format and may use content available in the given LuceneDocument. This method should retrun null if the conversion fails for any reason.- Parameters:
xml- XML input in the 'from' format.docReader- A lucene doc reader for this record.context- The servlet context where this is running.- Returns:
- XML in the converted 'to' format.
-
lastModified
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.
-