It would be great to extend the Parser to parse more than oai_dc. Work has already occurred to extend the fetcher ( http://drupal.org/node/1065452 ) so extending the parser would be a natural extension.

Comments

StevenWill’s picture

Status: Needs work » Needs review
StatusFileSize
new10.49 KB

Attached is a first attempt at adding support for parsing mets and nsdl_dc. Please review, test and provide feedback. Note: In order to test the updated parser the fetcher will need to be updated with this patch http://drupal.org/node/1065452.

StevenWill’s picture

The patch above was rolled against an old branch so I am attaching new patches for both 6 & 7. Both patches require the fetcher patch from http://drupal.org/node/1065452 (comment 14) to be applied first. Please review the code and provide comments. The patches extend the parser to parse mets & nsdl_dc in addition to oai_dc.

janusman’s picture

Status: Needs review » Needs work

The philosophy of Feeds (and this module) is to be modular. Thus:

- the Feeds fetcher just "fetches" the data. Thus, our OAI Fetcher specifies the metadata format to return (#1065452: Allow fetcher to specify among the possible metadata formats offered by the repository) along with setSpec, dates and other limits. So, its scope is clearly defined.
- Feeds passes the fetched information onto the *parser*. This is where site builders have a choice of parsers (from this and many of the available modules). This module only aimed to provide a simple parser for data coming in in oai_dc format. Other types of metadata should be handled by *different* parsers... so that site builders would specify either the oai_dc, or XPath, or [insert new parser name here] to process what's coming in from the Feeds fetcher.

So, I would not commit adding in handling of X or Y metadata to the existing parser (which is limited in scope: "handle oai_dc metadata") but would be willing to add additional parsers. So marking this as needs work.