Sha256: df6492c361ab8c50d1eac6eff9edff81be9f683325eca11f32ce1b1bf8289631
Contents?: true
Size: 741 Bytes
Versions: 41
Compression:
Stored size: 741 Bytes
Contents
module ActiveFedora module RdfObject extend ActiveSupport::Concern included do include RdfNode attr_reader :rdf_subject, :graph end def graph @graph ||= RDF::Graph.new @graph end def initialize(graph, subject=nil) subject ||= RDF::Node.new @graph = graph @rdf_subject = subject insert_type_assertion end def get_values(subject, predicate) predicate = find_predicate(predicate) unless predicate.kind_of? RDF::URI return TermProxy.new(@graph, @subject, predicate) end private def insert_type_assertion rdf_type = self.class.rdf_type @graph.insert([@rdf_subject, RDF.type, rdf_type]) if rdf_type end end end
Version data entries
41 entries across 41 versions & 1 rubygems