Class: Valkyrie::Persistence::Fedora::Persister::ModelConverter::GraphProperty
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Fedora::Persister::ModelConverter::GraphProperty
- Defined in:
- lib/valkyrie/persistence/fedora/persister/model_converter.rb
Overview
Class modeling RDF properties which are single, existing graphs (i. e. this inserts a single existing “child” graph into a “parent” graph)
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
-
#initialize(subject, key, graph, adapter, resource) ⇒ GraphProperty
constructor
A new instance of GraphProperty.
-
#to_graph(passed_graph = RDF::Graph.new) ⇒ RDF::Graph
Appends the existing graph to a new or existing “parent” graph.
Constructor Details
#initialize(subject, key, graph, adapter, resource) ⇒ GraphProperty
Returns a new instance of GraphProperty.
129 130 131 132 133 134 135 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 129 def initialize(subject, key, graph, adapter, resource) @subject = subject @key = key @graph = graph @adapter = adapter @resource = resource end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
122 123 124 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 122 def adapter @adapter end |
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
122 123 124 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 122 def graph @graph end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
122 123 124 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 122 def key @key end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
122 123 124 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 122 def resource @resource end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
122 123 124 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 122 def subject @subject end |
Instance Method Details
#to_graph(passed_graph = RDF::Graph.new) ⇒ RDF::Graph
Appends the existing graph to a new or existing “parent” graph
140 141 142 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 140 def to_graph(passed_graph = RDF::Graph.new) passed_graph << graph end |