Class: Krikri::Enrichments::DcmiEnforcer
- Inherits:
-
Object
- Object
- Krikri::Enrichments::DcmiEnforcer
- Includes:
- Audumbla::FieldEnrichment
- Defined in:
- lib/krikri/enrichments/dcmi_enforcer.rb
Overview
Removes non-DCMI Type values from a field
Constant Summary collapse
- TERMS =
RDF::DCMITYPE.to_a
Instance Method Summary collapse
-
#enrich_value(value) ⇒ DPLA::MAP::Controlled::DCMIType?
The original value or ‘nil`.
Instance Method Details
#enrich_value(value) ⇒ DPLA::MAP::Controlled::DCMIType?
Returns the original value or ‘nil`.
13 14 15 16 17 |
# File 'lib/krikri/enrichments/dcmi_enforcer.rb', line 13 def enrich_value(value) return nil unless value.is_a? DPLA::MAP::Controlled::DCMIType return nil unless TERMS.include? value.rdf_subject value end |