01: /**
02: * Copyright 2008 Jens Dietrich Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
05: * Unless required by applicable law or agreed to in writing, software distributed under the
06: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
07: * either express or implied. See the License for the specific language governing permissions
08: * and limitations under the License.
09: */package nz.org.take.nscript;
10:
11: import java.util.ArrayList;
12: import java.util.List;
13:
14: import nz.org.take.AbstractAnnotatable;
15:
16: /**
17: * Utility class representing query specifications during parsing.
18: * @author <a href="http://www-ist.massey.ac.nz/JBDietrich/">Jens Dietrich</a>
19: */
20:
21: public class QuerySpec extends AbstractAnnotatable {
22: private String predicate = null;
23: private List<Boolean> ioSpec = new ArrayList<Boolean>();
24: private int line = -1;
25:
26: public void setIoSpec(List<Boolean> ioSpec) {
27: this .ioSpec = ioSpec;
28: }
29:
30: public String getPredicate() {
31: return predicate;
32: }
33:
34: public void setPredicate(String predicate) {
35: this .predicate = predicate;
36: }
37:
38: public List<Boolean> getIoSpec() {
39: return ioSpec;
40: }
41:
42: public void addToIOSpec(boolean io) {
43: this .ioSpec.add(io);
44: }
45:
46: public int getLine() {
47: return line;
48: }
49:
50: public void setLine(int line) {
51: this.line = line;
52: }
53: }
|