Package edu.ucsb.nceas.metacat
Class EML201DocumentCorrector
java.lang.Object
edu.ucsb.nceas.metacat.EML201DocumentCorrector
Before Metacat 1.8.1 release, Metacat uses the eml201 schema with the tag
RELEASE_EML_2_0_1_UPDATE_5. Unfortunately, this tag points at wrong version
of eml-resource.xsd. In this schema, the element "references" has an attribute named
"system" and the attribute has a default value "document". Metacat will add
the attribute system="document" to "references" element even the orginal eml didn't have it
(this is another bug and see bug 1601), so this causes metacat generated some invalid eml201
documents. This class provides a path to fix the existed invalid eml201 documents. It will
remove the attribute system="document" of the element "references" in xml_nodes and xml_index
tables.
- Author:
- tao
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
EML201DocumentCorrector
public EML201DocumentCorrector()Default constructor
-
-
Method Details
-
run
public boolean run()It will remove the records - attribute system="document" of element "refrence" in both xml_nodes and xml_index table. Since xml_index has a foreign key (nodeid)which references nodeid in xml_nodes table, we should delete records in xml_index table first. -
main
Runs the job to correct eml201 documents - deleting extral nodes in- Parameters:
argus
-- Throws:
Exception
-