public Builder direction(final Direction direction) { configuration.setProperty(DIRECTION_CFG_KEY, direction.toString()); return this; } }
public Builder direction(final Direction direction) { configuration.setProperty(DIRECTION_CFG_KEY, direction.toString()); return this; } }
private void internalToString(StringBuilder sb) { if (sb.length() > 0) { sb.append("\n"); } for (int i = 0; i < this.stepDepth; i++) { sb.append("\t"); } sb.append(this.schemaTable.toString()).append(" ") .append(this.stepDepth).append(" ") .append(this.hasContainers.toString()).append(" ") .append("Comparators = ") .append(this.sqlgComparatorHolder.toString()).append(" ") .append("Range = ") .append(String.valueOf(this.sqlgRangeHolder.getRange())).append(" ") .append(this.direction != null ? this.direction.toString() : "").append(" ") .append("isVertexStep = ").append(this.isEdgeVertexStep()) .append(" isUntilFirst = ").append(this.isUntilFirst()) .append(" labels = ").append(this.labels); for (SchemaTableTree child : children) { child.internalToString(sb); } }
private void internalToString(StringBuilder sb) { if (sb.length() > 0) { sb.append("\n"); } for (int i = 0; i < this.stepDepth; i++) { sb.append("\t"); } sb.append(this.schemaTable.toString()).append(" ") .append(this.stepDepth).append(" ") .append(this.hasContainers.toString()).append(" ") .append("Comparators = ") .append(this.sqlgComparatorHolder.toString()).append(" ") .append("Range = ") .append(String.valueOf(this.sqlgRangeHolder.getRange())).append(" ") .append(this.direction != null ? this.direction.toString() : "").append(" ") .append("isVertexStep = ").append(this.isEdgeVertexStep()) .append(" isUntilFirst = ").append(this.isUntilFirst()) .append(" labels = ").append(this.labels); for (SchemaTableTree child : children) { child.internalToString(sb); } }
public static Vertex vertexToVertex(Vertex source, Edge edge, Direction direction) { switch (direction) { case OUT: return edge.inVertex(); case IN: return edge.outVertex(); case BOTH: Vertex outV = edge.outVertex(); Vertex inV = edge.inVertex(); if (outV.id().equals(inV.id())) return outV; //points to self if (source.id().equals(inV.id())) return outV; if (source.id().equals(outV.id())) return inV; default: throw new IllegalArgumentException(direction.toString()); } }
public static Vertex vertexToVertex(Vertex originalVertex, Edge edge, Direction direction) { switch (direction) { case OUT: return edge.inVertex(); case IN: return edge.outVertex(); case BOTH: Vertex outV = edge.outVertex(); Vertex inV = edge.inVertex(); if(outV.id().equals(inV.id())) return originalVertex; //points to self if(originalVertex.id().equals(inV.id())) return outV; if(originalVertex.id().equals(outV.id())) return inV; default: throw new IllegalArgumentException(direction.toString()); } }