def replace_subject(content, ds)
      ds.content = content
      if ds.respond_to?(:rdf_subject)
        # Assume the first subject in the metadata is about this object.
        old_subject = self.old_subject || ds.graph.first_subject
        new_repository = RDF::Repository.new
        ds.graph.each_statement do |statement|
          if statement.subject == old_subject
            ds.graph.delete statement
            ds.graph << RDF::Statement.new(ds.rdf_subject, statement.predicate, statement.object)
          end
        end
      end
      ds
    end
def replace_subject(content, ds)
      ds.content = content
      if ds.respond_to?(:rdf_subject)
        # Assume the first subject in the metadata is about this object.
        old_subject = self.old_subject || ds.graph.first_subject
        new_repository = RDF::Repository.new
        ds.graph.each_statement do |statement|
          if statement.subject == old_subject
            ds.graph.delete statement
            ds.graph << RDF::Statement.new(ds.rdf_subject, statement.predicate, statement.object)
          end
        end
      end
      ds
    end
Replaces the subject in RDF files with the datastream's rdf_subject.
 TODO: Deal with what happens when there's no defined datastream.