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

com.tinkerpop.blueprints.IndexableGraph Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.blueprints;

/**
 * An IndexableGraph is a graph that supports the manual indexing of its elements.
 * An index is typically some sort of tree structure that allows for the fast lookup of elements by key/value pairs.
 * Indices have an Index object associated with them and allow the user to specify the putting and getting of elements into the index.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public interface IndexableGraph extends Graph {

    /**
     * Generate an index with a particular name for a particular class.
     *
     * @param indexName       the name of the manual index
     * @param indexClass      the element class that this index is indexing (can be base class)
     * @param indexParameters a collection of parameters for the underlying index implementation
     * @param              the element class that this index is indexing (can be base class)
     * @return the index created
     */
    public  Index createIndex(String indexName, Class indexClass, Parameter... indexParameters);

    /**
     * Get an index from the graph by its name and index class. An index is unique up to name.
     *
     * @param indexName  the name of the index to retrieve
     * @param indexClass the class of the elements being indexed (can be base class)
     * @param         the class of the elements being indexed (can be base class)
     * @return the retrieved index
     */
    public  Index getIndex(String indexName, Class indexClass);

    /**
     * Get all the indices maintained by the graph.
     *
     * @return the indices associated with the graph
     */
    public Iterable> getIndices();

    /**
     * Remove an index associated with the graph.
     *
     * @param indexName the name of the index to drop
     */
    public void dropIndex(String indexName);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy