Graph graph = graphModel.getGraphVisible();
for (AttributeColumn column : nodeTable.getColumns()) {
if (PartitionFactory.isPartitionColumn(column) && PartitionFactory.isNodePartitionColumn(column, graph)) {
nodePartitions.add(PartitionFactory.createNodePartition(column));
} else if (PartitionFactory.isDynamicPartitionColumn(column)) {
DynamicModel dynamicModel = model.getDynamicModel();
TimeInterval timeInterval = dynamicModel != null ? dynamicModel.getVisibleInterval() : null;
Estimator estimator = AttributeUtils.getDefault().isDynamicNumberColumn(column) ? model.getNumberEstimator() : model.getEstimator();
if (PartitionFactory.isDynamicNodePartitionColumn(column, graph, timeInterval, estimator)) {
nodePartitions.add(PartitionFactory.createNodePartition(column));
}
}
}
model.setNodePartitions(nodePartitions.toArray(new NodePartition[0]));
//Edges
List<EdgePartition> edgePartitions = new ArrayList<EdgePartition>();
AttributeTable edgeClass = ac.getModel().getEdgeTable();
for (AttributeColumn column : edgeClass.getColumns()) {
if (PartitionFactory.isPartitionColumn(column) && PartitionFactory.isEdgePartitionColumn(column, graph)) {
edgePartitions.add(PartitionFactory.createEdgePartition(column));
} else if (PartitionFactory.isDynamicPartitionColumn(column)) {
DynamicModel dynamicModel = model.getDynamicModel();
TimeInterval timeInterval = dynamicModel != null ? dynamicModel.getVisibleInterval() : null;
Estimator estimator = AttributeUtils.getDefault().isDynamicNumberColumn(column) ? model.getNumberEstimator() : model.getEstimator();
if (PartitionFactory.isDynamicEdgePartitionColumn(column, graph, timeInterval, estimator)) {
edgePartitions.add(PartitionFactory.createEdgePartition(column));
}
}