Class: Valkyrie::Persistence::Fedora::Persister::ModelConverter::CompositeProperty
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Fedora::Persister::ModelConverter::CompositeProperty
- 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
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(properties) ⇒ CompositeProperty
constructor
A new instance of CompositeProperty.
-
#to_graph(graph = RDF::Graph.new) ⇒ RDF::Graph
Generate the RDF graph.
Constructor Details
#initialize(properties) ⇒ CompositeProperty
Returns a new instance of CompositeProperty.
110 111 112 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 110 def initialize(properties) @properties = properties end |
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
107 108 109 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 107 def properties @properties end |
Instance Method Details
#to_graph(graph = RDF::Graph.new) ⇒ RDF::Graph
Generate the RDF graph
117 118 119 120 121 122 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 117 def to_graph(graph = RDF::Graph.new) properties.each do |property| property.to_graph(graph) end graph end |