Search in sources :

Example 1 with PluginParameters

use of au.gov.asd.tac.constellation.plugins.parameters.PluginParameters in project constellation by constellation-app.

the class KatzCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<FloatParameterValue> alphaParameter = FloatParameterType.build(ALPHA_PARAMETER_ID);
    alphaParameter.setName("Alpha");
    alphaParameter.setDescription("The attenuation factor");
    alphaParameter.setFloatValue(0.1F);
    parameters.addParameter(alphaParameter);
    final PluginParameter<FloatParameterValue> betaParameter = FloatParameterType.build(BETA_PARAMETER_ID);
    betaParameter.setName("Beta");
    betaParameter.setDescription("The weight attributed to the immediate neighbourhood");
    betaParameter.setFloatValue(1.0F);
    parameters.addParameter(betaParameter);
    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> normaliseByPossibleParameter = BooleanParameterType.build(NORMALISE_POSSIBLE_PARAMETER_ID);
    normaliseByPossibleParameter.setName("Normalise By Max Possible Score");
    normaliseByPossibleParameter.setDescription("Normalise calculated scores by the maximum possible score");
    normaliseByPossibleParameter.setBooleanValue(true);
    parameters.addParameter(normaliseByPossibleParameter);
    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;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 2 with PluginParameters

use of au.gov.asd.tac.constellation.plugins.parameters.PluginParameters in project constellation by constellation-app.

the class DirectedShortestPathsPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters params = new PluginParameters();
    final PluginParameter<SingleChoiceParameterValue> sourceNode = SingleChoiceParameterType.build(SOURCE_NODE_PARAMETER_ID);
    sourceNode.setName("Source Node");
    sourceNode.setDescription("The source node is used to dictate the direction");
    params.addParameter(sourceNode);
    return params;
}
Also used : PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters) SingleChoiceParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.SingleChoiceParameterType.SingleChoiceParameterValue)

Example 3 with PluginParameters

use of au.gov.asd.tac.constellation.plugins.parameters.PluginParameters in project constellation by constellation-app.

the class EigenvectorCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    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> normaliseByPossibleParameter = BooleanParameterType.build(NORMALISE_POSSIBLE_PARAMETER_ID);
    normaliseByPossibleParameter.setName("Normalise By Max Possible Score");
    normaliseByPossibleParameter.setDescription("Normalise calculated scores by the maximum possible score");
    normaliseByPossibleParameter.setBooleanValue(true);
    parameters.addParameter(normaliseByPossibleParameter);
    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;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 4 with PluginParameters

use of au.gov.asd.tac.constellation.plugins.parameters.PluginParameters in project constellation by constellation-app.

the class HitsCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    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;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 5 with PluginParameters

use of au.gov.asd.tac.constellation.plugins.parameters.PluginParameters in project constellation by constellation-app.

the class RatioOfReciprocityPlugin 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<BooleanParameterValue> normaliseToScoresParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
    normaliseToScoresParameter.setName("Normalise By Max Available Score");
    normaliseToScoresParameter.setDescription("Normalise calculated scores by the maximum calculated score");
    normaliseToScoresParameter.setBooleanValue(false);
    parameters.addParameter(normaliseToScoresParameter);
    return parameters;
}
Also used : BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Aggregations

PluginParameters (au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)377 Test (org.testng.annotations.Test)185 Plugin (au.gov.asd.tac.constellation.plugins.Plugin)60 BooleanParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue)60 PluginInteraction (au.gov.asd.tac.constellation.plugins.PluginInteraction)58 PluginParameter (au.gov.asd.tac.constellation.plugins.parameters.PluginParameter)58 StringParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue)52 IntegerParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue)48 ArrayList (java.util.ArrayList)47 Graph (au.gov.asd.tac.constellation.graph.Graph)37 SingleChoiceParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.SingleChoiceParameterType.SingleChoiceParameterValue)34 PluginException (au.gov.asd.tac.constellation.plugins.PluginException)32 MultiChoiceParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.MultiChoiceParameterType.MultiChoiceParameterValue)24 List (java.util.List)20 Map (java.util.Map)20 GraphWriteMethods (au.gov.asd.tac.constellation.graph.GraphWriteMethods)19 GraphRecordStore (au.gov.asd.tac.constellation.graph.processing.GraphRecordStore)19 ObjectParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.ObjectParameterType.ObjectParameterValue)19 ReadableGraph (au.gov.asd.tac.constellation.graph.ReadableGraph)17 IOException (java.io.IOException)17