org.vivoweb.harvester.translate
Class SanitizeMODSXML

java.lang.Object
  extended by org.vivoweb.harvester.translate.SanitizeMODSXML

public class SanitizeMODSXML
extends java.lang.Object

Author:
Michael Barbieri (mbarbier@ufl.edu) This file does two things. First, it removes bad characters from the input file so that they can be read as XML by XSLTranslator. Second, it removes the unprefixed "xmlns=" attribute found in the root node of many MODS files, which left alone causes XSLTranslator to explode as if by magic.

Constructor Summary
SanitizeMODSXML(ArgList argList)
          Constructor
SanitizeMODSXML(RecordHandler inStore, RecordHandler outStore, boolean force)
          Constructor
SanitizeMODSXML(java.lang.String[] args)
          Constructor
 
Method Summary
 void execute()
          Sanitize all files in directory
static void main(java.lang.String... args)
          Main method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SanitizeMODSXML

public SanitizeMODSXML(RecordHandler inStore,
                       RecordHandler outStore,
                       boolean force)
Constructor

Parameters:
inStore - the record handler for the input files.
outStore - the record handler for the sanitized files
force - sanitize files even if processing not needed

SanitizeMODSXML

public SanitizeMODSXML(java.lang.String[] args)
                throws java.io.IOException
Constructor

Parameters:
args - commandline arguments
Throws:
java.io.IOException - error creating task

SanitizeMODSXML

public SanitizeMODSXML(ArgList argList)
                throws java.io.IOException
Constructor

Parameters:
argList - option set of parsed args
Throws:
java.io.IOException - error creating task
Method Detail

execute

public void execute()
             throws java.io.IOException
Sanitize all files in directory

Throws:
java.io.IOException - if an error in reading or writing occurs

main

public static void main(java.lang.String... args)
Main method

Parameters:
args - commandline arguments