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); }
@Override public void parseAndSetValue(String key, String value, double timestamp) { ColumnDraft column = getColumn(key, value.getClass()); Object val = AttributeUtils.parse(value, column.getTypeClass()); setAttributeValue(((ColumnDraftImpl) column).getIndex(), val, timestamp); }