greenstone.org
greenstone wiki
greenstone trac
planet greenstone

# Changing the prefix for incremental OIDs

### From GreenstoneWiki

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.

Retrieved from "http://greenstonewiki.cs.waikato.ac.nz/wiki/index.php/Changing_the_prefix_for_incremental_OIDs"

##### Views

- Article
- Discussion
- Edit
- History

##### Personal tools

- Go to greenstone.org
- Log in
- Create an account

##### Search

##### Toolbox

- What links here
- Related changes
- Upload file
- Special pages
- Printable version