<commit_before>'use strict';

import * as angular from 'angular';

import { IBaseDataService, BaseDataService, IBaseDomainObject } from '../baseDataService/baseData.service';
import { IBaseParentDataService } from '../baseParentDataService/baseParentData.service';

export var moduleName: string = 'rl.utilities.services.baseResourceBuilder';
export var serviceName: string = 'baseResourceBuilder';

export interface IBaseResourceBuilder {
	createResource<TDataType extends IBaseDomainObject, TSearchParams>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, TSearchParams>;
	createResource<TDataType extends IBaseDomainObject>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, void>;
	createParentResource<TDataType extends IBaseDomainObject, TSearchParams, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (id: number): TResourceDictionaryType }): IBaseParentDataService<TDataType, TSearchParams, TResourceDictionaryType>;
	createParentResource<TDataType extends IBaseDomainObject, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (id: number): TResourceDictionaryType }): IBaseParentDataService<TDataType, void, TResourceDictionaryType>;
}

export class BaseResourceBuilder implements IBaseResourceBuilder {
	createResource<TDataType extends IBaseDomainObject, TSearchParams>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, TSearchParams> {
		return new BaseDataService($http, endpoint);
	}

	createParentResource<TDataType extends IBaseDomainObject, TSearchParams, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (): TResourceDictionaryType }): IBaseParentDataService<TDataType, TSearchParams, TResourceDictionaryType> {
		return null;
	}
}

angular.module(moduleName, [])
	.service(serviceName, BaseResourceBuilder);<commit_msg>Implemented createParentResource<commit_after>'use strict';

import * as angular from 'angular';

import { IBaseDataService, BaseDataService, IBaseDomainObject } from '../baseDataService/baseData.service';
import { IBaseParentDataService, BaseParentDataService } from '../baseParentDataService/baseParentData.service';

export var moduleName: string = 'rl.utilities.services.baseResourceBuilder';
export var serviceName: string = 'baseResourceBuilder';

export interface IBaseResourceBuilder {
	createResource<TDataType extends IBaseDomainObject, TSearchParams>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, TSearchParams>;
	createResource<TDataType extends IBaseDomainObject>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, void>;
	createParentResource<TDataType extends IBaseDomainObject, TSearchParams, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (id: number): TResourceDictionaryType }): IBaseParentDataService<TDataType, TSearchParams, TResourceDictionaryType>;
	createParentResource<TDataType extends IBaseDomainObject, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (id: number): TResourceDictionaryType }): IBaseParentDataService<TDataType, void, TResourceDictionaryType>;
}

export class BaseResourceBuilder implements IBaseResourceBuilder {
	createResource<TDataType extends IBaseDomainObject, TSearchParams>($http: angular.IHttpService, endpoint: string, mockData: any): IBaseDataService<TDataType, TSearchParams> {
		return new BaseDataService($http, endpoint);
	}

	createParentResource<TDataType extends IBaseDomainObject, TSearchParams, TResourceDictionaryType>
		($http: angular.IHttpService, endpoint: string, mockData: any, resourceDictionaryBuilder: { (): TResourceDictionaryType }): IBaseParentDataService<TDataType, TSearchParams, TResourceDictionaryType> {
		return new BaseParentDataService($http, endpoint, resourceDictionaryBuilder);
	}
}

angular.module(moduleName, [])
	.service(serviceName, BaseResourceBuilder);
{'fraction_non_alphanumeric': 0.09427292010370021, 'fraction_numerical': 0.0, 'mean_word_length': 9.663316582914574, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '1467308', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1119, 'n_words': 258}