<commit_before>import { RequestMethod, Response, ResponseOptions, ResponseType } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { ArchiveEntry } from '../models/archive-entry';
import { ArchiveTableEntry } from '../models/archive-table-entry';
import { Credential } from '../models/credential';
import { Entries } from '../models/entries';
import { EntriesPoint } from '../models/entries-point';
import { Entry } from '../models/entry';
import { Filter } from '../models/filter';
import { Link } from '../models/link';
import { Pagination } from '../models/pagination';
import { Token } from '../models/token';
import { MetadataField } from './../models/metadata-field';
import { MetadataTableFields } from './../models/metadata-table-fields';
import { ModelArchives } from './../models/model-archives';
import { ModelLink } from './../models/model-link';
import { ModelTables } from './../models/model-tables';
import { QueryFragment } from './../models/query-fragment';
import { QueryBuilderService } from './../providers/query-builder-service';
import { EntryPointResponse } from './response//entry-point-response';
import { LicensePointResponse } from './response//license-point-response';
import { LocationResponse } from './response//location-response';
import { TokenResponse } from './response//token-response';
import { ArchiveEntryResponse } from './response/archive-entry-response';
import { EntriesResponse } from './response/entries-response';
import { ErrorResponse } from './response/error-response';
import { ModelArchivesPointResponse } from './response/model-archives-point-response';
import { ModelFieldsPointResponse } from './response/model-fields-point-response';
import { ModelTablesPointResponse } from './response/model-tables-point-response';
import { ParentImageEntriesResponse } from './response/parent-image-entries-response';

export class ImsBackendMock extends MockBackend {

  public baseUrl: string = 'http://restserver:9000';
  public segmentName: string = 'Ims Mobile Rest Segement';
  public credential: Credential = new Credential(this.baseUrl, 'admin', 'admin', this.segmentName);
  public unauthorizedResponse: ErrorResponse = new ErrorResponse(new ResponseOptions({
    body: 'HTTP ERROR: 401',
    status: 401,
    statusText: 'Unauthorized',
    type: ResponseType.Error
  }));
  public entryPointUrl: string = this.baseUrl + '/rest';
  public licenseUrl: string = this.entryPointUrl + '/license';
  public infoUrl: string = this.entryPointUrl + '/info';
  public entriesUrl: string = this.entryPointUrl + '/entries';
  public modelsUrl: string = this.entryPointUrl + '/models';
  public tokensUrl: string = this.licenseUrl + '/tokens';
  public tokenLoadingUrl: string = this.tokensUrl + '/ABCDE';
  public filterId: number = 40;
  public filterResourceUrl: string = `${this.entriesUrl}/${this.filterId}`;
  public version: string = 'V17Q1';
  public versionResponse: any = { version: this.version };
  public tokenName: string = '<PASSWORD>';
  public tokenExpirationDate: string = '2015-10-28T16:45:12Z';
  public token: Token = new Token(this.tokenName, this.tokenExpirationDate);
  public modelArchiveName: string = 'workflow_db1';
  public policeFilter: Filter = new Filter(this.filterResourceUrl, this.filterId.toString(), 'IMS_Mobile_Client', this.modelArchiveName);
  public medicineFilter: Filter = new Filter(this.entriesUrl + '/42', '41', 'IMS_Mobile_Client', 'medref');
  public notAppFilter: Filter = new Filter(this.entriesUrl + '/42', '42', 'Wrong_Filter_Name', 'any_archive');
  public filterTable: Filter[] = [this.policeFilter, this.medicineFilter, this.notAppFilter];
  public containerRequestUrl: string = this.filterResourceUrl + '/Bild/uploads';
  public parentImageEntriesUrl: string = this.filterResourceUrl + '/Fall';
  public query: QueryFragment[] = [new QueryFragment('testkey', 'testvalue')];
  public queryBuilder: QueryBuilderService = new QueryBuilderService();
  public parentImageEntriesUrlWithQuery: string = this.parentImageEntriesUrl + this.queryBuilder.generate(this.query);
  public archiveEntry: ArchiveEntry = new ArchiveEntry('workflow db1', [new ArchiveTableEntry('Art'), new ArchiveTableEntry('Fall', this.parentImageEntriesUrl), new ArchiveTableEntry('Bild', null, null, this.containerRequestUrl)]);
  public uploadContainerUrl: string = this.containerRequestUrl + '/XYZ';<commit_msg>test: make entries url consistent with filter id in backend mock<commit_after>import { RequestMethod, Response, ResponseOptions, ResponseType } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { ArchiveEntry } from '../models/archive-entry';
import { ArchiveTableEntry } from '../models/archive-table-entry';
import { Credential } from '../models/credential';
import { Entries } from '../models/entries';
import { EntriesPoint } from '../models/entries-point';
import { Entry } from '../models/entry';
import { Filter } from '../models/filter';
import { Link } from '../models/link';
import { Pagination } from '../models/pagination';
import { Token } from '../models/token';
import { MetadataField } from './../models/metadata-field';
import { MetadataTableFields } from './../models/metadata-table-fields';
import { ModelArchives } from './../models/model-archives';
import { ModelLink } from './../models/model-link';
import { ModelTables } from './../models/model-tables';
import { QueryFragment } from './../models/query-fragment';
import { QueryBuilderService } from './../providers/query-builder-service';
import { EntryPointResponse } from './response//entry-point-response';
import { LicensePointResponse } from './response//license-point-response';
import { LocationResponse } from './response//location-response';
import { TokenResponse } from './response//token-response';
import { ArchiveEntryResponse } from './response/archive-entry-response';
import { EntriesResponse } from './response/entries-response';
import { ErrorResponse } from './response/error-response';
import { ModelArchivesPointResponse } from './response/model-archives-point-response';
import { ModelFieldsPointResponse } from './response/model-fields-point-response';
import { ModelTablesPointResponse } from './response/model-tables-point-response';
import { ParentImageEntriesResponse } from './response/parent-image-entries-response';

export class ImsBackendMock extends MockBackend {

