Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(mediatorResolveQuadPattern: Mediator, IActionRdfResolveQuadPattern, IActorTest, IActorRdfResolveQuadPatternOutput>,
context: ActionContext, emptyPatterns: Map,
skipEmptyPatterns: boolean) {
this.mediatorResolveQuadPattern = mediatorResolveQuadPattern;
this.sources = context.get(KEY_CONTEXT_SOURCES);
this.contextDefault = context.delete(KEY_CONTEXT_SOURCES);
this.emptyPatterns = emptyPatterns;
this.skipEmptyPatterns = skipEmptyPatterns;
this.algebraFactory = new Factory();
// Initialize sources in the emptyPatterns datastructure
if (this.skipEmptyPatterns) {
this.sources.iterator().on('data', (source: IDataSource) => {
if (!this.emptyPatterns.has(source)) {
this.emptyPatterns.set(source, []);
}
});
}
}