Class BasicModularGraphModel

  • All Implemented Interfaces:
    GraphModel, MutableGraphModel
    Direct Known Subclasses:
    BasicGraphModel

    public class BasicModularGraphModel
    extends MutableModularGraphModel
    A modular implementation of the graph model, whereby users with heterogeneous graphs can implement the graph model interface by implementing the simple interfaces of Graph, Node, CompositeNode, and Edge.
    Version:
    $Id$
    Author:
    Michael Shilman
    Pt.AcceptedRating:
    Red
    • Constructor Detail

      • BasicModularGraphModel

        public BasicModularGraphModel​(Graph root)
        Construct an empty graph model whose root is the given semantic object.
    • Method Detail

      • getCompositeModel

        public CompositeModel getCompositeModel​(java.lang.Object composite)
        Return the model for the given composite object. If the object is not a composite, meaning that it does not contain other nodes, then return null.
        Specified by:
        getCompositeModel in class ModularGraphModel
      • getEdgeModel

        public EdgeModel getEdgeModel​(java.lang.Object edge)
        Return the model for the given edge object. If the object is not an edge, then return null.
        Specified by:
        getEdgeModel in class ModularGraphModel
      • getNodeModel

        public NodeModel getNodeModel​(java.lang.Object node)
        Return the node model for the given object. If the object is not a node, then return null.
        Specified by:
        getNodeModel in class ModularGraphModel
      • getProperty

        public java.lang.Object getProperty​(java.lang.Object o,
                                            java.lang.String propertyName)
        Return the property of the object associated with the given property name.
        Specified by:
        getProperty in interface GraphModel
        Specified by:
        getProperty in class ModularGraphModel
      • setProperty

        public void setProperty​(java.lang.Object o,
                                java.lang.String propertyName,
                                java.lang.Object value)
        Set the property of the object associated with the given property name.
        Specified by:
        setProperty in interface GraphModel
        Specified by:
        setProperty in class ModularGraphModel