  public baseUrl: string = 'http://restserver:9000';
  public segmentName: string = 'Ims Mobile Rest Segement';
  public credential: Credential = new Credential(this.baseUrl, 'admin', 'admin', this.segmentName);
  public unauthorizedResponse: ErrorResponse = new ErrorResponse(new ResponseOptions({
    body: 'HTTP ERROR: 401',
    status: 401,
    statusText: 'Unauthorized',
    type: ResponseType.Error
  }));
  public entryPointUrl: string = this.baseUrl + '/rest';
  public licenseUrl: string = this.entryPointUrl + '/license';
  public infoUrl: string = this.entryPointUrl + '/info';
  public entriesUrl: string = this.entryPointUrl + '/entries';
  public modelsUrl: string = this.entryPointUrl + '/models';
  public tokensUrl: string = this.licenseUrl + '/tokens';
  public tokenLoadingUrl: string = this.tokensUrl + '/ABCDE';
  public filterId: number = 40;
  public filterResourceUrl: string = `${this.entriesUrl}/${this.filterId}`;
  public version: string = 'V17Q1';
  public versionResponse: any = { version: this.version };
  public tokenName: string = 'EDFC';
  public tokenExpirationDate: string = '2015-10-28T16:45:12Z';
  public token: Token = new Token(this.tokenName, this.tokenExpirationDate);
  public modelArchiveName: string = 'workflow_db1';
  public policeFilter: Filter = new Filter(this.filterResourceUrl, this.filterId.toString(), 'IMS_Mobile_Client', this.modelArchiveName);
  public medicineFilter: Filter = new Filter(this.entriesUrl + '/41', '41', 'IMS_Mobile_Client', 'medref');
  public notAppFilter: Filter = new Filter(this.entriesUrl + '/42', '42', 'Wrong_Filter_Name', 'any_archive');
  public filterTable: Filter[] = [this.policeFilter, this.medicineFilter, this.notAppFilter];
  public containerRequestUrl: string = this.filterResourceUrl + '/Bild/uploads';
  public parentImageEntriesUrl: string = this.filterResourceUrl + '/Fall';
  public query: QueryFragment[] = [new QueryFragment('testkey', 'testvalue')];
  public queryBuilder: QueryBuilderService = new QueryBuilderService();
  public parentImageEntriesUrlWithQuery: string = this.parentImageEntriesUrl + this.queryBuilder.generate(this.query);
  public archiveEntry: ArchiveEntry = new ArchiveEntry('workflow db1', [new ArchiveTableEntry('Art'), new ArchiveTableEntry('Fall', this.parentImageEntriesUrl), new ArchiveTableEntry('Bild', null, null, this.containerRequestUrl)]);
  public uploadContainerUrl: string = this.containerRequestUrl + '/XYZ';
{'fraction_non_alphanumeric': 0.14208328631080014, 'fraction_numerical': 0.00880261821464846, 'mean_word_length': 5.227687983134223, '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': '7032955', 'n_tokens_mistral': 2448, 'n_tokens_neox': 2373, 'n_words': 633}