Skip to content

getOutputs

Chuck May edited this page Apr 14, 2015 · 5 revisions

API

public Set<String> getOutputs(StagingSchema schema)
public Set<String> getOutputs(StagingSchema schema, Map<String, String> context)

Description

Examine all tables involved in a schema and return a Set of output keys that could be created when staging. As each mapping is examined, any mapped inputs are taken into effect. The outputs from each mapping will only be included if it passes the inclusion/exclusion criteria based on the context.

A common use-case for this API is to determine which staging outputs will be produced based on schema selection. For example, in CS, certain histology ranges will produce only summary stage.

There are multiple versions of the API, however the two commonly used operate on a single schema and optionally supply a context to use for evaluation.

Examples

Staging staging = Staging.getInstance(CsDataProvider.getInstance(CsVersion.v020550));

// get outputs without context
Set<String> outputs = staging.getOutputs(schema);

Assert.assertEquals(41, outputs.size());
Assert.assertTrue(outputs.contains("ss77"));
Clone this wiki locally