All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.gremlin.pipes.transform.PropertyMapPipe Maven / Gradle / Ivy

package com.tinkerpop.gremlin.pipes.transform;

import com.tinkerpop.blueprints.Element;
import com.tinkerpop.pipes.AbstractPipe;

import java.util.HashMap;
import java.util.Map;

/**
 * PropertyMapPipe emits the property map of an element.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class PropertyMapPipe extends AbstractPipe> {

    protected Map processNextStart() {
        final S element = this.starts.next();
        final Map map = new HashMap();
        for (final String key : element.getPropertyKeys()) {
            map.put(key, element.getProperty(key));
        }
        return map;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy