org.apache.tinkerpop.gremlin.structure.Direction.toString()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中org.apache.tinkerpop.gremlin.structure.Direction.toString()方法的一些代码示例,展示了Direction.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Direction.toString()方法的具体详情如下:
包路径:org.apache.tinkerpop.gremlin.structure.Direction
类名称:Direction
方法名:toString

Direction.toString介绍

暂无

代码示例

代码示例来源:origin: apache/tinkerpop

public Builder direction(final Direction direction) {
    configuration.setProperty(DIRECTION_CFG_KEY, direction.toString());
    return this;
  }
}

代码示例来源:origin: org.apache.tinkerpop/gremlin-test

public Builder direction(final Direction direction) {
    configuration.setProperty(DIRECTION_CFG_KEY, direction.toString());
    return this;
  }
}

代码示例来源:origin: pietermartin/sqlg

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);
  }
}

代码示例来源:origin: org.umlg/sqlg-core

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);
  }
}

代码示例来源:origin: org.jboss.windup.web.addons/windup-web-support-impl

edgeDetails.put(GraphResource.DIRECTION, direction.toString());
result.put(label, edgeDetails);
  String linkUri = getLink(ctx.executionID, vertex, direction.toString(), label);
  edgeDetails.put(GraphResource.LINK, linkUri);
  continue;

代码示例来源:origin: unipop-graph/unipop

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());
  }
}

代码示例来源:origin: rmagen/elastic-gremlin

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());
  }
}

相关文章