Interface INode

All Known Subinterfaces:
IInstance, ITimex
All Known Implementing Classes:
Instance, Timex

public interface INode
Super interface for Instances and Timexs.
  • Method Summary

    Modifier and Type Method Description
    void addInLink​(ILink link)
    Add a link to the set of IN links from this node.
    void addOutLink​(ILink link)
    Add a link to the set of OUT links from this node.
    INode clone()
    Returns a deep copy of the Node.
    boolean equals​(java.lang.Object o)  
    int getId()
    Returns the integer part of the node ID.
    java.lang.String getIdStr()
    Returns the full string representation of the node ID.
    java.util.Set<ILink> getInLinks()
    Returns a set of links that have this node as a target.
    java.util.Set<ILink> getOutLinks()
    Returns a set of links that have this node as a origin.
    IType getType()
    Return the integer that corresponds with the type.
    void removeInLink​(ILink link)
    Removes a link that has this node as a target.
    void removeOutLink​(ILink link)
    Removes a link that has this node as an origin.
    java.lang.String toJSON()
    Returns the JSON (RFC 8259) representation of the Node.
  • Method Details

    • getId

      int getId()
      Returns the integer part of the node ID. Each event has to be identified by a unique ID number.
      Returns:
      Integer part of the node ID. May not be 0 or negative.
    • getType

      IType getType()
      Return the integer that corresponds with the type. Each event can be categorized under three different types.
      Returns:
      Enum that corresponds with the type of node.
    • getIdStr

      java.lang.String getIdStr()
      Returns the full string representation of the node ID. Each event has to be identified by a unique ID number and String.
      Returns:
      Full string representation of the node ID. May not return null.
    • addOutLink

      void addOutLink​(ILink link)
      Add a link to the set of OUT links from this node.
      Parameters:
      link - a new OUT link from this node.
    • addInLink

      void addInLink​(ILink link)
      Add a link to the set of IN links from this node.
      Parameters:
      link - the link to the set of IN links from this node.
    • removeOutLink

      void removeOutLink​(ILink link)
      Removes a link that has this node as an origin.
      Parameters:
      link - a link that has this node as an origin.
    • removeInLink

      void removeInLink​(ILink link)
      Removes a link that has this node as a target.
      Parameters:
      link - a link that has this node as a target.
    • getOutLinks

      java.util.Set<ILink> getOutLinks()
      Returns a set of links that have this node as a origin.
      Returns:
      a set of links that have this node as a origin.
    • getInLinks

      java.util.Set<ILink> getInLinks()
      Returns a set of links that have this node as a target.
      Returns:
      a set of links that have this node as a target.
    • equals

      boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • toJSON

      java.lang.String toJSON()
      Returns the JSON (RFC 8259) representation of the Node.
      Returns:
      the JSON (RFC 8259) representation of the Node.
    • clone

      INode clone()
      Returns a deep copy of the Node.
      Returns:
      a deep copy of the Node.