Class: Krikri::Enrichments::DedupNodes
- Inherits:
-
Object
- Object
- Krikri::Enrichments::DedupNodes
- Includes:
- Audumbla::FieldEnrichment
- Defined in:
- lib/krikri/enrichments/dedup_nodes.rb
Overview
Enrichment to remove duplicate blank nodes from an ActiveTriples::Resource, where “duplicate” means having the same ‘providedLabel`. URIs and Literal values are retained.
Instance Method Summary collapse
-
#enrich_value(value) ⇒ Object
The original value altered to remove nodes with the same ‘providedLabel`, if any.
Instance Method Details
#enrich_value(value) ⇒ Object
Returns the original value altered to remove nodes with the same ‘providedLabel`, if any.
40 41 42 43 44 |
# File 'lib/krikri/enrichments/dedup_nodes.rb', line 40 def enrich_value(value) return value unless value.is_a? ActiveTriples::Resource deduplicate_resource(value) value end |