<commit_before>class DCollection
  include DSO

  def self.all()
    java_import org.dspace.content.Collection;
    return Collection.findAll(DSpace.context)
  end

  def self.findAll(name)
    java_import org.dspace.content.Collection;
    self.all.select do |c|
      c.getName == name
    end
  end

  def report()
    rpt = dso_report
    rpt[:name] = @obj.getName();
    group = @obj.getSubmitters();
    rpt[:submitters] = DGroup.new(group).report if group
    [1, 2, 3].each do |i|
      group = @obj.getWorkflowGroup(i);
      if (group) then
        rpt["workflow_group_#{i}".to_sym] = DGroup.new(group).report;<commit_msg>add workflows method do dcollection<commit_after>class DCollection
  include DSO

  def self.all()
    java_import org.dspace.content.Collection;
    return Collection.findAll(DSpace.context)
  end

  def self.findAll(name)
    java_import org.dspace.content.Collection;
    self.all.select do |c|
      c.getName == name
    end
  end

  def workflows
    java_import org.dspace.workflow.WorkflowItem
    WorkflowItem.findByCollection(DSpace.context, @obj)
  end

  def report()
    rpt = dso_report
    rpt[:name] = @obj.getName();
    group = @obj.getSubmitters();
    rpt[:submitters] = DGroup.new(group).report if group
    [1, 2, 3].each do |i|
      group = @obj.getWorkflowGroup(i);
      if (group) then
        rpt["workflow_group_#{i}".to_sym] = DGroup.new(group).report;
{'fraction_non_alphanumeric': 0.12376237623762376, 'fraction_numerical': 0.004243281471004243, 'mean_word_length': 3.161764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4978951', 'n_tokens_mistral': 504, 'n_tokens_neox': 491, 'n_words': 102}