Comments (7)
Updated CdmToMods metadata parser class to handle the simplified mappings file structure in commit feac7a3. Documentation and examples are still required.
from mik.
The private function getCDMtoModsMappingArray in CdmToMods.php is duplicated in the (also private) parent Mods class. I would recommend removing it from the Modc class but the mapping doesn't need to be specific to CONTENTdm. Could we keep it in the Mods class and reference it from the CdmToMods class so we could reuse it in other child classes?
from mik.
Thank you @mjordan for the comment. I'll review the code in the classes more closely and make changes as appropriate. My first thought is that we will need to rename getCDMtoModsMappingArray to remove the short-hand reference to CONTENTdm in the method in the parent Mods class and use something more generic.
from mik.
@mjordan I've opened a more general review issue related to your comment. Thank you again for your ongoing suggestions and comments.
from mik.
Just tested creating a mappings file in Excel 2013, LibreOffice Calc, and Google Sheets. Excel and Sheets export CSV like this:
title,,<titleInfo><title>%value%</title></titleInfo>,Testing titles
subject,en,"<subject authority=""foo"">%value%</subject>",Testing subjects….
That is, with annoying escaped quotation marks around the attribute value, and no option that I could see to not do that. LibreOffice Calc did provide an option to define the text delimiter, which allows you to specify none, producing this ready-to-use mappings file:
title,,<titleInfo><title>%value%</title></titleInfo>,,Just testing
subject,,<subject authority="lsch"><topic>%value%</topic></subject>,,Testing
I can't think of a case where a comma would appear in any of these fields other than the note field, or perhaps in the target element field if the target was a literal string containing a comma.
from mik.
After reflecting on the use of "language of field" in the mapping file, it was determined that it was best to handle this in the "target element", which is typically an XML snippet. In the case of MODS XML snippets, manually setting the lang attribute in a MODS element (or child element) provides greater control.
TASK: Remove "language of field" from the mappings file and related code.
from mik.
The 'language of field' has been removed from the default mappings file structure. See commit 76118cd.
The default mappings file now has the following structure:
source field label | target element | note |
---|
The 'note' field is optional.
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
- OAI-PMH Filegetter only works for DC HOT 11
- 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.