<commit_before>import { Injectable } from '@angular/core';

import { Collection } from './collection.ts';

@Injectable()

export class CollectionService {
  constructor() { }

  private collections: Collection[] = [];

  getCollections() {
    this.collections = [
      new Collection('Breast', 'Breast collection', 'nowhere'),
      new Collection('Sarcoma', 'Sarcoma collection', 'nowhere')
    ];

    return this.collections;
  }
}<commit_msg>Inject the collection resource.<commit_after>import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';

import { CollectionResource } from './collection.resource.ts';

@Injectable()

export class CollectionService {
  constructor(private resource: CollectionResource) { }

  getCollections(project: string): Observable<Object[]> {
    return this.resource.find({project: project});
  }
}
{'fraction_non_alphanumeric': 0.13901869158878505, 'fraction_numerical': 0.0, 'mean_word_length': 4.713333333333333, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1328559', 'n_tokens_mistral': 241, 'n_tokens_neox': 232, 'n_words': 58}