EPrints Technical Mailing List Archive

Message: #01434


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Handles in EPrints


Il 08/01/2013 11:32, Ian Stuart ha scritto:
The problem I had with handle servers was adding a new record: having
created item 1234 in the repo, there was no way to inject that into the
handle server.

Uhm, should handle register it? What is the problem?


Your, what I would call "proxy pass", solution looks good. Can it be
extended so one could do:

http://hdl.handle.net/<your_prefix>/repo_id1/xyz ->
http://your.repo1.url/xyz

-and-

http://hdl.handle.net/<your_prefix>/repo_id2/xyz ->
http://your.repo2.url/xyz

?
('cos *that* would be really useful!)

On 08/01/13 09:53, Jose Martin wrote:
In case someone is working with the Handle System (migrating from DSpace
to EPrints, for instance), version 7 brings template handles which make
it much easier to provide an EPrints repository with persistent URLs.

While previous versions required a new record to be created in the local
Handle server database for every persistent URL like
http://hdl.handle.net/<prefix>/<item_id>  to be resolved, we are now able
to simply define a template that will map any

http://hdl.handle.net/<your_prefix>/xyz

to

http://your.repo.url/xyz

Assuming the following scenario:

- 7.x Handle server set up and running

- A prefix (institutional id registered in the Handle System) homed on
that server. We’ll use 123456 for this example

- Your EPrints repository is located at http://your.repo.url

Here is how:

1. For handle 123456: create a Simple URL with the value
http://your.repo.url

2. For handle 0.NA/123456: add an HS_NAMESPACE entry with the following
UTF8 Text value:

      <namespace>

        <template delimiter="/">

          <foreach>

            <if value="type" test="equals" expression="URL">

                <value data= "${data}/${extension}" />

            </if>

            <else>

                <value />

            </else>

          </foreach>

        </template>

      </namespace>

And we’re done! Any URL with the format http://hdl.handle.net/123456/*
will be resolved as http://your.repo.url/*. Even non-valid handles, but
you get a lightweight local handle server that does the job.

Especially dedicated to Ian and John, after our handles conversation at
OR2012   :)

Cheers,

                  Jose