public String toString() { graph.setCurrentGraphInThreadLocal(); if (getLabel() == null) return StringFactory.E + StringFactory.L_BRACKET + getId() + StringFactory.R_BRACKET + StringFactory.L_BRACKET + getVertex(Direction.OUT).getId() + StringFactory.ARROW + getVertex(Direction.IN).getId() + StringFactory.R_BRACKET; return StringFactory.edgeString(this); }
public String toString() { graph.setCurrentGraphInThreadLocal(); final String clsName = getRecord().getClassName(); if (clsName.equals(CLASS_NAME)) return StringFactory.vertexString(this); return StringFactory.V + "(" + clsName + ")" + StringFactory.L_BRACKET + getId() + StringFactory.R_BRACKET; }
/** * Returns a string representation of the edge. */ public String toString() { if (setCurrentGraphInThreadLocal() != null) { if (getLabel() == null) return StringFactory.E + StringFactory.L_BRACKET + getId() + StringFactory.R_BRACKET + StringFactory.L_BRACKET + getVertex( Direction.OUT).getId() + StringFactory.ARROW + getVertex(Direction.IN).getId() + StringFactory.R_BRACKET; return StringFactory.edgeString(this); } else return StringFactory.E + StringFactory.L_BRACKET + getId(); }
/** * Returns a string representation of the vertex. */ public String toString() { setCurrentGraphInThreadLocal(); final ODocument record = getRecord(); if (record == null) return "<invalid record " + rawElement.getIdentity() + ">"; final String clsName = record.getClassName(); if (OrientVertexType.CLASS_NAME.equals(clsName)) return StringFactory.vertexString(this); return StringFactory.V + "(" + clsName + ")" + StringFactory.L_BRACKET + getId() + StringFactory.R_BRACKET; }
throw ExceptionFactory.vertexWithIdDoesNotExist(this.getId());
private void writeEdge(OrientEdge edge, OJSONWriter json) throws IOException { json.beginObject(); json.writeAttribute("@rid", edge.getIdentity()); json.writeAttribute("@class", edge.getRecord().getClassName()); json.writeAttribute("out", edge.getVertex(Direction.OUT).getId()); json.writeAttribute("in", edge.getVertex(Direction.IN).getId()); for (String field : edge.getPropertyKeys()) { final Object v = edge.getProperty(field); if (v != null) json.writeAttribute(field, v); } json.endObject(); } }
final OIdentifiable destinationVId = iDestination != null ? (OIdentifiable) iDestination.getId() : null;