private Vertex initNewVertex ( GDLParser . VertexContext vertexContext ) { Vertex v = new Vertex ( ) ; v . setId ( getNewVertexId ( ) ) ; List < String > labels = getLabels ( vertexContext . header ( ) ) ; v . setLabels ( labels . isEmpty ( ) ? useDefaultVertexLabel ? Collections . singletonList ( defaultVertexLabel ) : Collections . emptyList ( ) : labels ) ; v . setProperties ( getProperties ( vertexContext . properties ( ) ) ) ; return v ; }
Initializes a new vertex from a given vertex context .