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

org.vertexium.GraphMetadataStore Maven / Gradle / Ivy

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

import org.vertexium.util.FilterIterable;

public abstract class GraphMetadataStore {
    public abstract Iterable getMetadata();

    public abstract void setMetadata(String key, Object value);

    public abstract void reloadMetadata();

    public Object getMetadata(String key) {
        for (GraphMetadataEntry e : getMetadata()) {
            if (e.getKey().equals(key)) {
                return e.getValue();
            }
        }
        return null;
    }

    public Iterable getMetadataWithPrefix(final String prefix) {
        return new FilterIterable(getMetadata()) {
            @Override
            protected boolean isIncluded(GraphMetadataEntry o) {
                return o.getKey().startsWith(prefix);
            }
        };
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy