1 // BSD License (http://www.galagosearch.org/license)
2
3 package org.galagosearch.tupleflow.execution;
4
5 import org.galagosearch.tupleflow.Order;
6 import org.galagosearch.tupleflow.Parameters;
7
8 /***
9 * There are a few different things this interface needs to support.
10 *
11 * <ul>
12 * <li>Validation</li>
13 * <li>Code completion</li>
14 * </ul>
15 *
16 * @author trevor
17 */
18
19 /*
20 public interface TagSpecification {
21 public String getName();
22 public String getDocumentation();
23
24 public boolean acceptsChildren();
25 public boolean valueRequired();
26
27 public List<TagSpecification> getChildren();
28 }
29
30 public interface ValueTagSpecification {
31 public String getName();
32 public String getDocumentation();
33
34 public List<String> getCompletions();
35 public boolean validate(String value, ErrorHandler handler);
36 }
37
38 public interface StructureTagSpecification {
39 public String getName();
40 public String getDocumentation();
41
42 public List<TagSpecification> getChildren();
43 public boolean validate(Parameters parameters, ErrorHandler handler);
44 }
45
46 public interface ParametersSpecification {
47 // what top-level tags are supported? in what combinations?
48 // rule: parent tag determines what child tags are supported.
49 // value of one child tag does not influence what other tags are valid,
50 // although it may influence value validation.
51 public List<TagSpecification> getChildren();
52 public boolean validate(Parameters parameters, ErrorHandler handler);
53 }
54 */
55
56 public interface StepSpecification {
57 public void setParameters(Parameters parameters);
58 public void addErrors(ErrorHandler handler);
59
60 public String getDocumentation();
61
62 public Class getInput(String name);
63 public Class getOutput(String name);
64 public Order getInputOrder(String name);
65 public Order getOutputOrder(String name);
66
67 public boolean acceptsParameters();
68
69 public Class getInputClass();
70 public Class getOutputClass();
71
72 public Order getInputOrder();
73 public Order getOutputOrder();
74 }