OAI-PMH Identify Response

58 views
Skip to first unread message

Mathieu Deschaine

unread,
Aug 26, 2019, 12:19:08 PM8/26/19
to AtoM Users
Hi All,

I have been playing around with the OAI functionality in AtoM and I was curious if there was a way to alter the base URL for the Identify response.  For example, with our site the call for Identify would be: https://digitalcollections.ohs.org/;oai?verb=Identify

which returns:
 <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">

<responseDate>2019-08-26T15:53:17Z</responseDate>
<request verb="Identify">https://digitalcollections.ohs.org/;oai</request>
<Identify>

<repositoryName>OHS Digital Collections</repositoryName>
<baseURL>http://digitalcollections.ohs.org/index.php</baseURL>
<protocolVersion>2.0</protocolVersion>
<adminEmail>mathieu....@ohs.org</adminEmail>
<adminEmail>digitalco...@ohs.org</adminEmail>
<earliestDatestamp>2016-12-19T02:43:27Z</earliestDatestamp>
<deletedRecord>no</deletedRecord>
<granularity>YYYY-MM-DDThh:mm:ssZ</granularity>
<compression>gzip</compression>
<description>

<oai-identifier xmlns="http://www.openarchives.org/OAI/2.0/oai-identifier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai-identifier http://www.openarchives.org/OAI/2.0/oai-identifier.xsd">

<scheme>oai</scheme>
<repositoryIdentifier>digitalcollections.ohs.org</repositoryIdentifier>
<delimiter>:</delimiter>
<sampleIdentifier>oai:digitalcollections.ohs.org:orhi_100002</sampleIdentifier>
</oai-identifier>
</description>
</Identify>
</OAI-PMH>

with the base URL being <baseURL>http://digitalcollections.ohs.org/index.php</baseURL>
but it should be <baseURL>https://digitalcollections.ohs.org/</baseURL>

In OAI validators such as this: https://www.openarchives.org/Register/ValidateSite don't seem to like the difference.  Other validators like this: http://validator.oaipmh.com/ don't have much of a problem with it.

Thanks,
Mathieu Deschaine


Dan Gillean

unread,
Aug 26, 2019, 4:16:39 PM8/26/19
to ICA-AtoM Users
Hi Mathieu, 

The OAI response should be using the base URL value in Admin > Settings > Site information, so you should be able to update it there. Let me know if you run into any issues and I can do some local tests! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/9cb07201-ddc4-4bd1-8273-043ec17914a1%40googlegroups.com.

Mathieu Deschaine

unread,
Aug 26, 2019, 6:08:04 PM8/26/19
to AtoM Users
Thanks Dan, good idea.  Though I am not seeing any difference in the result after updating the URL in the Site Information settings.

Thanks,
Mathieu

Mathieu Deschaine

unread,
Aug 26, 2019, 6:42:47 PM8/26/19
to AtoM Users
Actually after playing a bit in a local test, it does change the result, just not if the change is in the scheme ("http" to "https"). 

If your site URL on the site information page in the settings, is http://your-site.org
and your repository code is "repocode"
the OAI repository Identifier in OAI Repository Settings would be "your-site.org:repocode"
and the OAI call to Identify would be give a base URL of "http://your-site.org/index.php"
add an 's' to the HTTP and the result is the same.

Change the Site information to "http://my-site.org"
and the Base URL would be "http://my-site.org/index.php"

Dan Gillean

unread,
Aug 27, 2019, 4:59:00 PM8/27/19
to ICA-AtoM Users
Hi Mathieu, 

Yes, I see what you mean. I consider this a bug in how the base URL is being constructed from the user-input value. 

As far as I can tell, the issue resides in the code here: 
I'm not a developer, but from what I can understand of this, the getBaseUrl() function uses the function described above it, parseUrlHost, on line 183. However, if you look up at the parseUrlHost function, it appears that appending http:// is hardcoded as part of the function!  I'm not entirely sure, but I suspect this is where the problem lies. 

I can't personally figure out where the /index.php is being appended, but this too should not be done unnecessarily. 

Consequently, I've filed a bug ticket here: https://projects.artefactual.com/issues/13163

Hopefully we'll be able to address this in a future release. 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

Dan Gillean

unread,
Sep 11, 2019, 11:13:09 AM9/11/19
to ICA-AtoM Users
Hello again Mathieu, 

Just wanted to let you know that one of our developers has addressed this issue in the upcoming 2.6 release! 
Thanks again for letting us know about this issue!

Regards, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

Mathieu Deschaine

unread,
Sep 12, 2019, 12:09:19 PM9/12/19
to AtoM Users
Fantastic! My thanks to you and your developers!

Best,
Mathieu Deschaine
To unsubscribe from this group and stop receiving emails from it, send an email to ica-ato...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages