Comments (11)
@bondjimbond there is https://github.com/MarcusBarnes/mik/blob/master/src/metadataparsers/mods/OaiToMods.php. If you use
[METADATA_PARSER]
class = mods\OaiToMods
in conjunction with
[FETCHER]
metadata_prefix = mods
(or whatever the correct metadataPrefix value is) what happens?
from mik.
[2019-07-02 18:47:56] ErrorException.ERROR: ErrorException {"message":"DOMXPath::query(): Undefined namespace prefix","code":{"record_key":"oai%3Amruir.mtroyal.ca%3A11205%2F98","raw_metadata_path":"/Volumes/Arca/tmp/oaitest_temp/oai%3Amruir.mtroyal.ca%3A11205%2F98.metadata","dom":"[object] (DOMDocument: {})","xml":"<record xmlns=\"http://www.openarchives.org/OAI/2.0/\">\n <header>\n <identifier>oai:mruir.mtroyal.ca:11205/98</identifier>\n <datestamp>2015-06-08T16:02:09Z</datestamp>\n <setSpec>com_11205_20</setSpec>\n <setSpec>com_11205_12</setSpec>\n <setSpec>col_11205_43</setSpec>\n </header>\n <metadata><mods:mods xmlns:mods=\"http://www.loc.gov/mods/v3\" xmlns:doc=\"http://www.lyncode.com/xoai\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd\">\n<mods:name>\n<mods:role>\n<mods:roleTerm type=\"text\">author</mods:roleTerm>\n</mods:role>\n<mods:namePart>Hayman, Richard</mods:namePart>\n</mods:name>\n<mods:extension>\n<mods:dateAccessioned encoding=\"iso8601\">2014-02-13T20:44:02Z</mods:dateAccessioned>\n</mods:extension>\n<mods:extension>\n<mods:dateAvailable encoding=\"iso8601\"/>\n</mods:extension>\n<mods:originInfo>\n<mods:dateIssued encoding=\"iso8601\">2009</mods:dateIssued>\n</mods:originInfo>\n<mods:identifier type=\"citation\">Hayman, R. (2009). Human rights software: Information support solutions for social justice. Information for Social Change, 29, 44-67.</mods:identifier>\n<mods:identifier type=\"issn\">1756-901X</mods:identifier>\n<mods:identifier type=\"uri\">http://hdl.handle.net/11205/98</mods:identifier>\n<mods:abstract>Human rights centres and non-governmental organizations (NGOs) have crucial information support needs, many of which can be met by the existing and ongoing development of information technology software applications. For communication and Internet use, the psiphon program allows for secure and anonymous information exchange and distribution, including firewall circumvention. For data collection, organization, encryption, and storage, Martus software can be deployed to help protect sensitive information and identities. Based on documented projects and websites, the following research examines these emancipatory tools to determine: the technologies in use, emergent, and under development; their possible usage in the critical arenas under discussion; and, the greater effects of these technologies as they relate to social justice and information access in the global information society. The purpose is to raise awareness within human rights communities and information centres about the existence and availability of these tools, so that these groups may find appropriate and accessible solutions that match their information support needs. Further, it is hoped that the information presented here will generate open, intercultural, and international discussions of human rights policy development, strategic planning, and implementation.</mods:abstract>\n<mods:language>\n<mods:languageTerm authority=\"rfc3066\">en</mods:languageTerm>\n</mods:language>\n<mods:accessCondition type=\"useAndReproduction\">Attribution-NonCommercial-NoDerivs 2.5 Canada</mods:accessCondition>\n<mods:subject>\n<mods:topic>Human rights</mods:topic>\n</mods:subject>\n<mods:subject>\n<mods:topic>Social justice</mods:topic>\n</mods:subject>\n<mods:subject>\n<mods:topic>Librarianship</mods:topic>\n</mods:subject>\n<mods:titleInfo>\n<mods:title>Human Rights Software: Information Support Solutions For Social Justice</mods:title>\n</mods:titleInfo>\n<mods:genre>Article</mods:genre>\n<mods:objectIdentifierValue>http://mruir.mtroyal.ca/xmlui/bitstream/11205/98/1/Human+Rights+Software.pdf</mods:objectIdentifierValue>\n</mods:mods>\n</metadata>\n </record>","xpath":"[object] (DOMXPath: {})"},"severity":2,"file":"/Users/brandon/sfuvault/mik/src/filegetters/OaipmhXpath.php","line":61} []
[2019-07-02 18:47:56] ErrorException.ERROR: ErrorException {"message":"problem writing package","record_key":"oai%3Amruir.mtroyal.ca%3A11205%2F98","details":"[object] (mik\\exceptions\\MikErrorException(code: 0): at /Users/brandon/sfuvault/mik/mik:105)"} []
And if I leave the METADATA_PARSER section at dc\OaiToDc
it's the same...
[2019-07-02 18:47:56] ErrorException.ERROR: ErrorException {"message":"DOMXPath::query(): Undefined namespace prefix","code":{"record_key":"oai%3Amruir.mtroyal.ca%3A11205%2F98","raw_metadata_path":"/Volumes/Arca/tmp/oaitest_temp/oai%3Amruir.mtroyal.ca%3A11205%2F98.metadata","dom":"[object] (DOMDocument: {})","xml":"<record xmlns=\"http://www.openarchives.org/OAI/2.0/\">\n <header>\n <identifier>oai:mruir.mtroyal.ca:11205/98</identifier>\n <datestamp>2015-06-08T16:02:09Z</datestamp>\n <setSpec>com_11205_20</setSpec>\n <setSpec>com_11205_12</setSpec>\n <setSpec>col_11205_43</setSpec>\n </header>\n <metadata><mods:mods xmlns:mods=\"http://www.loc.gov/mods/v3\" xmlns:doc=\"http://www.lyncode.com/xoai\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd\">\n<mods:name>\n<mods:role>\n<mods:roleTerm type=\"text\">author</mods:roleTerm>\n</mods:role>\n<mods:namePart>Hayman, Richard</mods:namePart>\n</mods:name>\n<mods:extension>\n<mods:dateAccessioned encoding=\"iso8601\">2014-02-13T20:44:02Z</mods:dateAccessioned>\n</mods:extension>\n<mods:extension>\n<mods:dateAvailable encoding=\"iso8601\"/>\n</mods:extension>\n<mods:originInfo>\n<mods:dateIssued encoding=\"iso8601\">2009</mods:dateIssued>\n</mods:originInfo>\n<mods:identifier type=\"citation\">Hayman, R. (2009). Human rights software: Information support solutions for social justice. Information for Social Change, 29, 44-67.</mods:identifier>\n<mods:identifier type=\"issn\">1756-901X</mods:identifier>\n<mods:identifier type=\"uri\">http://hdl.handle.net/11205/98</mods:identifier>\n<mods:abstract>Human rights centres and non-governmental organizations (NGOs) have crucial information support needs, many of which can be met by the existing and ongoing development of information technology software applications. For communication and Internet use, the psiphon program allows for secure and anonymous information exchange and distribution, including firewall circumvention. For data collection, organization, encryption, and storage, Martus software can be deployed to help protect sensitive information and identities. Based on documented projects and websites, the following research examines these emancipatory tools to determine: the technologies in use, emergent, and under development; their possible usage in the critical arenas under discussion; and, the greater effects of these technologies as they relate to social justice and information access in the global information society. The purpose is to raise awareness within human rights communities and information centres about the existence and availability of these tools, so that these groups may find appropriate and accessible solutions that match their information support needs. Further, it is hoped that the information presented here will generate open, intercultural, and international discussions of human rights policy development, strategic planning, and implementation.</mods:abstract>\n<mods:language>\n<mods:languageTerm authority=\"rfc3066\">en</mods:languageTerm>\n</mods:language>\n<mods:accessCondition type=\"useAndReproduction\">Attribution-NonCommercial-NoDerivs 2.5 Canada</mods:accessCondition>\n<mods:subject>\n<mods:topic>Human rights</mods:topic>\n</mods:subject>\n<mods:subject>\n<mods:topic>Social justice</mods:topic>\n</mods:subject>\n<mods:subject>\n<mods:topic>Librarianship</mods:topic>\n</mods:subject>\n<mods:titleInfo>\n<mods:title>Human Rights Software: Information Support Solutions For Social Justice</mods:title>\n</mods:titleInfo>\n<mods:genre>Article</mods:genre>\n<mods:objectIdentifierValue>http://mruir.mtroyal.ca/xmlui/bitstream/11205/98/1/Human+Rights+Software.pdf</mods:objectIdentifierValue>\n</mods:mods>\n</metadata>\n </record>","xpath":"[object] (DOMXPath: {})"},"severity":2,"file":"/Users/brandon/sfuvault/mik/src/filegetters/OaipmhXpath.php","line":61} []
[2019-07-02 18:47:56] ErrorException.ERROR: ErrorException {"message":"problem writing package","record_key":"oai%3Amruir.mtroyal.ca%3A11205%2F98","details":"[object] (mik\\exceptions\\MikErrorException(code: 0): at /Users/brandon/sfuvault/mik/mik:105)"} []
from mik.
@mjordan Really this is about the FileGetter and not the MetadataParser, isn't it? The problem is that I use an XPath to find the link to download, but XPath can't recognize it because the FileGetter defines a Dublin Core namespace and not a MODS namespace.
from mik.
I added a new filegetter to #504 to address this. No longer saying "undefined namespace prefix" -- now it's just saying "No content file found in oai-pmh record".
from mik.
@bondjimbond Since you're requesting MODS over OAI, is it safe to assume that you're source repository is Islandora? If so, then yes, I think we should just be grabbing the MODS datastream as a file and not get tangled up in metadata parsers. In that case, we can just fetch the MODS datastream using the (working?) DC metadata parser and then throw away the resulting DC XML files.
I was sure that we already had the ability to fetch any datastream we wanted using the https://github.com/MarcusBarnes/mik/wiki/Toolchain:-OAI-PMH-for-Islandora-repositories toolchain, but I need to confirm that. If not, it won't be difficult to make that happen.
from mik.
@mjordan Nope, it's actually a DSpace repository. They've got decent MODS, though, so it's nice to be able to pull that down and tweak it instead of extracting DC and then trying to reverse engineer roleTerms etc.
from mik.
Does DSpace's MODS have a predictable URL where you can download it (as per my last comment) or do you need to get it via OAI as metadata?
from mik.
You need to get it via OAI, unfortunately. The filename is made of some mix of parts of the title and some seemingly arbitrary numbers.
from mik.
Can you send me the OAI endpoint via email?
from mik.
The .ini file (which includes the endpoint) is attached to #502
from mik.
Also, here's an example file link: http://mruir.mtroyal.ca/xmlui/bitstream/11205/98/1/Human+Rights+Software.pdf
I think the 11205/98/1
is the handle, but the filename is not really predictable.
from mik.
Related Issues (20)
- include_migrated_from_uri hard-codes SFU URL HOT 11
- regex_replace filter not available? HOT 9
- Postwritehook suggestion: reorganize output by filetype? HOT 3
- CDM toolchains extracting wrong files due to repeating ID numbers HOT 6
- Toolchain: CONTENTdm compound PDFs HOT 33
- CSV Compound Child metadata ignored HOT 7
- Make extensions of page images configurable in CSV Book and Newspaper toolchains HOT 1
- Test using PHP 7.2 and 7.3
- CsvBooks doesn't like periods in filenames HOT 17
- checkconfig doesn't detect missing CSV input file
- Simple Archive toolchain HOT 72
- OAI toolchain error: "Undefined namespace prefix" HOT 1
- OAI toolchain error: "No such file or directory" HOT 1
- Mysterious mapping error? HOT 9
- OAI: If item identifier has special characters, temp metadata filename doesn't match filegetter HOT 4
- Islandora 8: Create a toolchain that produces YAML config files for CSV migrations HOT 1
- CsvCompound fails to create directories HOT 1
- Delimiter problem in CSV Newspapers toolchain? HOT 15
- Mysterious failures in the CSV Newspaper toolchain HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mik.