Package org.eclipse.viatra.query.runtime.rete.network

## Class BaseNode

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode

- All Implemented Interfaces:
    `Node`
  Direct Known Subclasses:
    `SimpleReceiver`, `StandardIndexer`, `StandardNode`

      public abstract class BaseNode
      extends java.lang.Object
      implements Node

  Base implementation for a Rete node.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected long` | `nodeId` |
    `protected ReteContainer` | `reteContainer` |
    `protected java.lang.Object` | `tag` |
    `protected java.util.Set<TraceInfo>` | `traceInfos` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BaseNode​(ReteContainer reteContainer)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `acceptPropagatedTraceInfo​(TraceInfo traceInfo)` | accepts traceability info propagated to this node
    `void` | `assignTraceInfo​(TraceInfo traceInfo)` | assigns new traceability info to this node
    `ReteContainer` | `getContainer()` |
    `long` | `getNodeId()` |
    `java.lang.Object` | `getTag()` |
    `protected java.lang.String` | `getTraceInfoPatternsEnumerated()` | Descendants should use this in e.g.
    `java.util.Set<TraceInfo>` | `getTraceInfos()` |
    `void` | `setTag​(java.lang.Object tag)` | Assigns a descriptive tag to the node
    `java.lang.String` | `toString()` |
    `protected java.lang.String` | `toStringCore()` | clients should override this to append before the tag / trace indicators

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node

      `getCommunicationTracker`

- - ### Field Detail

    - #### reteContainer

          protected ReteContainer reteContainer

    - #### nodeId

          protected long nodeId

    - #### tag

          protected java.lang.Object tag

    - #### traceInfos

          protected java.util.Set<TraceInfo> traceInfos

  - ### Constructor Detail

    - #### BaseNode

          public BaseNode​(ReteContainer reteContainer)

      Parameters:
        `reteContainer` - the container to create this node in

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### toStringCore

          protected java.lang.String toStringCore()

      clients should override this to append before the tag / trace indicators

    - #### getContainer

          public ReteContainer getContainer()

      Specified by:
        `getContainer` in interface `Node`
      Returns:
        the network this node belongs to.

    - #### getNodeId

          public long getNodeId()

      Specified by:
        `getNodeId` in interface `Node`
      Returns:
        the identifier unique to this node within the network.

    - #### getTag

          public java.lang.Object getTag()

      Specified by:
        `getTag` in interface `Node`
      Returns:
        the tag of the node

    - #### setTag

          public void setTag​(java.lang.Object tag)

      Description copied from interface: `Node`
      Assigns a descriptive tag to the node
      Specified by:
        `setTag` in interface `Node`

    - #### getTraceInfos

          public java.util.Set<TraceInfo> getTraceInfos()

      Specified by:
        `getTraceInfos` in interface `Node`
      Returns:
        unmodifiable view of the list of traceability infos assigned to this node

    - #### assignTraceInfo

          public void assignTraceInfo​(TraceInfo traceInfo)

      Description copied from interface: `Node`
      assigns new traceability info to this node
      Specified by:
        `assignTraceInfo` in interface `Node`

    - #### acceptPropagatedTraceInfo

          public void acceptPropagatedTraceInfo​(TraceInfo traceInfo)

      Description copied from interface: `Node`
      accepts traceability info propagated to this node
      Specified by:
        `acceptPropagatedTraceInfo` in interface `Node`

    - #### getTraceInfoPatternsEnumerated

          protected java.lang.String getTraceInfoPatternsEnumerated()

      Descendants should use this in e.g. logging