001package org.biopax.paxtools.query.model;
002
003import java.util.Map;
004import java.util.Set;
005
006/**
007 * This graph interface is used in graph algorithms.
008 *
009 * @author Ozgun Babur
010 */
011public interface Graph
012{
013        /**
014         * Gets the wrapper of the related object.
015         * @param obj The wrapped object
016         * @return Wrapper
017         */
018        GraphObject getGraphObject(Object obj);
019
020        /**
021         * Gets the set of wrappers for the given wrapped object set.
022         * @param objects Wrapped objects
023         * @return Related wrappers
024         */
025        Set<Node> getWrapperSet(Set<?> objects);
026
027        /**
028         * Gets a map from objects to their wrappers.
029         * @param objects Wrapped objects
030         * @return Object-to-wrapper map
031         */
032        Map<Object, Node> getWrapperMap(Set<?> objects);
033
034        /**
035         * Gets the wrapped objects of the given wrapper set.
036         * @param wrappers Wrappers
037         * @return Wrapped objects
038         */
039        Set<Object> getWrappedSet(Set<? extends GraphObject> wrappers);
040
041        /**
042         * Should clear any analysis specific labeling on the graph.
043         */
044        void clear();
045}