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

org.vertexium.accumulo.AccumuloVertexBuilder Maven / Gradle / Ivy

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

import org.vertexium.Authorizations;
import org.vertexium.Vertex;
import org.vertexium.VertexBuilder;
import org.vertexium.Visibility;

public abstract class AccumuloVertexBuilder extends VertexBuilder implements VertexBuilderWithKeyValuePairs {
    private final ElementMutationBuilder elementMutationBuilder;

    public AccumuloVertexBuilder(String vertexId, Visibility visibility, ElementMutationBuilder elementMutationBuilder) {
        super(vertexId, visibility);
        this.elementMutationBuilder = elementMutationBuilder;
    }

    @Override
    public Iterable getKeyValuePairs() {
        AccumuloVertex vertex = createVertex(new AccumuloAuthorizations());
        return getElementMutationBuilder().getKeyValuePairsForVertex(vertex);
    }

    @Override
    public abstract Vertex save(Authorizations authorizations);

    protected abstract AccumuloVertex createVertex(Authorizations authorizations);

    public ElementMutationBuilder getElementMutationBuilder() {
        return elementMutationBuilder;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy