1
2
3 package org.galagosearch.tupleflow.execution;
4
5 import java.io.Serializable;
6 import org.galagosearch.tupleflow.Order;
7
8 /***
9 * Represents an endpoint for a connection within a TupleFlow stage.
10 * This is defined with an input or output tag in the connections section
11 * of a stage in the XML parameter file.
12 *
13 * @see org.galagosearch.tupleflow.execution.Job
14 * @author trevor
15 */
16 public class StageConnectionPoint extends Locatable implements Serializable {
17 public ConnectionPointType type;
18 public String externalName;
19 public String internalName;
20 private String className;
21 private String[] order;
22
23 public StageConnectionPoint(ConnectionPointType type, String name, Order order) {
24 super(null);
25 this.type = type;
26 this.externalName = name;
27 this.internalName = name;
28 this.className = order.getOrderedClass().getName();
29 this.order = order.getOrderSpec();
30 }
31
32 public StageConnectionPoint(ConnectionPointType type, String name, Order order, FileLocation location) {
33 super(location);
34 this.type = type;
35 this.externalName = name;
36 this.internalName = name;
37 this.className = order.getOrderedClass().getName();
38 this.order = order.getOrderSpec();
39 }
40
41 public StageConnectionPoint(ConnectionPointType type, String name, String className, String[] order, FileLocation location) {
42 super(location);
43 this.type = type;
44 this.externalName = name;
45 this.internalName = name;
46 this.className = className;
47 this.order = order;
48 }
49
50 public StageConnectionPoint(ConnectionPointType type, String externalName, String internalName, String className, String[] order, FileLocation location) {
51 super(location);
52 this.type = type;
53 this.externalName = externalName;
54 this.internalName = internalName;
55 this.className = className;
56 this.order = order;
57 }
58
59 public String getExternalName() {
60 return externalName;
61 }
62
63 public String getInternalName() {
64 return internalName;
65 }
66
67 public ConnectionPointType getType() {
68 return type;
69 }
70
71 public String getClassName() {
72 return className;
73 }
74
75 public String[] getOrder() {
76 return order;
77 }
78 }