Module: Kiba::Extend::Transforms::Cspace
- Defined in:
- lib/kiba/extend/transforms/cspace.rb,
lib/kiba/extend/transforms/cspace/convert_to_id.rb,
lib/kiba/extend/transforms/cspace/address_country.rb,
lib/kiba/extend/transforms/cspace/normalize_for_id.rb,
lib/kiba/extend/transforms/cspace/flag_invalid_characters.rb
Overview
Transformations specific to preparing data for import into CollectionSpace
Using Cspace transforms when your project defines a Cspace module
If you get errors running jobs containing transforms in the Kiba::Extend::Cspace namespace in your project, and you have defined a Cspace module in your project, you will need to write the transform like:
transform Kiba::Extend::Transforms::Cspace::NormalizeForID,
source: :field,
target: :norm
Other transforms of special relevance to CollectionSpace jobs
- Append::ConvertedValueAndUnit - For augmenting Object dimension values
- Name transforms for Person authorities
- Fingerprint transforms for preparing cleanup worksheets for clients and merging completed worksheets back into migration projects
- Kiba::Extend::Transforms::Collapse::FieldsToTypedFieldPair - often useful for preparing phone type and email type fields
- Kiba::Extend::Transforms::Collapse::FieldsWithCustomFieldmap and Kiba::Extend::Transforms::Collapse::FieldsToRepeatableFieldGroup - different approaches to generating data for repeatable field groups. Kiba::Extend::Transforms::Collapse::FieldsWithCustomFieldmap makes sense if the data to be combined exists in basically the right “shape” for combining. You can just define what source fields map to what target fields without renaming fields in a particular way. When you have to explode, reshape, or create source data into a combinable form, and you can do that buy creating fields using a consistent naming convention, Kiba::Extend::Transforms::Collapse::FieldsToRepeatableFieldGroup is a simpler transform to set up, and applies Kiba::Extend::Transforms::Clean::EmptyFieldGroups automatically
Defined Under Namespace
Classes: AddressCountry, ConvertToID, FlagInvalidCharacters, NormalizeForID
Class Method Summary collapse
-
.shady_characters ⇒ Object
Characters or character combinations known to be treated strangely by CollectionSpace when creating IDs.
Class Method Details
.shady_characters ⇒ Object
Characters or character combinations known to be treated strangely by CollectionSpace when creating IDs. Used as a lookup to force the substitution we need
47 48 49 50 51 52 |
# File 'lib/kiba/extend/transforms/cspace.rb', line 47 def self.shady_characters { "ș" => "s", "t̕a" => "ta" }.freeze end |