OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How do I add a NON-OAI repository to my Database?

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Fri Aug 26, 2011 9:04 am

Hi chasan,

Your XML file does not validate. I'd suggest working with an XML editor or tool that's capable of validating the document for typos and syntax errors; I use xmllint on a Linux platform, and I've heard that XMLSpy is capable on Windows.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Fri Aug 26, 2011 12:59 pm

I use xmlspy on windows... when I try to save it, it writes that the file is not valid, but when I try to validate it in the online XML validator of the w3schools site it says that the XML is valid. The problem appears in the first lines of the code... and to be more specific here:

<Repository xmlns="http://www.openarchives.org/OAI/2.0/static-repository"
xmlns:oai="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/static-repository.xsd">
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Fri Aug 26, 2011 3:12 pm

Hi chasan,

The problem I spot is that you have [b] and [/b] wrapped around some URLs. Those are causing XML parsing problems.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Sat Aug 27, 2011 12:26 am

asmecher wrote:Hi chasan,

The problem I spot is that you have and wrapped around some URLs. Those are causing XML parsing problems.

Regards,
Alec Smecher
Public Knowledge Project Team


Oh no! Not at all! These where placed here in the forum when I tried to make bold some parts of the code.
These are not in my original code.

The problem is that I use the same URL in the Schemaplufin and I cannot understand what to write in that field in order my code be valid.
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Sat Aug 27, 2011 12:30 pm

Hi chasan,

I'd suggest doing some general reading on OAI -- I think you might be misunderstanding how it works. The contents of the XML file (e.g. the one you quoted above in this thread) are all that gets imported into the Harvester, and it's stored in a relational database (e.g. MySQL), not as XML. It looks like you've modified the sample XML file from the openarchives.org web site e.g. to just use a different base URL in the <Identify> element; that won't make a difference in the import process. Or were you just trying the sample to see how it worked?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Sat Aug 27, 2011 1:53 pm

asmecher wrote:
I'd suggest doing some general reading on OAI -- I think you might be misunderstanding how it works. The contents of the XML file (e.g. the one you quoted above in this thread) are all that gets imported into the Harvester, and it's stored in a relational database (e.g. MySQL), not as XML. It looks like you've modified the sample XML file from the openarchives.org web site e.g. to just use a different base URL in the <Identify> element; that won't make a difference in the import process.


As you mentioned above, I did exactly what you guessed.
I am in a big trouble... I still cannot get the image of this idea.
That is my main problem. If I clear this up on my mind, I think that then I could work more efficient.

The repository that I want to make harvester to fetch is as static, is not mine at all. I did not create it. I just want to extract the information I need (with application DeiXto as I mentioned some posts back) in an xml file and then reconstruct this xml file according to the rules of OAI in order to make is possible for harvester to get the records in my database.

I thought that by importing the records to my database through harvester (add archive->static repository->fetch) would automatically add all that records to my mysql database as well. Here is the part that I think that I am missing something as you said above.

I copied the first lines of the sample code because I thought that it was something standard. I changed as you saw only the url in order harvester to recognise it.

So, do I have somehow to add the records of that repository in my database first? If yes, why?

Sorry for any incovenience I cause, but the problem is that I cannot make it clear in my head.
If a get the whole image then I hope that everything is going to be easier.
Thank you again for your patience. Really appreciate it.
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Sun Aug 28, 2011 5:51 am

As far as I read the last days about static repositories, I understood that there are 2 different ways in order to create a static repository.
The Autonomous and the Dependent one.

If I choose the first one I have to make an XSL style sheet to respond to OAI-PMH requests on Web Server, which in addition requires native XSLT support in web server and XSL v.2 functionality.

In the second one there is a need of a GATEWAY to respond to OAI-PMH requests, something that you, few posts above, told me that there is no need to create one.

So as far as I understand we are dealing with the Autonomous version of static repository.
Where can I find more information about that XSL file? What do I have to write in it? Do I have to place it in the same directory with xml file of my static repository?
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Mon Aug 29, 2011 1:27 pm

Hi chasan,

The OHS software needs to be able to access an XML file that looks like the sample I directed you to earlier. It needs to get it from a URL. When it does that, it'll take the contents of the XML file and store it in the internal OHS database for browsing and searching and won't need to access the XML file again.

Whether that URL serves an XML file directly, or whether you configure the web server it's on to generate it using an XSL file, doesn't matter to OHS.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Sat Sep 10, 2011 2:00 pm

Could you please give me a simple example?
For at least one record?
(I could give you my e-mail, or use the one I have registered in the forum)
I would be grateful if you could send me an xml to upload it to my server and I will fetch it thgrough harvester in order to understand the procedure.

I have read about the xml namespaces and xml validation but still could not make it "readable" for the harvester...

Any clue? Anyone?
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Mon Sep 12, 2011 4:48 pm

Hi chasan,

I just ran a test with the example at http://www.openarchives.org/OAI/2.0/guidelines-static-repository.htm, and it works without any changes. Simply save the XML to a file, put it somewhere web-accessible (i.e. so that you can fetch it from a URL), and then give that URL to OHS. Where in the process do you get stuck trying that example?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Wed Sep 14, 2011 2:48 pm

asmecher wrote:Hi chasan,

I just ran a test with the example at http://www.openarchives.org/OAI/2.0/guidelines-static-repository.htm, and it works without any changes. Simply save the XML to a file, put it somewhere web-accessible (i.e. so that you can fetch it from a URL), and then give that URL to OHS. Where in the process do you get stuck trying that example?

Regards,
Alec Smecher
Public Knowledge Project Team


I am copying the code to a file and save it as an XML (I am using Altova XML Spy 2011).
I am transferring the file in a server (particularely in the same directory that I have the PKP harvester installed) in order to fetch it through harvester
(Admin-> Add Archives-> (enter the url)-> Fetch Metadata)

It doesn't ANYTHING at all. It does not add the records anywhere... I really cannot understand how is possible to do the same things and do not have the same results...
If I solve this my life is going to be much much easier with the University task I have to finish...
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Thu Sep 15, 2011 8:22 am

Hi chasan,

Are you able to save the archive? Once you do that, use the "Manage" link and fetch the archive contents from there. The "Fetch Metadata" link on the "Add Archive" page simply tries to populate the form you see there using the archive metadata, i.e. the title and description, but does not actually process the archive contents.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Fri Sep 16, 2011 2:26 am

No I cannot, That is the problem.
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

Re: How do I add a NON-OAI repository to my Database?

Postby asmecher » Fri Sep 16, 2011 9:21 am

Hi chasan,

Sorry, I'm having trouble following exactly what you're doing. Could you post the steps you follow, in detail?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Re: How do I add a NON-OAI repository to my Database?

Postby chasan » Fri Sep 16, 2011 2:33 pm

1. I visit the page http://www.openarchives.org/OAI/2.0/gui ... SR_example and I copied the example.
2. Save it in a .XML file (with altova XML SPY).
3. I upload it to a web server.
4. Then through PKP Harvester I do the following steps: Home > Site Administration > Archives > Add Archive .
5. At the OAI Base URL I enter the path where I have uploaded the .xml file (https://vivliothmmy.ee.auth.gr/chasan_pkp/test.xml) and I press the Fetch Metadata Archive button. (nothing really happens until here)
6. Then I press the SAVE button (I fill first the required fields with the asterisk * in order to be able to save it) and the following error message appears:

Errors occurred processing this form:
The specified OAI URL is not valid. Please check the URL and try again.
chasan
 
Posts: 28
Joined: Sat May 15, 2010 4:45 pm

PreviousNext

Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 3 guests