Project

General

Profile

« Previous | Next » 

Revision 7328

not every EML file has an ORE datapackage descriptor -- join only to those when setting the resourceMapId

View differences:

src/doi_registration.sql
454 454
**/
455 455

  
456 456

  
457
-- update resourceMap pointer
458
-- NOTE: some of these maps might not actually exist
459
update doi_registration doi
460
set resourceMapId = 'resourceMap_'||id.docid||'.'||id.rev
461
from identifier id
462
where doi.guid = id.guid
463
and objectFormat like 'eml%';
464

  
465 457
--update the resourcemapid for described data
466 458
CREATE TABLE ecogrid_docids AS
467 459
select distinct id.docid, id.rev, id.guid, substring(xpi.nodedata from 'ecogrid://knb/(.*)$') as data_docid
......
599 591
where (publisher is null or trim(publisher) = '')
600 592
and guid like '%knb-lter-kbs%';
601 593

  
594
-- more clean up
595
update doi_registration
596
set creator = trim(creator),
597
publisher = trim(publisher);
598

  
599

  
602 600
-- copy to the external file
603 601
COPY 
604 602
(select ezid_account, 

Also available in: Unified diff