Revision 5709
Added by ben leinfelder over 13 years ago
MCTestCase.java | ||
---|---|---|
76 | 76 |
protected static String EML2_0_0 = "EML2_0_0"; |
77 | 77 |
protected static String EML2_0_1 = "EML2_0_1"; |
78 | 78 |
protected static String EML2_1_0 = "EML2_1_0"; |
79 |
protected static String EML2_1_1 = "EML2_1_1"; |
|
80 |
|
|
79 | 81 |
|
80 | 82 |
protected boolean SUCCESS = true; |
81 | 83 |
protected boolean FAILURE = false; |
... | ... | |
147 | 149 |
+ " packageId=\"eml.1.1\" system=\"knb\"" |
148 | 150 |
+ " xsi:schemaLocation=\"eml://ecoinformatics.org/eml-2.1.0 eml.xsd\"" |
149 | 151 |
+ " scope=\"system\">"; |
152 |
|
|
153 |
protected String testEml_211_Header = "<?xml version=\"1.0\"?><eml:eml" |
|
154 |
+ " xmlns:eml=\"eml://ecoinformatics.org/eml-2.1.1\"" |
|
155 |
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" |
|
156 |
+ " packageId=\"eml.1.1\" system=\"knb\"" |
|
157 |
+ " xsi:schemaLocation=\"eml://ecoinformatics.org/eml-2.1.1 eml.xsd\"" |
|
158 |
+ " scope=\"system\">"; |
|
150 | 159 |
|
151 | 160 |
protected String testEmlCreatorBlock = "<creator scope=\"document\"> " |
152 | 161 |
+ " <individualName> " |
... | ... | |
282 | 291 |
header = testEml_200_Header; |
283 | 292 |
} else if (emlVersion == EML2_0_1) { |
284 | 293 |
header = testEml_201_Header; |
285 |
} else { |
|
294 |
} else if (emlVersion == EML2_1_0) {
|
|
286 | 295 |
header = testEml_210_Header; |
296 |
} else { // if (emlVersion == EML2_1_1) { |
|
297 |
header = testEml_211_Header; |
|
287 | 298 |
} |
288 | 299 |
testDocument += header; |
289 | 300 |
|
290 | 301 |
// if this is a 2.1.0+ document, the document level access block sits |
291 | 302 |
// at the same level and before the dataset element. |
292 |
if (docAccessBlock != null && emlVersion.equals(EML2_1_0)) {
|
|
303 |
if (docAccessBlock != null && (emlVersion.equals(EML2_1_0) || emlVersion.equals(EML2_1_1))) {
|
|
293 | 304 |
testDocument += docAccessBlock; |
294 | 305 |
} |
295 | 306 |
|
Also available in: Unified diff
add support for EML 2.1.1