switch (event.getEventType()) {
case REMOVE_NODES_AND_EDGES:
if (!edgeDynamicColumns.isEmpty() && event.getData().removedEdges() != null) {
AttributeColumn[] dynamicCols = edgeDynamicColumns.toArray(new AttributeColumn[0]);
for (Edge e : event.getData().removedEdges()) {
Attributes attributeRow = e.getEdgeData().getAttributes();
for (int i = 0; i < dynamicCols.length; i++) {
DynamicType<?> ti = (DynamicType) attributeRow.getValue(dynamicCols[i].getIndex());
if (ti != null) {
for (Interval interval : ti.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)) {
timeIntervalIndex.remove(interval);
}
}
}
}
}
if (!nodeDynamicColumns.isEmpty() && event.getData().removedNodes() != null) {
AttributeColumn[] dynamicCols = nodeDynamicColumns.toArray(new AttributeColumn[0]);
for (Node n : event.getData().removedNodes()) {
Attributes attributeRow = n.getNodeData().getAttributes();
for (int i = 0; i < dynamicCols.length; i++) {
DynamicType<?> ti = (DynamicType) attributeRow.getValue(dynamicCols[i].getIndex());
if (ti != null) {
for (Interval interval : ti.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)) {
timeIntervalIndex.remove(interval);
}
}