use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class SphereGraphBuilderPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<IntegerParameterValue> n = IntegerParameterType.build(N_PARAMETER_ID);
n.setName("Number of nodes");
n.setDescription("The number of nodes on the graph");
n.setIntegerValue(100);
IntegerParameterType.setMinimum(n, 6);
params.addParameter(n);
final PluginParameter<IntegerParameterValue> t = IntegerParameterType.build(T_PARAMETER_ID);
t.setName("Number of transactions");
t.setDescription("The number of transactions on the graph");
t.setIntegerValue(50);
IntegerParameterType.setMinimum(t, 0);
params.addParameter(t);
ArrayList<String> modes = new ArrayList<>();
modes.add("Random vertices");
modes.add("1 path, next neighbour");
modes.add("1 path, random vertices");
final PluginParameter<SingleChoiceParameterType.SingleChoiceParameterValue> option = SingleChoiceParameterType.build(OPTION_PARAMETER_ID);
option.setName("Transaction options");
option.setDescription("How to add transactions to the graph");
SingleChoiceParameterType.setOptions(option, modes);
SingleChoiceParameterType.setChoice(option, modes.get(0));
params.addParameter(option);
final PluginParameter<BooleanParameterValue> randomChars = BooleanParameterType.build(ADD_CHARS_PARAMETER_ID);
randomChars.setName("Add random chars to vertex name");
randomChars.setDescription("Add random chars to vertex name");
randomChars.setBooleanValue(true);
params.addParameter(randomChars);
final PluginParameter<BooleanParameterValue> addLabels = BooleanParameterType.build(USE_LABELS_PARAMETER_ID);
addLabels.setName("Add labels");
addLabels.setDescription("Labels nodes and transactions");
addLabels.setBooleanValue(true);
params.addParameter(addLabels);
final PluginParameter<BooleanParameterValue> allChars = BooleanParameterType.build(USE_ALL_DISPLAYABLE_CHARS_PARAMETER_ID);
allChars.setName("All displayable chars");
allChars.setDescription("Use all displayable chars in labels");
allChars.setBooleanValue(false);
params.addParameter(allChars);
final PluginParameter<BooleanParameterValue> drawManyTx = BooleanParameterType.build(DRAW_MANY_TX_PARAMETER_ID);
drawManyTx.setName("Draw many transactions");
drawManyTx.setDescription("Draw lots of transactions between nodes");
drawManyTx.setBooleanValue(false);
params.addParameter(drawManyTx);
final PluginParameter<BooleanParameterValue> drawManyDeco = BooleanParameterType.build(DRAW_MANY_DECORATORS_PARAMETER_ID);
drawManyDeco.setName("Draw many decorators");
drawManyDeco.setDescription("Draw lots of decorators on nodes");
drawManyDeco.setBooleanValue(false);
params.addParameter(drawManyDeco);
final PluginParameter<BooleanParameterValue> randomIcons = BooleanParameterType.build(USE_RANDOM_ICONS_PARAMETER_ID);
randomIcons.setName("Random icons and decorators");
randomIcons.setDescription("Use random icons and decorators on nodes");
randomIcons.setBooleanValue(true);
params.addParameter(randomIcons);
final PluginParameter<BooleanParameterValue> explicitLoops = BooleanParameterType.build(EXPLICIT_LOOPS);
explicitLoops.setName("Explicit loops");
explicitLoops.setDescription("Add explicit transaction loops");
explicitLoops.setBooleanValue(true);
params.addParameter(explicitLoops);
return params;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class AddCustomBlazePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<IntegerParameterValue> vertexIdParam = IntegerParameterType.build(VERTEX_ID_PARAMETER_ID);
vertexIdParam.setName("Vertex Id");
vertexIdParam.setDescription("The vertex id to add a colour blaze");
vertexIdParam.setIntegerValue(Graph.NOT_FOUND);
parameters.addParameter(vertexIdParam);
final PluginParameter<ObjectParameterValue> vertexIdsParam = ObjectParameterType.build(VERTEX_IDS_PARAMETER_ID);
vertexIdsParam.setName("Vertex Ids");
vertexIdsParam.setDescription("The list of vertex ids to add a colour blaze (in bulk)");
vertexIdsParam.setObjectValue(null);
parameters.addParameter(vertexIdsParam);
final PluginParameter<ColorParameterValue> colorParam = ColorParameterType.build(COLOR_PARAMETER_ID);
colorParam.setName("Color");
colorParam.setDescription("The colour value");
parameters.addParameter(colorParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class RemoveBlazePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<IntegerParameterValue> vertexIdParam = IntegerParameterType.build(VERTEX_ID_PARAMETER_ID);
vertexIdParam.setName("Vertex Id");
vertexIdParam.setDescription("The vertex id of the node to set a blaze");
vertexIdParam.setIntegerValue(Graph.NOT_FOUND);
parameters.addParameter(vertexIdParam);
final PluginParameter<ObjectParameterValue> vertexIdsParam = ObjectParameterType.build(VERTEX_IDS_PARAMETER_ID);
vertexIdsParam.setName("Vertex IDs");
vertexIdsParam.setDescription("The list of vertex id's to set a blaze for in bulk");
vertexIdsParam.setObjectValue(null);
parameters.addParameter(vertexIdsParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class PermanentMergePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<IntegerParameterValue> primaryNodeParam = IntegerParameterType.build(PRIMARY_NODE_PARAMETER_ID);
primaryNodeParam.setName("Primary Vertex ID");
primaryNodeParam.setDescription("The vertex id of the primary node");
parameters.addParameter(primaryNodeParam);
final PluginParameter<ObjectParameterValue> selectedNodesParam = ObjectParameterType.build(SELECTED_NODES_PARAMETER_ID);
selectedNodesParam.setName("Selected Vertex Ids");
selectedNodesParam.setDescription("A list of the vertex ids to merge");
parameters.addParameter(selectedNodesParam);
final PluginParameter<ObjectParameterValue> attributesParam = ObjectParameterType.build(ATTTRIBUTES_PARAMETER_ID);
attributesParam.setName("Attributes");
attributesParam.setDescription("A Map of the attributes to merge which is the attribute id to the value to replace");
parameters.addParameter(attributesParam);
final PluginParameter<BooleanParameterValue> createNewNodeParam = BooleanParameterType.build(CREATE_NEW_NODE_PARAMETER_ID);
createNewNodeParam.setName("Create New Node");
createNewNodeParam.setDescription("If True, create a new node. The default is True.");
createNewNodeParam.setBooleanValue(true);
parameters.addParameter(createNewNodeParam);
final PluginParameter<BooleanParameterValue> createLoopsParam = BooleanParameterType.build(CREATE_LOOPS_PARAMETER_ID);
createLoopsParam.setName("Create Loops");
createLoopsParam.setDescription("If True, create loops. The default is True.");
createLoopsParam.setBooleanValue(true);
parameters.addParameter(createLoopsParam);
final PluginParameter<BooleanParameterValue> keepSimpleParam = BooleanParameterType.build(KEEP_SIMPLE_PARAMETER_ID);
keepSimpleParam.setName("Keep Simple");
keepSimpleParam.setDescription("If True, only include directed transactions. The default is False.");
keepSimpleParam.setBooleanValue(false);
parameters.addParameter(keepSimpleParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class PagerankCentralityPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<BooleanParameterValue> treatUndirectedBidirectionalParameter = BooleanParameterType.build(TREAT_UNDIRECTED_BIDIRECTIONAL_PARAMETER_ID);
treatUndirectedBidirectionalParameter.setName("Include Undirected");
treatUndirectedBidirectionalParameter.setDescription("Treat undirected connections as bidirectional connections");
treatUndirectedBidirectionalParameter.setBooleanValue(true);
parameters.addParameter(treatUndirectedBidirectionalParameter);
final PluginParameter<FloatParameterValue> dampingFactorParameter = FloatParameterType.build(DAMPING_FACTOR_PARAMETER_ID);
dampingFactorParameter.setName("Damping Factor");
dampingFactorParameter.setDescription("The damping factor to apply at each iteration");
dampingFactorParameter.setFloatValue(0.85F);
parameters.addParameter(dampingFactorParameter);
final PluginParameter<IntegerParameterValue> iterationsParameter = IntegerParameterType.build(ITERATIONS_PARAMETER_ID);
iterationsParameter.setName("Iterations");
iterationsParameter.setDescription("The number of iterations to run before returning a result");
iterationsParameter.setIntegerValue(100);
parameters.addParameter(iterationsParameter);
final PluginParameter<FloatParameterValue> epsilonParameter = FloatParameterType.build(EPSILON_PARAMETER_ID);
epsilonParameter.setName("Epsilon");
epsilonParameter.setDescription("The change threshold at which equilibrium can be considered reached");
epsilonParameter.setFloatValue(1E-8F);
parameters.addParameter(epsilonParameter);
final PluginParameter<BooleanParameterValue> normaliseByAvailableParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
normaliseByAvailableParameter.setName("Normalise By Max Available Score");
normaliseByAvailableParameter.setDescription("Normalise calculated scores by the maximum calculated score");
normaliseByAvailableParameter.setBooleanValue(false);
parameters.addParameter(normaliseByAvailableParameter);
return parameters;
}
Aggregations