class ActiveFedora::LdpResource

def self.graph_class

def self.graph_class
  ActiveTriples::Resource
end

def build_empty_graph

def build_empty_graph
  graph_class.new(subject_uri)
end

def build_graph(original_graph)

Returns:
  • (RDF::Graph) - A graph striped of any inlined resources present in the original

Parameters:
  • original_graph (RDF::Graph) -- The graph returned by the LDP server
def build_graph(original_graph)
  inlined_resources = get.graph.query(predicate: Ldp.contains).map { |x| x.object }
  # ActiveFedora always wants to copy the resources to a new graph because it
  # forces a cast to FedoraRdfResource
  graph_without_inlined_resources(original_graph, inlined_resources)
end

def graph_class

def graph_class
  self.class.graph_class
end