module ActiveFedora::FedoraAttributes
Public Instance Methods
create_date()
click to toggle source
Calls superclass method
# File lib/active_fedora/fedora_attributes.rb, line 19 def create_date super.first end
modified_date()
click to toggle source
Calls superclass method
# File lib/active_fedora/fedora_attributes.rb, line 23 def modified_date super.first end
resource()
click to toggle source
The resource is the RdfResource object that stores the graph for the datastream and is the central point for its relationship to other nodes.
set_value
, get_value, and property accessors are delegated to this object.
# File lib/active_fedora/fedora_attributes.rb, line 42 def resource # Appending the graph at the end is necessary because adding it as the # parent leaves behind triples not related to the ldp_source's rdf # subject. @resource ||= self.class.resource_class.new(@ldp_source.graph.rdf_subject, data: @ldp_source.graph.graph.data) end
set_value(*args)
click to toggle source
Override ActiveTriples method for setting properties
# File lib/active_fedora/fedora_attributes.rb, line 31 def set_value(*args) raise ReadOnlyRecord if readonly? resource.set_value(*args) end