// Utility private GraphStore getIntervalGraphStore() { Configuration config = new Configuration(); config.setTimeRepresentation(TimeRepresentation.INTERVAL); GraphModelImpl graphModel = new GraphModelImpl(config); GraphStore store = graphModel.store; return store; }
protected void processConfiguration(ContainerUnloader container, Workspace workspace) { // Configuration GraphController graphController = Lookup.getDefault().lookup(GraphController.class); Configuration configuration = new Configuration(); configuration.setTimeRepresentation(container.getTimeRepresentation()); if (container.getEdgeTypeLabelClass() != null) { configuration.setEdgeLabelType(container.getEdgeTypeLabelClass()); } configuration.setNodeIdType(container.getElementIdType().getTypeClass()); configuration.setEdgeIdType(container.getElementIdType().getTypeClass()); ColumnDraft weightColumn = container.getEdgeColumn("weight"); if (weightColumn != null && weightColumn.isDynamic()) { if (container.getTimeRepresentation().equals(TimeRepresentation.INTERVAL)) { configuration.setEdgeWeightType(IntervalDoubleMap.class); } else { configuration.setEdgeWeightType(TimestampDoubleMap.class); } } graphController.getGraphModel(workspace).setConfiguration(configuration); }