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 1428ddde..562d694e 100644
Binary files a/lib/eml.jar and b/lib/eml.jar differ
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
-
-
-
-
-
- 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
-
-
-
-
-
- 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
-
-
-
-
- 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
-
-
-
-
-
-
- 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