User Tools

Site Tools


old:changing_the_prefix_for_incremental_oids

This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Changing the Prefix for Incremental OIDs

This is useful when you are using greenstone to ingest into DSpace, and want a slightly shorter identifier. (the HASH ones are wider than the screen, making citation of items difficult)


I worked out the quick and dirty way of changing the prefix when doing an incremental OID

Note: This seems to work…use at own risk.

the file that needs to be changed greenstone/perllib/doc.pm

Just look for the "D" and replace it with whatever you want. In my case this was in greenstone/perllib/doc.pm (about a third of the way down)

    } elsif ($self->{'OIDtype'} eq "incremental") {
        $OID = "QUILT" . $OIDcount;
        $OIDcount ++;

(sorry no line numbers)

The dreaded "D" also appears in greentone/bin/scripts/import.pl - but it is commented out.

Please let me know if this doesn't work, breaks your collection, greenstone, your computer or sets fire to your house.

Cheers,

Stephen


Michael Dewsnip provided the following note, just in case you were tempted to leave the prefix blank.

 Hi Stephen,
 
 Your change should be fine.
 
 Just in case you're curious, the reason that the OIDs can't be purely
 numerical is that they might conflict with the indexer document numbers.
old/changing_the_prefix_for_incremental_oids.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1