aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java')
-rw-r--r--subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java
new file mode 100644
index 00000000..e7faf374
--- /dev/null
+++ b/subprojects/interpreter-rete/src/main/java/tools/refinery/interpreter/rete/network/Node.java
@@ -0,0 +1,62 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.interpreter.rete.network;
11
12import java.util.Set;
13
14import tools.refinery.interpreter.rete.network.communication.CommunicationTracker;
15import tools.refinery.interpreter.rete.traceability.TraceInfo;
16
17/**
18 * A node of a rete network, should be uniquely identified by network and nodeId. NodeId can be requested by registering
19 * at the Network on construction.
20 *
21 * @author Gabor Bergmann
22 */
23public interface Node {
24 /**
25 * @return the network this node belongs to.
26 */
27 ReteContainer getContainer();
28
29 /**
30 * @return the identifier unique to this node within the network.
31 */
32 long getNodeId();
33
34 /**
35 * Assigns a descriptive tag to the node
36 */
37 void setTag(Object tag);
38
39 /**
40 * @return the tag of the node
41 */
42 Object getTag();
43
44 /**
45 * @return unmodifiable view of the list of traceability infos assigned to this node
46 */
47 Set<TraceInfo> getTraceInfos();
48
49 /**
50 * assigns new traceability info to this node
51 */
52 void assignTraceInfo(TraceInfo traceInfo);
53 /**
54 * accepts traceability info propagated to this node
55 */
56 void acceptPropagatedTraceInfo(TraceInfo traceInfo);
57
58 default CommunicationTracker getCommunicationTracker() {
59 return getContainer().getCommunicationTracker();
60 }
61
62}