Interface SubGraph


  • public interface SubGraph
    Interface to be implemented by classes providing the subgraph feature. A subgraph is a named node container which is primarily used as a storage helper by graphs. Compared to a graph, a subgraph lacks the factory/manager feature as well as the possibility to hierarchically store nodes using containers like subgraphs.
    Author:
    Christophe Labouisse
    • Method Detail

      • getName

        String getName()
        Returns the graph's name.
        Returns:
        graph's name.
      • getNode

        Node getNode​(String nodeName)
        Find a node from its name.
        Parameters:
        nodeName - name of the node to find.
        Returns:
        the node or null if not found.
      • getNodes

        Iterator<Node> getNodes()
        Get the nodes contained in the graph. The implementing class should guarantee that the Iterator will only returns object implementing the Node interface. The returned iterator should implement the optional Iterator.remove()method in order to allow the filters to remove nodes.
        Returns:
        an iterator to the graph's nodes.
      • hasNode

        boolean hasNode​(String nodeName)
        Checks if the graph has a node with a specific name.
        Parameters:
        nodeName - node to search.
        Returns:
        true if the graph contains a node called nodeName.