Class CachedEdge

  • All Implemented Interfaces:
    Edge
    Direct Known Subclasses:
    CachedInEdge, CachedOutEdge

    public abstract class CachedEdge
    extends java.lang.Object
    implements Edge

    Description: Represents an edge cached for a CachedNode. A cached edge stores the information about only one _node (the _neighbor of the cached _node where this edge is stored) and for that _node only the name is stored. This keeps the memory footprint of cached _nodes to a minimum without causing any slow downs (since cached nodes are used only in limited ways).

    Copyright: Copyright (c) 2008

    Company: Clark & Parsia, LLC.

    Author:
    Evren Sirin
    • Constructor Detail

      • CachedEdge

        public CachedEdge​(Role role,
                          openllet.aterm.ATermAppl neighbor,
                          DependencySet ds)
    • Method Detail

      • getFrom

        public Individual getFrom()
        Specified by:
        getFrom in interface Edge
        Returns:
        Returns the source of this edge
      • getFromName

        public openllet.aterm.ATermAppl getFromName()
        Specified by:
        getFromName in interface Edge
        Returns:
        Returns the name of the source node
      • getNeighbor

        public Node getNeighbor​(Node node)
        Given a node upon which this edge is incident, the opposite incident _node is returned.
        Specified by:
        getNeighbor in interface Edge
        Parameters:
        node - a node upon which this edge is incident
        Returns:
        the other node this edge is incident upon
      • getRole

        public Role getRole()
        Specified by:
        getRole in interface Edge
        Returns:
        Returns the role.
      • getTo

        public Node getTo()
        Specified by:
        getTo in interface Edge
        Returns:
        Returns the target of the edge
      • getToName

        public openllet.aterm.ATermAppl getToName()
        Specified by:
        getToName in interface Edge
        Returns:
        Returns the name of the target node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object