protected void addIncludedOptions(Element element, Map<Object, Object> map){
        if (this.returnType == PropertyType.VALUE) {
            if (includeToken(WithOptions.ids)) map.put(T.id, getElementId(element));
            if (element instanceof VertexProperty) {

                if (includeToken(WithOptions.keys)) map.put(T.key, getVertexPropertyKey((VertexProperty<?>) element));
                if (includeToken(WithOptions.values)) map.put(T.value, getVertexPropertyValue((VertexProperty<?>) element));
            } else {
                if (includeToken(WithOptions.labels)) map.put(T.label, getElementLabel(element));
            }
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertyMapStep.java