use of au.gov.asd.tac.constellation.views.analyticview.analytics.ScoreAnalyticPlugin.TransactionTypeParameterValue in project constellation by constellation-app.
the class MostLikelyCorrelatedQuestion method initialiseParameters.
@Override
public void initialiseParameters(final AnalyticPlugin<ScoreResult> plugin, final PluginParameters parameters) {
// TRANSACTION_TYPES_PARAMETER always of type MultiChoiceParameter
@SuppressWarnings("unchecked") final PluginParameter<MultiChoiceParameterValue> transactionTypeParameter = (PluginParameter<MultiChoiceParameterValue>) parameters.getParameters().get(ScoreAnalyticPlugin.TRANSACTION_TYPES_PARAMETER_ID);
final List<TransactionTypeParameterValue> newChecked = new ArrayList<>();
final List<ParameterValue> checked = transactionTypeParameter.getMultiChoiceValue().getChoicesData();
checked.forEach(parameterValue -> {
final TransactionTypeParameterValue transactionTypeParameterValue = (TransactionTypeParameterValue) parameterValue;
final SchemaTransactionType transactionType = (SchemaTransactionType) transactionTypeParameterValue.getObjectValue();
if (transactionType == null || !transactionType.isSubTypeOf(AnalyticConcept.TransactionType.SIMILARITY)) {
newChecked.add(transactionTypeParameterValue);
}
});
MultiChoiceParameterType.setChoicesData(transactionTypeParameter, newChecked);
parameters.setBooleanValue(CosineSimilarityPlugin.INCLUDE_CONNECTIONS_IN_PARAMETER_ID, true);
parameters.setBooleanValue(CosineSimilarityPlugin.INCLUDE_CONNECTIONS_OUT_PARAMETER_ID, true);
parameters.setBooleanValue(CosineSimilarityPlugin.TREAT_UNDIRECTED_BIDIRECTIONAL_PARAMETER_ID, true);
}
Aggregations