public void convertToDocument() {
    final OrientBaseGraph graph = checkIfAttached();
    if (rawElement != null)
      // ALREADY CONVERTED
      return;

    graph.setCurrentGraphInThreadLocal();
    graph.autoStartTransaction();

    final ODocument vOutRecord = vOut.getRecord();
    final ODocument vInRecord = vIn.getRecord();

    final ODocument doc = createDocument(label);

    doc.field(OrientBaseGraph.CONNECTION_OUT, settings.isKeepInMemoryReferences() ? vOutRecord.getIdentity() : vOutRecord);
    doc.field(OrientBaseGraph.CONNECTION_IN, settings.isKeepInMemoryReferences() ? vInRecord.getIdentity() : vInRecord);
    rawElement = doc;

    final boolean useVertexFieldsForEdgeLabels = settings.isUseVertexFieldsForEdgeLabels();

    final String outFieldName = OrientVertex.getConnectionFieldName(Direction.OUT, label, useVertexFieldsForEdgeLabels);
    removeLightweightConnection(vOutRecord, outFieldName, vInRecord);

    // OUT-VERTEX ---> IN-VERTEX/EDGE
    OrientVertex.createLink(graph, vOutRecord, doc, outFieldName);
    vOutRecord.save();

    final String inFieldName = OrientVertex.getConnectionFieldName(Direction.IN, label, useVertexFieldsForEdgeLabels);
    removeLightweightConnection(vInRecord, inFieldName, vOutRecord);

    // IN-VERTEX ---> OUT-VERTEX/EDGE
    OrientVertex.createLink(graph, vInRecord, doc, inFieldName);
    vInRecord.save();

    vOut = null;
    vIn = null;
    label = null;
  }
public void convertToDocument() {
    final OrientBaseGraph graph = checkIfAttached();
    if (rawElement != null)
      
      return;

    graph.setCurrentGraphInThreadLocal();
    graph.autoStartTransaction();

    final ODocument vOutRecord = vOut.getRecord();
    final ODocument vInRecord = vIn.getRecord();

    final ODocument doc = createDocument(label);

    doc.field(OrientBaseGraph.CONNECTION_OUT, settings.isKeepInMemoryReferences() ? vOutRecord.getIdentity() : vOutRecord);
    doc.field(OrientBaseGraph.CONNECTION_IN, settings.isKeepInMemoryReferences() ? vInRecord.getIdentity() : vInRecord);
    rawElement = doc;

    final boolean useVertexFieldsForEdgeLabels = settings.isUseVertexFieldsForEdgeLabels();

    final String outFieldName = OrientVertex.getConnectionFieldName(Direction.OUT, label, useVertexFieldsForEdgeLabels);
    removeLightweightConnection(vOutRecord, outFieldName, vInRecord);

    
    OrientVertex.createLink(graph, vOutRecord, doc, outFieldName);
    vOutRecord.save();

    final String inFieldName = OrientVertex.getConnectionFieldName(Direction.IN, label, useVertexFieldsForEdgeLabels);
    removeLightweightConnection(vInRecord, inFieldName, vOutRecord);

    
    OrientVertex.createLink(graph, vInRecord, doc, inFieldName);
    vInRecord.save();

    vOut = null;
    vIn = null;
    label = null;
  }
public void convertToDocument ( ) { final OrientBaseGraph graph = checkIfAttached ( ) ; if ( rawElement != null ) // ALREADY CONVERTED return ; graph . setCurrentGraphInThreadLocal ( ) ; graph . autoStartTransaction ( ) ; final ODocument vOutRecord = vOut . getRecord ( ) ; final ODocument vInRecord = vIn . getRecord ( ) ; final ODocument doc = createDocument ( label ) ; doc . field ( OrientBaseGraph . CONNECTION_OUT , settings . isKeepInMemoryReferences ( ) ? vOutRecord . getIdentity ( ) : vOutRecord ) ; doc . field ( OrientBaseGraph . CONNECTION_IN , settings . isKeepInMemoryReferences ( ) ? vInRecord . getIdentity ( ) : vInRecord ) ; rawElement = doc ; final boolean useVertexFieldsForEdgeLabels = settings . isUseVertexFieldsForEdgeLabels ( ) ; final String outFieldName = OrientVertex . getConnectionFieldName ( Direction . OUT , label , useVertexFieldsForEdgeLabels ) ; removeLightweightConnection ( vOutRecord , outFieldName , vInRecord ) ; // OUT-VERTEX ---> IN-VERTEX/EDGE OrientVertex . createLink ( graph , vOutRecord , doc , outFieldName ) ; vOutRecord . save ( ) ; final String inFieldName = OrientVertex . getConnectionFieldName ( Direction . IN , label , useVertexFieldsForEdgeLabels ) ; removeLightweightConnection ( vInRecord , inFieldName , vOutRecord ) ; // IN-VERTEX ---> OUT-VERTEX/EDGE OrientVertex . createLink ( graph , vInRecord , doc , inFieldName ) ; vInRecord . save ( ) ; vOut = null ; vIn = null ; label = null ; }
(Blueprints Extension) Converts the lightweight edge to a regular edge creating the underlying document to store edge's
properties.
( Blueprints Extension ) Converts the lightweight edge to a regular edge creating the underlying document to store edge s properties .