Package org.dlese.dpc.xml
Class ADNToOAIDCFormatConverter
java.lang.Object
org.dlese.dpc.xml.ADNToOAIDCFormatConverter
- All Implemented Interfaces:
XMLDocumentFormatConverter
Converts from ADN format to the OAI DC format. Converts DLESE-specific IDs to URLs.
- Author:
- John Weatherley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertXML(String xml, XMLDocReader docReader, ServletContext context) Performs XML conversion from ADN to oai_dc format.Converts from the ADN format.Converts to the oai_dc format.longlastModified(ServletContext context) Gets the time this converter code was last modified.
-
Constructor Details
-
ADNToOAIDCFormatConverter
public ADNToOAIDCFormatConverter()
-
-
Method Details
-
getFromFormat
Converts from the ADN format.- Specified by:
getFromFormatin interfaceXMLDocumentFormatConverter- Returns:
- The String "adn".
-
getToFormat
Converts to the oai_dc format.- Specified by:
getToFormatin interfaceXMLDocumentFormatConverter- Returns:
- The String "oai_dc".
-
lastModified
Gets the time this converter code was last modified. If unknown, this method should return -1.- Specified by:
lastModifiedin interfaceXMLDocumentFormatConverter- 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 oai_dc format. Characters are encoded as UTF-8.- Specified by:
convertXMLin interfaceXMLDocumentFormatConverter- Parameters:
xml- XML input in the 'adn' format.docReader- A lucene doc reader for this record.context- The servlet context where this is running.- Returns:
- XML in the converted 'oai_dc' format.
-