Search in sources :

Example 1 with AttributeRowsMergeStrategyBuilder

use of org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategyBuilder in project gephi by gephi.

the class DataLaboratoryHelper method getAttributeRowsMergeStrategies.

/**
     * <p>Prepares an array that has one new instance of every AttributeRowsMergeStrategy implementation that is registered.</p>
     * <p>It also returns the manipulators ordered first by type and then by position.</p>
     * @return Array of all AttributeRowsMergeStrategy implementations
     */
public AttributeRowsMergeStrategy[] getAttributeRowsMergeStrategies() {
    ArrayList<AttributeRowsMergeStrategy> strategies = new ArrayList<>();
    for (AttributeRowsMergeStrategyBuilder cs : Lookup.getDefault().lookupAll(AttributeRowsMergeStrategyBuilder.class)) {
        strategies.add(cs.getAttributeRowsMergeStrategy());
    }
    sortManipulators(strategies);
    return strategies.toArray(new AttributeRowsMergeStrategy[0]);
}
Also used : AttributeRowsMergeStrategy(org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategy) ArrayList(java.util.ArrayList) AttributeRowsMergeStrategyBuilder(org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategyBuilder)

Aggregations

ArrayList (java.util.ArrayList)1 AttributeRowsMergeStrategy (org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategy)1 AttributeRowsMergeStrategyBuilder (org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategyBuilder)1