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

org.vertexium.cli.model.LazyEdgeProperty Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.cli.model;

import org.vertexium.Edge;
import org.vertexium.FetchHints;
import org.vertexium.Property;
import org.vertexium.Visibility;

public class LazyEdgeProperty extends LazyProperty {
    private final String edgeId;

    public LazyEdgeProperty(String edgeId, String key, String name, Visibility visibility) {
        super(key, name, visibility);
        this.edgeId = edgeId;
    }

    @Override
    protected String getToStringHeaderLine() {
        return "edge @|bold " + getEdgeId() + "|@ property";
    }

    @Override
    protected Edge getE() {
        return getGraph().getEdge(getEdgeId(), getGraph().getDefaultFetchHints(), getTime(), getAuthorizations());
    }

    @Override
    protected Property getP() {
        Edge edge = getE();
        if (edge == null) {
            return null;
        }
        return edge.getProperty(getKey(), getName(), getVisibility());
    }

    public String getEdgeId() {
        return edgeId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy