final void checkIdType(Object id) { if (graphStore != null && !id.getClass().equals(graphStore.configuration.getEdgeIdType())) { throw new IllegalArgumentException( "The id class does not match with the expected type (" + graphStore.configuration.getEdgeIdType() .getName() + ")"); } }
final void checkIdType(Object id) { if (graphStore != null && !id.getClass().equals(graphStore.configuration.getEdgeIdType())) { throw new IllegalArgumentException( "The id class does not match with the expected type (" + graphStore.configuration.getEdgeIdType() .getName() + ")"); } }
private Object nextEdgeId() { switch (edgeAssignConfiguration) { case INTEGER: return EDGE_IDS.getAndIncrement(); case STRING: return String.valueOf(EDGE_IDS.getAndIncrement()); case DISABLED: default: throw new UnsupportedOperationException( "Automatic edge ids assignement isn't available for this type: '" + store.configuration .getEdgeIdType().getName() + "'"); } }
private Object nextEdgeId() { switch (edgeAssignConfiguration) { case INTEGER: return EDGE_IDS.getAndIncrement(); case STRING: return String.valueOf(EDGE_IDS.getAndIncrement()); case DISABLED: default: throw new UnsupportedOperationException( "Automatic edge ids assignement isn't available for this type: '" + store.configuration .getEdgeIdType().getName() + "'"); } }
public void resetConfiguration() { this.nodeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getNodeIdType())); this.edgeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getEdgeIdType())); }
public GraphFactoryImpl(GraphStore store) { this.store = store; this.nodeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getNodeIdType())); this.edgeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getEdgeIdType())); }
public GraphFactoryImpl(GraphStore store) { this.store = store; this.nodeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getNodeIdType())); this.edgeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getEdgeIdType())); }
public void resetConfiguration() { this.nodeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getNodeIdType())); this.edgeAssignConfiguration = getAssignConfiguration(AttributeUtils.getStandardizedType(store.configuration .getEdgeIdType())); }
private void serializeConfiguration(final DataOutput out) throws IOException { Configuration config = model.store.configuration; serialize(out, config.getNodeIdType()); serialize(out, config.getEdgeIdType()); serialize(out, config.getEdgeLabelType()); serialize(out, config.getEdgeWeightType()); serialize(out, config.getTimeRepresentation()); serialize(out, config.getEdgeWeightColumn()); }
private void serializeConfiguration(final DataOutput out) throws IOException { Configuration config = model.store.configuration; serialize(out, config.getNodeIdType()); serialize(out, config.getEdgeIdType()); serialize(out, config.getEdgeLabelType()); serialize(out, config.getEdgeWeightType()); serialize(out, config.getTimeRepresentation()); serialize(out, config.getEdgeWeightColumn()); }
if (!config.getEdgeIdType().equals(configuration.getEdgeIdType())) { TableImpl<Edge> edgeTable = store.edgeTable; edgeTable.store.removeColumn(GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID); edgeTable.store.addColumn(new ColumnImpl(edgeTable, GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID, config.getEdgeIdType(), "Id", null, Origin.PROPERTY, false, true)); configuration.setEdgeIdType(config.getEdgeIdType());
if (!config.getEdgeIdType().equals(configuration.getEdgeIdType())) { TableImpl<Edge> edgeTable = store.edgeTable; edgeTable.store.removeColumn(GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID); edgeTable.store.addColumn(new ColumnImpl(edgeTable, GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID, config.getEdgeIdType(), "Id", null, Origin.PROPERTY, false, true)); configuration.setEdgeIdType(config.getEdgeIdType());
.getNodeIdType(), "Id", null, Origin.PROPERTY, false, true)); edgeTable.store.addColumn(new ColumnImpl(edgeTable, GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID, configuration .getEdgeIdType(), "Id", null, Origin.PROPERTY, false, true)); if (GraphStoreConfiguration.ENABLE_ELEMENT_LABEL) { nodeTable.store.addColumn(new ColumnImpl(nodeTable, GraphStoreConfiguration.ELEMENT_LABEL_COLUMN_ID,
.getNodeIdType(), "Id", null, Origin.PROPERTY, false, true)); edgeTable.store.addColumn(new ColumnImpl(edgeTable, GraphStoreConfiguration.ELEMENT_ID_COLUMN_ID, configuration .getEdgeIdType(), "Id", null, Origin.PROPERTY, false, true)); if (GraphStoreConfiguration.ENABLE_ELEMENT_LABEL) { nodeTable.store.addColumn(new ColumnImpl(nodeTable, GraphStoreConfiguration.ELEMENT_LABEL_COLUMN_ID,