2015-02-20 16:32:54 -05:00
|
|
|
import { bind } from 'angular2/di';
|
2015-02-18 12:04:02 -05:00
|
|
|
import { List, StringMap } from 'angular2/src/facade/collection';
|
2015-02-11 13:13:49 -05:00
|
|
|
import {
|
|
|
|
ABSTRACT, BaseException
|
|
|
|
} from 'angular2/src/facade/lang';
|
|
|
|
|
2015-02-17 17:30:24 -05:00
|
|
|
import { MeasureValues } from './measure_values';
|
|
|
|
|
2015-02-11 13:13:49 -05:00
|
|
|
/**
|
|
|
|
* A Validator calculates a valid sample out of the complete sample.
|
|
|
|
* A valid sample is a sample that represents the population that should be observed
|
|
|
|
* in the correct way.
|
|
|
|
*/
|
|
|
|
@ABSTRACT()
|
|
|
|
export class Validator {
|
2015-02-20 16:32:54 -05:00
|
|
|
static bindTo(delegateToken) {
|
|
|
|
return [
|
|
|
|
bind(Validator).toFactory(
|
|
|
|
(delegate) => delegate, [delegateToken]
|
|
|
|
)
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2015-02-11 13:13:49 -05:00
|
|
|
/**
|
|
|
|
* Calculates a valid sample out of the complete sample
|
|
|
|
*/
|
2015-02-17 17:30:24 -05:00
|
|
|
validate(completeSample:List<MeasureValues>):List<MeasureValues> {
|
2015-02-11 13:13:49 -05:00
|
|
|
throw new BaseException('NYI');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a Map that describes the properties of the validator
|
|
|
|
* (e.g. sample size, ...)
|
|
|
|
*/
|
2015-02-18 12:04:02 -05:00
|
|
|
describe():StringMap {
|
2015-02-11 13:13:49 -05:00
|
|
|
throw new BaseException('NYI');
|
|
|
|
}
|
|
|
|
}
|