class Krikri::AggregationEntityBehavior

A behavior that provides methods for working with aggregations (as defined by DPLA::MAP::Aggregation), in the context of entities that are generated by activities.

@see Krikri::EntityBehavior

Public Instance Methods

entities(load = true, include_invalidated = false) click to toggle source

@param load [Boolean] Whether to load the whole record from the LDP

server.  DPLA::MAP::Aggregation#get is slow, because it results in a
network request, so this provides the possibility of avoiding it.
Default: true.

@param include_invalidated [Boolean] Whether to include entities that

have been invalidated with prov:invalidatedAtTime.  Default: false

@see Krikri::EntityBehavior::entities @return [Enumerator] DPLA::MAP::Aggregation objects

# File lib/krikri/entity_behaviors/aggregation_entity_behavior.rb, line 24
def entities(load = true, include_invalidated = false)
  activity_uris(include_invalidated) do |uri|
    agg = DPLA::MAP::Aggregation.new(uri)
    agg.get if load
    agg
  end
end