Revision 5709
Added by ben leinfelder almost 14 years ago
test/edu/ucsb/nceas/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 |
|
test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java | ||
---|---|---|
178 | 178 |
|
179 | 179 |
// if this is an EML 2.1.0 or later document, the document level access is |
180 | 180 |
// before the dataset element. |
181 |
if (emlVersion == EML2_1_0) { |
|
181 |
if (emlVersion == EML2_1_0 || emlVersion == EML2_1_1) {
|
|
182 | 182 |
testDocument += getAccessBlock("public", true, true, false, false, false); |
183 | 183 |
} |
184 | 184 |
testDocument += "<dataset scope=\"document\"><title>" + title + "</title>" |
lib/metacat.properties | ||
---|---|---|
227 | 227 |
xml.eml2_0_0namespace=eml://ecoinformatics.org/eml-2.0.0 |
228 | 228 |
xml.eml2_0_1namespace=eml://ecoinformatics.org/eml-2.0.1 |
229 | 229 |
xml.eml2_1_0namespace=eml://ecoinformatics.org/eml-2.1.0 |
230 |
xml.eml2_1_1namespace=eml://ecoinformatics.org/eml-2.1.1 |
|
230 | 231 |
xml.rdf_syntax_namespace=http://www.w3.org/1999/02/22-rdf-syntax-ns# |
231 | 232 |
xml.useFullSchemaValidation=true |
232 | 233 |
xml.packagedoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN, -//ecoinformatics.org//eml-dataset-2.0.0beta4//EN |
... | ... | |
234 | 235 |
xml.physicaldoctype=-//ecoinformatics.org//eml-physical-2.0.0beta6//EN, -//ecoinformatics.org//eml-physical-2.0.0beta4//EN |
235 | 236 |
xml.entitydoctype=-//ecoinformatics.org//eml-entity-2.0.0beta6//EN, -//ecoinformatics.org//eml-entity-2.0.0beta4//EN |
236 | 237 |
xml.packagedoctypeset=BIN,-//ecoinformatics.org//eml-access-2.0.0beta6//EN,-//ecoinformatics.org//eml-access-2.0.0beta4//EN,-//ecoinformatics.org//eml-attribute-2.0.0beta6//EN,-//ecoinformatics.org//eml-attribute-2.0.0beta4//EN,-//ecoinformatics.org//eml-constraint-2.0.0beta6//EN,-//ecoinformatics.org//eml-constraint-2.0.0beta4//EN,-//ecoinformatics.org//eml-coverage-2.0.0beta6//EN,-//ecoinformatics.org//eml-coverage-2.0.0beta4//EN,-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN,-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN,-//ecoinformatics.org//eml-entity-2.0.0beta6//EN,-//ecoinformatics.org//eml-entity-2.0.0beta4//EN,-//ecoinformatics.org//eml-literature-2.0.0beta6//EN,-//ecoinformatics.org//eml-literature-2.0.0beta4//EN,-//ecoinformatics.org//eml-physical-2.0.0beta6//EN,-//ecoinformatics.org//eml-physical-2.0.0beta4//EN,-//ecoinformatics.org//eml-project-2.0.0beta6//EN,-//ecoinformatics.org//eml-project-2.0.0beta4//EN,-//ecoinformatics.org//eml-protocol-2.0.0beta6//EN,-//ecoinformatics.org//eml-protocol-2.0.0beta4//EN,-//ecoinformatics.org//eml-software-2.0.0beta6//EN,-//ecoinformatics.org//eml-software-2.0.0beta4//EN |
237 |
xml.indexNamespaces=eml://ecoinformatics.org/eml-2.0.0,eml://ecoinformatics.org/eml-2.0.1,eml://ecoinformatics.org/eml-2.1.0 |
|
238 |
xml.indexNamespaces=eml://ecoinformatics.org/eml-2.0.0,eml://ecoinformatics.org/eml-2.0.1,eml://ecoinformatics.org/eml-2.1.0,eml://ecoinformatics.org/eml-2.1.1
|
|
238 | 239 |
xml.indexPaths= \ |
239 | 240 |
@packageId, \ |
240 | 241 |
/reviewHistory/review/packageId, \ |
... | ... | |
355 | 356 |
######## OAI-PMH section ####################################### |
356 | 357 |
|
357 | 358 |
oaipmh.maxListSize=5 |
358 |
oaipmh.repositoryIdentifier=metacat.lternet.edu
|
|
359 |
oaipmh.repositoryIdentifier=localhost:8080
|
|
359 | 360 |
AbstractCatalog.oaiCatalogClassName=edu.ucsb.nceas.metacat.oaipmh.provider.server.catalog.MetacatCatalog |
360 | 361 |
AbstractCatalog.recordFactoryClassName=edu.ucsb.nceas.metacat.oaipmh.provider.server.catalog.MetacatRecordFactory |
361 | 362 |
# Duration of resumption tokens |
... | ... | |
364 | 365 |
AbstractCatalog.granularity=YYYY-MM-DD |
365 | 366 |
#AbstractCatalog.granularity=YYYY-MM-DDThh:mm:ssZ |
366 | 367 |
# Custom Identify response values |
367 |
Identify.repositoryName=Metacat OAI-PMH Data Provider |
|
368 |
Identify.adminEmail=mailto:tech_support@LTERnet.edu
|
|
368 |
Identify.repositoryName=Local Metacat OAI-PMH Data Provider
|
|
369 |
Identify.adminEmail=mailto:admin@localhost
|
|
369 | 370 |
Identify.earliestDatestamp=2000-01-01T00:00:00Z |
370 | 371 |
Identify.deletedRecord=no |
371 | 372 |
# Append something unique like .1, .2, etc to 'Identify.description' for each occurrence |
src/loaddtdschema-oracle.sql | ||
---|---|---|
48 | 48 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
49 | 49 |
VALUES ('Schema', '@eml2_1_0namespace@', '/schema/eml-2.1.0/eml.xsd'); |
50 | 50 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
51 |
VALUES ('Schema', '@eml2_1_1namespace@', '/schema/eml-2.1.1/eml.xsd'); |
|
52 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
51 | 53 |
VALUES ('Schema', '/schema/RegistryService/RegistryEntryType.xsd', '/schema/RegistryService/RegistryEntryType.xsd'); |
52 | 54 |
|
53 | 55 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
src/upgrade-db-to-1.10.0-postgres.sql | ||
---|---|---|
20 | 20 |
|
21 | 21 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
22 | 22 |
VALUES ('Schema', 'http://dataone.org/service/types/0.5.1', '/schema/D1_SCHEMA_0_5_1/dataoneTypes.xsd'); |
23 |
|
|
23 |
|
|
24 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
25 |
VALUES ('Schema', '@eml2_1_1namespace@', '/schema/eml-2.1.1/eml.xsd'); |
|
24 | 26 |
/* |
25 | 27 |
* update the database version |
26 | 28 |
*/ |
src/loaddtdschema-postgres.sql | ||
---|---|---|
48 | 48 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
49 | 49 |
VALUES ('Schema', '@eml2_1_0namespace@', '/schema/eml-2.1.0/eml.xsd'); |
50 | 50 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
51 |
VALUES ('Schema', '@eml2_1_1namespace@', '/schema/eml-2.1.1/eml.xsd'); |
|
52 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
51 | 53 |
VALUES ('Schema', 'http://ecoinformatics.org/registryentry-1.0.0', '/schema/RegistryService/RegistryEntryType.xsd'); |
52 | 54 |
|
53 | 55 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
src/upgrade-db-to-1.10.0-oracle.sql | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
20 | 20 |
VALUES ('Schema', 'http://dataone.org/service/types/0.5.1', '/schema/D1_SCHEMA_0_5_1/dataoneTypes.xsd'); |
21 |
|
|
21 |
|
|
22 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
23 |
VALUES ('Schema', '@eml2_1_1namespace@', '/schema/eml-2.1.1/eml.xsd'); |
|
24 |
|
|
22 | 25 |
/* |
23 | 26 |
* update the database version |
24 | 27 |
*/ |
src/edu/ucsb/nceas/metacat/DocumentIdQuery.java | ||
---|---|---|
85 | 85 |
operator[0] = "UNION"; |
86 | 86 |
params.put("operator", operator); |
87 | 87 |
|
88 |
String[] doctypes = new String[5];
|
|
88 |
String[] doctypes = new String[7];
|
|
89 | 89 |
doctypes[0] = "eml://ecoinformatics.org/eml-2.0.1"; |
90 | 90 |
doctypes[1] = "eml://ecoinformatics.org/eml-2.0.0"; |
91 |
doctypes[1] = "eml://ecoinformatics.org/eml-2.1.0"; |
|
92 |
doctypes[2] = "-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN"; |
|
93 |
doctypes[3] = "-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN"; |
|
94 |
doctypes[4] = "metadata"; |
|
91 |
doctypes[2] = "eml://ecoinformatics.org/eml-2.1.0"; |
|
92 |
doctypes[3] = "eml://ecoinformatics.org/eml-2.1.1"; |
|
93 |
doctypes[4] = "-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN"; |
|
94 |
doctypes[5] = "-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN"; |
|
95 |
doctypes[6] = "metadata"; |
|
95 | 96 |
params.put("returndoctype", doctypes); |
96 | 97 |
|
97 | 98 |
String[] fields = new String[11]; |
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
118 | 118 |
public static final String EML2_0_0NAMESPACE; |
119 | 119 |
public static final String EML2_0_1NAMESPACE; |
120 | 120 |
public static final String EML2_1_0NAMESPACE; |
121 |
public static final String EML2_1_1NAMESPACE; |
|
121 | 122 |
public static final String RDF_SYNTAX_NAMESPACE; |
122 | 123 |
|
123 | 124 |
static { |
124 | 125 |
String eml200NameSpace = null; |
125 | 126 |
String eml201NameSpace = null; |
126 | 127 |
String eml210NameSpace = null; |
128 |
String eml211NameSpace = null; |
|
127 | 129 |
String rdfNameSpace = null; |
128 | 130 |
try { |
129 | 131 |
eml200NameSpace = PropertyService.getProperty("xml.eml2_0_0namespace"); |
130 | 132 |
eml201NameSpace = PropertyService.getProperty("xml.eml2_0_1namespace"); |
131 | 133 |
eml210NameSpace = PropertyService.getProperty("xml.eml2_1_0namespace"); |
134 |
eml211NameSpace = PropertyService.getProperty("xml.eml2_1_1namespace"); |
|
132 | 135 |
rdfNameSpace = PropertyService.getProperty("xml.rdf_syntax_namespace"); |
133 | 136 |
} catch (PropertyNotFoundException pnfe) { |
134 | 137 |
System.err.println("Could not get property in static block: " |
135 | 138 |
+ pnfe.getMessage()); |
136 | 139 |
} |
137 |
|
|
140 |
|
|
141 |
EML2_1_1NAMESPACE = eml211NameSpace; |
|
142 |
// "eml://ecoinformatics.org/eml-2.1.1"; |
|
138 | 143 |
EML2_1_0NAMESPACE = eml210NameSpace; |
139 | 144 |
// "eml://ecoinformatics.org/eml-2.1.0"; |
140 | 145 |
EML2_0_1NAMESPACE = eml201NameSpace; |
... | ... | |
1056 | 1061 |
|
1057 | 1062 |
if (doctype != null |
1058 | 1063 |
&& (doctype.equals(EML2_0_0NAMESPACE) |
1059 |
|| doctype.equals(EML2_0_1NAMESPACE) || doctype |
|
1060 |
.equals(EML2_1_0NAMESPACE))) { |
|
1064 |
|| doctype.equals(EML2_0_1NAMESPACE) |
|
1065 |
|| doctype.equals(EML2_1_0NAMESPACE) |
|
1066 |
|| doctype.equals(EML2_1_1NAMESPACE))) { |
|
1061 | 1067 |
proccessEml2 = true; |
1062 | 1068 |
} |
1063 | 1069 |
// flag for process inline data |
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
1443 | 1443 |
@SuppressWarnings("unused") |
1444 | 1444 |
EMLParser parser = new EMLParser(doctext[0]); |
1445 | 1445 |
documentWrapper = new DocumentImplWrapper(rule, true); |
1446 |
} else if (namespace.compareTo( |
|
1447 |
DocumentImpl.EML2_1_0NAMESPACE) == 0) { |
|
1446 |
} else if ( |
|
1447 |
namespace.compareTo(DocumentImpl.EML2_1_0NAMESPACE) == 0 |
|
1448 |
|| namespace.compareTo(DocumentImpl.EML2_1_1NAMESPACE) == 0) { |
|
1448 | 1449 |
// set eml2 base validation parser |
1449 | 1450 |
String rule = DocumentImpl.EML210; |
1450 | 1451 |
// using emlparser to check id validation |
src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java | ||
---|---|---|
443 | 443 |
String eml2_0_0NameSpace = DocumentImpl.EML2_0_0NAMESPACE; |
444 | 444 |
String eml2_0_1NameSpace = DocumentImpl.EML2_0_1NAMESPACE; |
445 | 445 |
String eml2_1_0NameSpace = DocumentImpl.EML2_1_0NAMESPACE; |
446 |
String eml2_1_1NameSpace = DocumentImpl.EML2_1_1NAMESPACE; |
|
446 | 447 |
|
448 |
|
|
447 | 449 |
if (xml == null) { |
448 | 450 |
logMetacat.debug("XMLSchemaService.findDocumentNamespace - XML doc is null. There is no namespace."); |
449 | 451 |
return namespace; |
... | ... | |
479 | 481 |
namespace = eml2_0_1NameSpace; |
480 | 482 |
} else if (namespace.indexOf(eml2_1_0NameSpace) != -1) { |
481 | 483 |
namespace = eml2_1_0NameSpace; |
484 |
} else if (namespace.indexOf(eml2_1_1NameSpace) != -1) { |
|
485 |
namespace = eml2_1_1NameSpace; |
|
482 | 486 |
} |
483 | 487 |
} |
484 | 488 |
|
src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java | ||
---|---|---|
1840 | 1840 |
pStmt = connection.prepareStatement(sql); |
1841 | 1841 |
// bind variable |
1842 | 1842 |
pStmt.setString(1, docid); |
1843 |
pStmt.setString(2, DocumentImpl.EML2_1_0NAMESPACE); |
|
1843 |
pStmt.setString(2, doctype); //DocumentImpl.EML2_1_0NAMESPACE);
|
|
1844 | 1844 |
pStmt.setString(3, docid); |
1845 | 1845 |
pStmt.setString(4, RELATION); |
1846 | 1846 |
pStmt.setString(5, dataId); |
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java | ||
---|---|---|
382 | 382 |
{ |
383 | 383 |
parserBase = DocumentImpl.EML210; |
384 | 384 |
} |
385 |
else if (docType != null && (docType.trim()).equals(DocumentImpl.EML2_1_1NAMESPACE)) |
|
386 |
{ |
|
387 |
parserBase = DocumentImpl.EML210; |
|
388 |
} |
|
385 | 389 |
// Write the document into local host |
386 | 390 |
DocumentImplWrapper wrapper = new DocumentImplWrapper(parserBase, false); |
387 | 391 |
String newDocid = wrapper.writeReplication(dbConn, |
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
579 | 579 |
&& (docType.trim()).equals(DocumentImpl.EML2_1_0NAMESPACE)) { |
580 | 580 |
logReplication.warn("ReplicationService.handleForceReplicateRequest - This is an eml2.1.0 document!"); |
581 | 581 |
parserBase = DocumentImpl.EML210; |
582 |
} else if (docType != null |
|
583 |
&& (docType.trim()).equals(DocumentImpl.EML2_1_1NAMESPACE)) { |
|
584 |
logReplication.warn("ReplicationService.handleForceReplicateRequest - This is an eml2.1.1 document!"); |
|
585 |
parserBase = DocumentImpl.EML210; |
|
582 | 586 |
} |
583 | 587 |
logReplication.warn("ReplicationService.handleForceReplicateRequest - The parserBase is: " + parserBase); |
584 | 588 |
|
build.xml | ||
---|---|---|
176 | 176 |
value="RELEASE_EML_2_0_0_UPDATE_1" /> |
177 | 177 |
<property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" /> |
178 | 178 |
<property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0" /> |
179 |
<property name="eml2_1_1-schema-tag" value="RELEASE_EML_2_1_1_RC_1" /> |
|
179 | 180 |
<property name="dataone-schema-tag" value="D1_SCHEMA_0_5_1" /> |
180 | 181 |
<property name="eml2-style-tag" value="RELEASE_EML_UTILS_0_9_0" /> |
181 | 182 |
<property name="eml2_0_0namespace" |
... | ... | |
184 | 185 |
value="eml://ecoinformatics.org/eml-2.0.1" /> |
185 | 186 |
<property name="eml2_1_0namespace" |
186 | 187 |
value="eml://ecoinformatics.org/eml-2.1.0" /> |
188 |
<property name="eml2_1_1namespace" |
|
189 |
value="eml://ecoinformatics.org/eml-2.1.1" /> |
|
187 | 190 |
<property name="stmmlnamespace" |
188 | 191 |
value="http://www.xml-cml.org/schema/stmml" /> |
189 | 192 |
<property name="eml-css" value="eml_xsl.css" /> |
... | ... | |
234 | 237 |
<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}" /> |
235 | 238 |
<filter token="eml2_0_1namespace" value="${eml2_0_1namespace}" /> |
236 | 239 |
<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}" /> |
240 |
<filter token="eml2_1_1namespace" value="${eml2_1_1namespace}" /> |
|
237 | 241 |
<filter token="stmmlnamespace" value="${stmmlnamespace}" /> |
238 | 242 |
<filter token="debugprefix" value="${debugprefix}" /> |
239 | 243 |
|
... | ... | |
326 | 330 |
value="https://code.ecoinformatics.org/code/eml/tags/${eml2_0_1-schema-tag}" /> |
327 | 331 |
<property name="svn.eml210SchemaUrl" |
328 | 332 |
value="https://code.ecoinformatics.org/code/eml/tags/${eml2_1_0-schema-tag}" /> |
333 |
<property name="svn.eml211SchemaUrl" |
|
334 |
value="https://code.ecoinformatics.org/code/eml/tags/${eml2_1_1-schema-tag}" /> |
|
329 | 335 |
<property name="svn.dataone-0.1-schema-url" |
330 | 336 |
value="https://repository.dataone.org/software/cicore/tags/${dataone-schema-tag}" /> |
331 | 337 |
<property name="svn.eml2StyleUrl" |
... | ... | |
646 | 652 |
<!-- param name="dirname" value="eml-2.1.0" / --> |
647 | 653 |
<param name="dirname" value="eml-2" /> |
648 | 654 |
</antcall> |
655 |
|
|
656 |
<!-- Checkout eml210 for given schema tag--> |
|
657 |
<svn> |
|
658 |
<export srcUrl="${svn.eml211SchemaUrl}" |
|
659 |
destPath="${build.tmp}/eml_${eml2_1_1-schema-tag}" /> |
|
660 |
</svn> |
|
661 |
<mkdir dir="lib/schema/eml-2.1.1" /> |
|
662 |
<copy todir="lib/schema/eml-2.1.1" filtering="yes"> |
|
663 |
<fileset |
|
664 |
dir="${build.tmp}/eml_${eml2_1_1-schema-tag}"> |
|
665 |
<include name="*.xsd" /> |
|
666 |
</fileset> |
|
667 |
</copy> |
|
649 | 668 |
</target> |
650 | 669 |
|
651 | 670 |
<!-- copies the dataone schemas from a local source if you don't want |
... | ... | |
805 | 824 |
<target name="get-ecogrid" depends="init" |
806 | 825 |
description="Check out ecogrid module" if="ecogrid.required"> |
807 | 826 |
<svn> |
808 |
<export srcUrl="${svn.ecogridUrl}" |
|
827 |
<export srcUrl="${svn.ecogridUrl}" force="true"
|
|
809 | 828 |
destPath="${ecogrid-dir}" /> |
810 | 829 |
</svn> |
811 | 830 |
</target> |
Also available in: Unified diff
add support for EML 2.1.1