public Edge edgeFromJson(final JsonNode json, final Vertex out, final Vertex in) throws IOException {
    """
	Creates an edge from GraphSON using settings supplied in the constructor.
    """
    final Map<String, Object> props = OGraphSONUtility.readProperties(json, true, this.hasEmbeddedTypes);

    final Object edgeId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID));
    final JsonNode nodeLabel = json.get(GraphSONTokens._LABEL);

    // assigned an empty string edge label in cases where one does not exist. this gets around the requirement
    // that blueprints graphs have a non-null label while ensuring that GraphSON can stay flexible in parsing
    // partial bits from the JSON. Not sure if there is any gotchas developing out of this.
    final String label = nodeLabel == null ? EMPTY_STRING : nodeLabel.textValue();

    final Edge e = factory.createEdge(edgeId, out, in, label);

    for (Map.Entry<String, Object> entry : props.entrySet()) {
      // if (this.edgePropertyKeys == null || this.edgePropertyKeys.contains(entry.getKey())) {
      if (includeKey(entry.getKey(), edgePropertyKeys, this.edgePropertiesRule)) {
        e.setProperty(entry.getKey(), entry.getValue());
      }
    }

    return e;
  }
public Edge edgeFromJson(final JsonNode json, final Vertex out, final Vertex in) throws IOException {
    final Map<String, Object> props = OGraphSONUtility.readProperties(json, true, this.hasEmbeddedTypes);

    final Object edgeId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID));
    final JsonNode nodeLabel = json.get(GraphSONTokens._LABEL);

    // assigned an empty string edge label in cases where one does not exist. this gets around the requirement
    // that blueprints graphs have a non-null label while ensuring that GraphSON can stay flexible in parsing
    // partial bits from the JSON. Not sure if there is any gotchas developing out of this.
    final String label = nodeLabel == null ? EMPTY_STRING : nodeLabel.textValue();

    final Edge e = factory.createEdge(edgeId, out, in, label);

    for (Map.Entry<String, Object> entry : props.entrySet()) {
      // if (this.edgePropertyKeys == null || this.edgePropertyKeys.contains(entry.getKey())) {
      if (includeKey(entry.getKey(), edgePropertyKeys, this.edgePropertiesRule)) {
        e.setProperty(entry.getKey(), entry.getValue());
      }
    }

    return e;
  }
public Edge edgeFromJson ( final JsonNode json , final Vertex out , final Vertex in ) throws IOException { final Map < String , Object > props = OGraphSONUtility . readProperties ( json , true , this . hasEmbeddedTypes ) ; final Object edgeId = getTypedValueFromJsonNode ( json . get ( GraphSONTokens . _ID ) ) ; final JsonNode nodeLabel = json . get ( GraphSONTokens . _LABEL ) ; // assigned an empty string edge label in cases where one does not exist. this gets around the requirement // that blueprints graphs have a non-null label while ensuring that GraphSON can stay flexible in parsing // partial bits from the JSON. Not sure if there is any gotchas developing out of this. final String label = nodeLabel == null ? EMPTY_STRING : nodeLabel . textValue ( ) ; final Edge e = factory . createEdge ( edgeId , out , in , label ) ; for ( Map . Entry < String , Object > entry : props . entrySet ( ) ) { // if (this.edgePropertyKeys == null || this.edgePropertyKeys.contains(entry.getKey())) { if ( includeKey ( entry . getKey ( ) , edgePropertyKeys , this . edgePropertiesRule ) ) { e . setProperty ( entry . getKey ( ) , entry . getValue ( ) ) ; } } return e ; }
Creates an edge from GraphSON using settings supplied in the constructor.
Creates an edge from GraphSON using settings supplied in the constructor .