class ActiveFedora::RDFDatastream
def resource
other nodes.
the datastream and is the central point for its relationship to
The resource is the RdfResource object that stores the graph for
#
def resource @resource ||= begin klass = self.class.resource_class klass.properties.merge(self.class.properties).each do |prop, config| klass.property(config.term, predicate: config.predicate, class_name: config.class_name) end klass.accepts_nested_attributes_for(*nested_attributes_options.keys) unless nested_attributes_options.blank? uri_stub = self.class.rdf_subject.call(self) r = klass.new(uri_stub) r.datastream = self r << deserialize r end end