Revision 8028
Added by ben leinfelder over 11 years ago
src/upgrade-db-to-2.1.0-postgres.sql | ||
---|---|---|
9 | 9 |
); |
10 | 10 |
|
11 | 11 |
/* |
12 |
* Update the "metadata" doctypes to use "FGDC-STD-001-1998" formatId |
|
13 |
* now that we have a correct format for them |
|
14 |
* |
|
15 |
*/ |
|
16 |
UPDATE systemMetadata sm |
|
17 |
SET object_format = 'FGDC-STD-001-1998' |
|
18 |
FROM xml_documents xml, |
|
19 |
identifier id |
|
20 |
WHERE id.docid = xml.docid |
|
21 |
AND id.rev = xml.rev |
|
22 |
AND id.guid = sm.guid |
|
23 |
AND xml.doctype = 'metadata'; |
|
24 |
|
|
25 |
/* |
|
26 |
* and in the xml_revisions |
|
27 |
*/ |
|
28 |
UPDATE systemMetadata sm |
|
29 |
SET object_format = 'FGDC-STD-001-1998' |
|
30 |
FROM xml_revisions xml, |
|
31 |
identifier id |
|
32 |
WHERE id.docid = xml.docid |
|
33 |
AND id.rev = xml.rev |
|
34 |
AND id.guid = sm.guid |
|
35 |
AND xml.doctype = 'metadata'; |
|
36 |
|
|
37 |
/* |
|
38 |
* Increase harvest_log column length to avoid errors |
|
39 |
*/ |
|
40 |
ALTER TABLE harvest_log ALTER COLUMN harvest_operation_code TYPE VARCHAR(1000); |
|
41 |
|
|
42 |
/* |
|
12 | 43 |
* update the database version |
13 | 44 |
*/ |
14 | 45 |
UPDATE db_version SET status=0; |
src/xmltables-oracle.sql | ||
---|---|---|
586 | 586 |
harvest_date DATE, -- date of the current harvest |
587 | 587 |
status NUMBER, -- non-zero indicates an error status |
588 | 588 |
message VARCHAR2(1000), -- text message for this log entry |
589 |
harvest_operation_code VARCHAR2(30), -- the type of harvest operation
|
|
589 |
harvest_operation_code VARCHAR2(1000), -- the type of harvest operation
|
|
590 | 590 |
site_schedule_id NUMBER, -- site schedule id, or 0 if no site |
591 | 591 |
CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id) |
592 | 592 |
); |
src/upgrade-db-to-2.1.0-oracle.sql | ||
---|---|---|
9 | 9 |
); |
10 | 10 |
|
11 | 11 |
/* |
12 |
* Update the "metadata" doctypes to use "FGDC-STD-001-1998" formatId |
|
13 |
* now that we have a correct format for them |
|
14 |
* |
|
15 |
*/ |
|
16 |
UPDATE systemMetadata sm |
|
17 |
SET object_format = 'FGDC-STD-001-1998' |
|
18 |
FROM xml_documents xml, |
|
19 |
identifier id |
|
20 |
WHERE id.docid = xml.docid |
|
21 |
AND id.rev = xml.rev |
|
22 |
AND id.guid = sm.guid |
|
23 |
AND xml.doctype = 'metadata'; |
|
24 |
|
|
25 |
/* |
|
26 |
* and in the xml_revisions |
|
27 |
*/ |
|
28 |
UPDATE systemMetadata sm |
|
29 |
SET object_format = 'FGDC-STD-001-1998' |
|
30 |
FROM xml_revisions xml, |
|
31 |
identifier id |
|
32 |
WHERE id.docid = xml.docid |
|
33 |
AND id.rev = xml.rev |
|
34 |
AND id.guid = sm.guid |
|
35 |
AND xml.doctype = 'metadata'; |
|
36 |
|
|
37 |
/* |
|
38 |
* Increase harvest_log column length to avoid errors |
|
39 |
*/ |
|
40 |
ALTER TABLE harvest_log MODIFY (harvest_operation_code VARCHAR2(1000)); |
|
41 |
|
|
42 |
/* |
|
12 | 43 |
* update the database version |
13 | 44 |
*/ |
14 | 45 |
UPDATE db_version SET status=0; |
src/xmltables-postgres.sql | ||
---|---|---|
466 | 466 |
harvest_date DATE, -- date of the current harvest |
467 | 467 |
status INT8, -- non-zero indicates an error status |
468 | 468 |
message VARCHAR(1000), -- text message for this log entry |
469 |
harvest_operation_code VARCHAR(30), -- the type of harvest operation
|
|
469 |
harvest_operation_code VARCHAR(1000), -- the type of harvest operation
|
|
470 | 470 |
site_schedule_id INT8, -- site schedule id, or 0 if no site |
471 | 471 |
CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id) |
472 | 472 |
); |
src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java | ||
---|---|---|
179 | 179 |
if (doctype.trim().equals("BIN")) { |
180 | 180 |
// we don't know much about this file (yet) |
181 | 181 |
fmtid = ObjectFormatCache.getInstance().getFormat("application/octet-stream").getFormatId(); |
182 |
} else if (doctype.trim().equals("metadata")) { |
|
183 |
// special ESRI FGDC format |
|
184 |
fmtid = ObjectFormatCache.getInstance().getFormat("FGDC-STD-001-1998").getFormatId(); |
|
182 | 185 |
} else { |
183 | 186 |
try { |
184 | 187 |
// do we know the given format? |
Also available in: Unified diff
type the doctype="metadata" objects as "FGDC-STD-001-1998" formatId for rendering XSLT and for DataONE SystemMetadata.