From d44c143f0c44420ea1dab2d4fb2b7d0037c62be0 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Sun, 2 Dec 2018 23:50:59 +0100 Subject: [PATCH] Update tests to detect invalid files. Also add annotation tests for invalid files. Related to issue #328. --- build.xml | 14 - lib/eml.jar | Bin 31050 -> 31152 bytes lib/sample/eml-sample.xml | 351 ------ lib/sample/sampleLTERIntellectualRights.xml | 129 -- .../ecoinformatics/emltest/EMLParserTest.java | 21 +- src/test/resources/eml-data-paper.xml | 2 +- src/test/resources/eml-unitDictionary.xml | 1057 ----------------- .../eml-datasetInvalidGringpoint.xml | 6 +- .../invalidEML/eml-error-annot-missing-id.xml | 27 + .../eml-error-annot-ref-missing.xml | 28 + .../invalidEML/eml-error-references.xml | 8 +- src/test/resources/invalidEML/eml-error1.xml | 4 +- src/test/resources/invalidEML/eml-error3.xml | 6 +- src/test/resources/invalidEML/eml-error4.xml | 4 +- 14 files changed, 83 insertions(+), 1574 deletions(-) delete mode 100644 lib/sample/eml-sample.xml delete mode 100644 lib/sample/sampleLTERIntellectualRights.xml delete mode 100644 src/test/resources/eml-unitDictionary.xml create mode 100755 src/test/resources/invalidEML/eml-error-annot-missing-id.xml create mode 100755 src/test/resources/invalidEML/eml-error-annot-ref-missing.xml diff --git a/build.xml b/build.xml index 2a4975d9..2e865778 100644 --- a/build.xml +++ b/build.xml @@ -125,7 +125,6 @@ - @@ -364,19 +363,6 @@ - - - - - - - - - - ************************************************ - copied from ${sample.dir} - ************************************************ - diff --git a/lib/eml.jar b/lib/eml.jar index 1428ddde9f4e3194d2272c71242d4061fe24f481..562d694e08c2fd38d95b9a406351774215684071 100644 GIT binary patch delta 2916 zcmY+`X*3jU8wc<)*0E)0EMs3r_OWH(BAKx-!&uWpqRnJi7&Wo%hW$eumKP#F7` zJ*3E*C1jhTdQInj&vV}U!~Hwgb=~JW=l=E|_)bxCK*4BfMoC2v0MG#dFv1f?C{T&; zL@g2M)%v7Ihe1&oY2g&LVh6so{~TI=6Z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qMtN6cablZ-W{Y(c;x12% zYSSF#8CMb#k#_e+%ee+~q)1(gaK2E9J}hl6I{a{`&~I3{$kT3o%Q7S^4O4RH8!q}P zbK8@^8|Tz~fsPYP*BnBP^L?qbOofm4Isg|vaaEpP$t>%w^%^CF1T>8kkvwD=+R$U* zJlETqX`(M2p69$W{{g1ladaIoPbu-zd_AY6uX18_3ta#)y_Q*}w9C8ka$UL@90%#@ zj@E6;h(G)23s+0-rSN@++qK@B*%tR$9IgZm!Tu@pQ1ia2)OW!Yg7R6Jm5}ttL2tKi zSqs`m2zOs$!L`pjGM;MJnnu6YH(!?x#Ko)_a0VtUw39E*iuPL2FYFx+z0w~Y4qH~)+= zcZ+q7QkV@?S!Fm9K{EZ+FeawG5BzVm106&=ih$=3FFSqFv0B`0#e-{k4kS?{PacFh z5=Yc&c4ZcIoK19;37e)UGd6os=4{SJpJPv^M(eVxu4qR#vN6tVVq@&s^u@TaQH}k# znGoyAuD-_F^Z#GmBbnn+?2iXHSIu-9$yvYe$s|LIDR^6)}Dc9HCre*kuQGJpU8 diff --git a/lib/sample/eml-sample.xml b/lib/sample/eml-sample.xml deleted file mode 100644 index c00b0c48..00000000 --- a/lib/sample/eml-sample.xml +++ /dev/null @@ -1,351 +0,0 @@ - - - - - Data from Cedar Creek LTER on productivity and species richness - for use in a workshop titled "An Analysis of the Relationship between - Productivity and Diversity using Experimental Results from the Long-Term - Ecological Research Network" held at NCEAS in September 1996. - - - Mr. - Clarence - Lehman - -
- Department of Ecology Evolution and Behavior - - 100 Ecology Bldg - 1987 Upper Buford Circle - St. Paul - MN - 55108-6097 - USA -
- 612-624-6731 - lehman@lter.umn.edu -
- - - Mr. - Richard - Inouye - -
- Department of Biological Science - Idaho State University - Campus Box 8007 - Pocatello - ID - 83209-8007 - USA -
- 208-236-2933 - inouye@lter.umn.edu -
- - Old field grassland - biomass - productivity - species-area - species richness - - - clarence.lehman - - - richard.inouye - - - Cedar Creek LTER Program - - - Tilman - - Principal Investigator - - Funding is from a grant from the National Science Foundation. - - National Science Foundation - https://doi.org/10.13039/00000001 - 1546024 - Scientia Arctica: A Knowledge Archive for Discovery and Reproducible Science in the Arctic - https://www.nsf.gov/awardsearch/showAward?AWD_ID=1546024 - - - - CDR LTER-patterns among communities.txt - patterns amoung communities at CDR - - CDR LTER-patterns among communities.txt - 1245 - ASCII - - - 1 - column - - \t - - - - - - http://metacat.nceas.ucsb.edu/knb/servlet/metacat?action=read&docid=knb.46.1 - - - - - - fld - Field - Field where the data was collected - - string - - - - - Valid names of fields - - - - - - - year - year - The year the data was collected - - gYear - - - YYYY - 1 - - - 1944 - - - - - - - sr - Species Richness - Species richness for CDR - float - - - dimensionless - 0.5 - - real - - 0 - - - - - - - pctcov - percent cover - The percent ground cover on the field - - float - - - dimensionless - 0.1 - - real - - 0 - 100 - - - - - - - avesr91 - Average Species Richness for 1991 - The average species richness for the field in 1991 - - float - - - dimensionless - 0.1 - - real - - 0 - - - - - - - avesr92 - Average Species Richness for 1992 - The average species richness for the field in 1992 - - float - - - dimensionless - 0.1 - nd.5 - - - - - avesr93 - Average Species Richness for 1993 - The average species richness for the field in 1993 - - float - - - dimensionless - 0.1 - nd.5 - - - - - avesr94 - Average Species Richness for 1994 - The average species richness for the field in 1994 - - float - - - dimensionless - 0.1 - nd.5 - - - - - avesr95 - Average Species Richness for 1995 - The average species richness for the field in 1995 - - float - - - dimensionless - 0.1 - nd.5 - - - - - avesr96 - Average Species Richness for 1996 - The average species richness for the field in 1996 - - float - - - dimensionless - 0.1 - nd.5 - - - - - MeanSR - mean species richness - the mean species richness from 1991 to 1996 - - float - - - dimensionless - 0.1 - nd.5 - - - - - biomass - Biomass - The total biomass measured in this field - - float - - - gramsPerSquareMeter - 0.01 - - real - - 0 - - - - - - - sppm2 - Species Per Square Meter - Calculated species per square meter - - float - - - speciesPerSquareMeter - 0.01 - - real - - 0 - - - - - - - time - Time - The time of day for this observation, 24 hour clock - - time - - - hh:mm:ss.s - 0.1 - - - 15:00:00.0 - 19:00:00.0 - - - - - - - no - 22 - -
- - - - - - - - - -
diff --git a/lib/sample/sampleLTERIntellectualRights.xml b/lib/sample/sampleLTERIntellectualRights.xml deleted file mode 100644 index 1bdbc5ca..00000000 --- a/lib/sample/sampleLTERIntellectualRights.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - My Dataset - - - McCartney - - - -
- Definitions - - - - Data Set - Digital data and its metadata derived from any research activity such as field observations, collections, laboratory analysis, experiments, or the post-processing of existing data and identified by a unique identifier issued by a recognized cataloging authority such as a site, university, agency, or other organization. - - - Data User - individual to whom access has been granted to this Data Set, including his -or her immediate collaboration sphere, defined here as the institutions, partners, students -and staff with whom the Data User collaborates, and with whom access must be granted, -in order to fulfill the Data User's intended use of the Data Set - - - Data Set Creator - individual or institution that produced the Data Set - - - Data Set Owner – individual or institution that holds intellectual property rights to the -dataset. Note that this may or may not be defined as a legal copyright. If no other party is -designated in the metadata as Data Set Owner, it may be presumed that these rights are -held by the Data Set Creator. - - - Data Set Distributor- individual or institution providing access to the Data Sets. - - - Data Set Contact - party designated in the accompanying metadata of the Data Set as -the primary contact for the Data Set. - - - -
-
- Conditions of Use - The re-use of scientific data has the potential to greatly increase communication, collaboration -and synthesis within and among disciplines, and thus is fostered, supported and encouraged. -Permission to use this dataset is granted to the Data User free of charge subject to the following -terms: - - - - Acceptable use. Use of the dataset will be restricted to academic, research, educational, -government, recreational, or other not-for-profit professional purposes. The Data User is -permitted to produce and distribute derived works from this dataset provided that they are -released under the same license terms as those accompanying this Data Set. Any other -uses for the Data Set or its derived products will require explicit permission from the -dataset owner. - - - Redistribution. The data are provided for use by the Data User. The metadata and this -license must accompany all copies made and be available to all users of this Data Set. -The Data User will not redistribute the original Data Set beyond this collaboration sphere. - - - - Citation. It is considered a matter of professional ethics to acknowledge the work of other -scientists. Thus, the Data User will properly cite the Data Set in any publications or in the -metadata of any derived data products that were produced using the Data Set. Citation -should take the following general form: Creator, Year of Data Publication, Title of -Dataset, Publisher, Dataset identifier. For example: - - McKee, W. 2001. Vascular plant list on the Andrews Experimental Forest and nearby Research -Natural Areas: Long-Term Ecological Research. Corvallis, OR: Forest Science Data Bank: -SA002. [Database]. http://www.fsl.orst.edu/lter/data/abstract.cfm?dbcode=SA002. (21 October -2004) - - - Acknowledgement. The Data User should acknowledge any institutional support or -specific funding awards referenced in the metadata accompanying this dataset in any -publications where the Data Set contributed significantly to its content. -Acknowledgements should identify the supporting party, the party that received the -support, and any identifying information such as grant numbers. For example: - -Data sets were provided by the Forest Science Data Bank, a partnership between the -Department of Forest Science, Oregon State University, and the U.S. Forest Service Pacific -Northwest Research Station, Corvallis, Oregon. Significant funding for collection of these -data was provided by the National Science Foundation Long-Term Ecological Research -program (NSF Grant numbers BSR-90-11663 and DEB-96-32921). - - - - Notification. The Data User will notify the Data Set Contact when any derivative work or -publication based on or derived from the Data Set is distributed. The Data User will -provide the data contact with two reprints of any publications resulting from use of the -Data Set and will provide copies, or on-line access to, any derived digital products. -Notification will include an explanation of how the Data Set was used to produce the -derived work. - - - - Collaboration. The Data Set has been released in the spirit of open scientific -collaboration. Data Users are thus strongly encouraged to consider consultation, -collaboration and/or co-authorship with the Data Set Creator. - - - - By accepting this Data Set, the Data User agrees to abide by the terms of this agreement. The -Data Owner shall have the right to terminate this agreement immediately by written notice upon -the Data User's breach of, or non-compliance with, any of its terms. The Data User may be held -responsible for any misuse that is caused or encouraged by the Data User's failure to abide by the -terms of this agreement. -
-
- Disclaimer - - While substantial efforts are made to ensure the accuracy of data and documentation contained in -this Data Set, complete accuracy of data and metadata cannot be guaranteed. All data and -metadata are made available "as is". The Data User holds all parties involved in the production or -distribution of the Data Set harmless for damages resulting from its use or interpretation. - -
-
- - Data Manager, CAP LTER - -
-
diff --git a/src/test/java/org/ecoinformatics/emltest/EMLParserTest.java b/src/test/java/org/ecoinformatics/emltest/EMLParserTest.java index 156b9912..cf8ae588 100644 --- a/src/test/java/org/ecoinformatics/emltest/EMLParserTest.java +++ b/src/test/java/org/ecoinformatics/emltest/EMLParserTest.java @@ -109,27 +109,30 @@ public void testParse() } } - // at least one invalid should not validate + // All of the invalid files should not validate // NOTE: EMLParser does not validate against the schema (see SAXParserTest) int failures = 0; File invalidDir = new File(INVALID_DIR); Vector invalidList = getXmlFiles(invalidDir); for (int i=0; i < invalidList.size(); i++) { File invalidFile = (File)invalidList.elementAt(i); - try { System.err.println("Invalidating file: " + invalidFile.getName()); + try { + System.err.println("Invalidating file: " + invalidFile.getName()); emlp = new EMLParser(invalidFile); - + System.err.println(" Valid."); } catch (Exception e) { - failures++; - assertTrue(e.getMessage() != null); - break; + System.err.println(" Invalid."); + failures++; + assertTrue(e.getMessage() != null); + break; } } - if (failures == 0) { - fail("Error: An EMLParserException should have been thrown at least once."); + if (failures != invalidList.size()) { + System.err.println(failures + "/" + invalidList.size() + " failures in directory."); + fail("Error: An EMLParserException should have been thrown for all invalid files."); } - try { + try { File f = new File(ERROR1); emlp = new EMLParser(f); fail("Error 1. An EMLParserException should have been thrown."); diff --git a/src/test/resources/eml-data-paper.xml b/src/test/resources/eml-data-paper.xml index 1ae69277..641c8484 100644 --- a/src/test/resources/eml-data-paper.xml +++ b/src/test/resources/eml-data-paper.xml @@ -5,7 +5,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 xsd/eml.xsd" packageId="doi:10.18739/A2KK3F" system="https://arcticdata.io"> - + Polaris Project 2017: Permafrost carbon and nitrogen, Yukon-Kuskokwim Delta, Alaska diff --git a/src/test/resources/eml-unitDictionary.xml b/src/test/resources/eml-unitDictionary.xml deleted file mode 100644 index 7883c8df..00000000 --- a/src/test/resources/eml-unitDictionary.xml +++ /dev/null @@ -1,1057 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a designation asserting the absence of an associated unit - - - - SI unit of time - - - - SI unit of length - - - - SI unit of mass - - - - SI unit of temperature - - - - SI unit of charge - - - - SI unit of electrical current - - - - SI unit of substance amount - - - - SI unit of luminosity - - - - a number - - - - cubic meter - - - - - - one minute excluding leap seconds, 60 seconds - - - one hour excluding leap seconds, 3600 seconds - - - one day excluding leap seconds, 86400 seconds - - - one day excluding leap seconds, 604800 seconds - - - one year excluding leap seconds and leap days, 31536000 seconds - - - one 366 day year excluding leap seconds, 31622400 seconds - - - - - 0.000000000001 kg - - - 0.000000001 kg - - - 0.000001 kg - - - 0.00001 kg - - - 0.0001 kg - - - 0.001 kg - - - .01 kg - - - .1 kg - - - 1000 kg - - - - metric ton or tonne - - - - 1 pound in the Avoirdupois (commerce) scale - - - standard US (short) ton = 2000 lbs - - - - - A common unit of temperature - - - - An obsolescent unit of temperature still used in popular meteorology - - - - - .000000001 meters - - - .000001 meters - - - .000001 meters - - - .001 meters - - - .01 meters - - - .1 meters - - - 10 meters - - - 100 meters - - - 1000 meters - - - 1000000 meters - - - 1/10000000000 meter - - - - An imperial measure of length - - - 12 inches - - - 12 inches - - - 12 inches - - - 6 feet - - - nautical mile - - - 3 feet - - - This is an ESRI unit and the multiplier comes from ESRI. It - may not be accurate. - - - This is an ESRI unit and the multiplier comes from ESRI. It - may not be accurate. - - - This is an ESRI unit and the multiplier comes from ESRI. It - may not be accurate. - - - 5280 ft or 1609.344 meters - - - - - 1/1000000 of a second - - - 1/100000 of a second - - - 1/1000 of a second - - - 1/100 of a second - - - 1/10 of a second - - - 10 seconds - - - 100 seconds - - - 1000 seconds - - - 1000000 seconds - - - 60 seconds - - - 3600 seconds - - - - - 1 cubic meter - - - 1/1000000 of a liter - - - 1/1000 of a liter - - - 1000 cm^3 - - - - US liquid gallon - - - US liquid quart - - - - 1 bushel = 35.23907 liters - - - - cubic inch - - - - US liquid pint - - - - - - 2 pi radians comprise a unit circle. - - - 360 degrees comprise a unit circle - - - a plane angle equivalent to 1/400 of a full circle - - - - - megahertz - - - kilohertz - - - hertz - - - millihertz - - - - - newton - - - - - joule = N*m - - - 1 cal = 4.1868 J - - - 1 btu = 1055.0559 J - - - 1 ft-lbs = 1.355818 J - - - - - lumen - - - - - lux - - - - - becquerel - - - - - gray - - - - - sievert - - - - - katal - - - - - henry - - - - - megawatt - - - kilowatt - - - watt = J/s - - - milliwatt - - - - - megavolt - - - kilovolt - - - volt - - - millivolt - - - - - farad - - - - - ohm - - - - - ohm meters - - - - - siemen - - - - - weber - - - - - tesla - - - - - pascal - - - megapascal - - - kilopascal - - - - 1 atmosphere = 101325 pascals - - - 1 bar = 100000 pascals - - - millibar - - - - - kilograms per square meter - - - grams per square meter - - - milligrams Per Square Meter - - - kilograms per hectare - - - metric ton or tonne per hectare - - - lbs/square inch - - - - - kilogram per cubic meter - - - milligrams per milliliter - - - grams per liter - - - milligrams Per Cubic Meter - - - micrograms / liter - - - milligrams / liter - - - grams per cubic centimeter - - - grams per milliliter - - - - - grams Per (Liter Per Day) - - - - - liters per second - - - cubic meters per second - - - cubic feet per second - - - - - square meters - - - 100 square meters - - - 1 hectare is 10^4 square meters - - - square kilometers - - - square millmeters - - - square centimeters - - - - 1 acre = 4046.8564 square meters or 1 hectare = 2.4710 acres - - - - 12 inches squared - - - 36 inches squared - - - 1 mile squared - - - - - liters per square meter - - - bushels per acre -- 1 bushel = 35.23907 liters/1 acre = 4046.8564 squareMeters - - - liters per hectare - - - - - square meters per kilogram - - - - - meters per second - - - meters per day - - - feet per day - - - feet per second - - - feet per hour - - - yards per second - - - miles per hour - - - miles per second - - - miles per minute - - - centimeters per second - - - millimeters per second - - - centimeter Per Year - - - knots - - - km/hr - - - - - meters per second squared - - - - - 1/meters - - - - - cubic meters per kilogram - - - - cubic micrometers per gram - - - - - ampere per meter squared - - - - - ampere per meter - - - - - mole per cubic meter - - - molarity = moles/liter - - - - - molality = moles/kg - - - - - candela Per Square Meter - - - - - meters squared per second - - - meters squared per day - - - feet squared per day - - - - - kilograms per meter sqared per second - - - grams Per Centimeter Squared Per Second - - - grams Per Meter Squared Per Year - - - grams Per Hectare Squared Per Day - - - kilograms Per Hectare Per Year - - - kilograms Per Meter Squared Per Year - - - - - moles per kilogram - - - moles per gram - - - millimoles per gram - - - - - moles per kilogram per second - - - nanomoles Per Gram Per Second - - - - - kilograms per second - - - tonnes Per Year - - - grams Per Year - - - - - number per meter squared - - - number per kilometer squared - - - - - number per meter cubed - - - - number of entities per liter - - - - number of entities per milliliter - - - - - meters per gram - - - - - number of entities per gram - - - - - grams per gram - - - micrograms per gram - - - - - cubic centimeters per cubic centimeter - - - - - diff --git a/src/test/resources/invalidEML/eml-datasetInvalidGringpoint.xml b/src/test/resources/invalidEML/eml-datasetInvalidGringpoint.xml index 03eb7ff5..6c2556e7 100755 --- a/src/test/resources/invalidEML/eml-datasetInvalidGringpoint.xml +++ b/src/test/resources/invalidEML/eml-datasetInvalidGringpoint.xml @@ -1,6 +1,8 @@ - + A title dataset with bad gringpoints. diff --git a/src/test/resources/invalidEML/eml-error-annot-missing-id.xml b/src/test/resources/invalidEML/eml-error-annot-missing-id.xml new file mode 100755 index 00000000..faaa0269 --- /dev/null +++ b/src/test/resources/invalidEML/eml-error-annot-missing-id.xml @@ -0,0 +1,27 @@ + + + + Sample datset Description + + + Smith + + + + + Johnson + + + + 23445 + + + + http://purl.org/dc/elements/1.1/subject + http://purl.obolibrary.org/obo/ENVO_01000177 + + + diff --git a/src/test/resources/invalidEML/eml-error-annot-ref-missing.xml b/src/test/resources/invalidEML/eml-error-annot-ref-missing.xml new file mode 100755 index 00000000..94a26886 --- /dev/null +++ b/src/test/resources/invalidEML/eml-error-annot-ref-missing.xml @@ -0,0 +1,28 @@ + + + + Sample datset Description + + + Smith + + + + + Johnson + + + + 23445 + + + + + + http://purl.org/dc/elements/1.1/subject + http://purl.obolibrary.org/obo/ENVO_01000177 + + diff --git a/src/test/resources/invalidEML/eml-error-references.xml b/src/test/resources/invalidEML/eml-error-references.xml index e27df68b..ef3111d8 100755 --- a/src/test/resources/invalidEML/eml-error-references.xml +++ b/src/test/resources/invalidEML/eml-error-references.xml @@ -1,8 +1,8 @@ - + Sample datset Description diff --git a/src/test/resources/invalidEML/eml-error1.xml b/src/test/resources/invalidEML/eml-error1.xml index 50710a29..d78060f8 100644 --- a/src/test/resources/invalidEML/eml-error1.xml +++ b/src/test/resources/invalidEML/eml-error1.xml @@ -1,9 +1,9 @@ + xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 eml.xsd"> Sample dataset Description diff --git a/src/test/resources/invalidEML/eml-error3.xml b/src/test/resources/invalidEML/eml-error3.xml index c31481aa..3971e461 100644 --- a/src/test/resources/invalidEML/eml-error3.xml +++ b/src/test/resources/invalidEML/eml-error3.xml @@ -1,9 +1,9 @@ + xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 eml.xsd"> Sample dataset Description @@ -81,7 +81,7 @@ Johnson - 23447 diff --git a/src/test/resources/invalidEML/eml-error4.xml b/src/test/resources/invalidEML/eml-error4.xml index b921a956..76e14aa5 100644 --- a/src/test/resources/invalidEML/eml-error4.xml +++ b/src/test/resources/invalidEML/eml-error4.xml @@ -1,9 +1,9 @@ + xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 eml.xsd"> Sample dataset Description