Class: Valkyrie::Persistence::Fedora::Persister::ModelConverter::CompositeProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/fedora/persister/model_converter.rb

Overview

Class modeling RDF properties which are sets of graphs (i. e. this generates a parent graph from a set of child graphs)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(properties) ⇒ CompositeProperty

Returns a new instance of CompositeProperty.

Parameters:



104
105
106
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 104

def initialize(properties)
  @properties = properties
end

Instance Attribute Details

#propertiesObject (readonly)

Returns the value of attribute properties.



101
102
103
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 101

def properties
  @properties
end

Instance Method Details

#to_graph(graph = RDF::Graph.new) ⇒ RDF::Graph

Generate the RDF graph

Parameters:

  • graph (RDF::Graph) (defaults to: RDF::Graph.new)

    RDF graph being populated with “member” graphs

Returns:

  • (RDF::Graph)

    the populated “parent” graph



111
112
113
114
115
116
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 111

def to_graph(graph = RDF::Graph.new)
  properties.each do |property|
    property.to_graph(graph)
  end
  graph
end