-
Notifications
You must be signed in to change notification settings - Fork 14
/
SoqlNode.java
66 lines (46 loc) · 1.31 KB
/
SoqlNode.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package cz.cvut.kbss.jopa.query.soql;
public class SoqlNode {
private SoqlNode parent;
private SoqlNode child;
private String value;
private String iri = "";
public SoqlNode(SoqlNode parent, SoqlNode child, String value) {
this.parent = parent;
this.child = child;
this.value = value;
}
public SoqlNode(String value){
this.value = value;
}
public SoqlNode(SoqlNode parent, String value){
this.parent = parent;
this.value = value;
}
public boolean hasNextChild(){
return this.child != null;
}
public SoqlNode getChild(){
return this.child;
}
public boolean hasNextParent(){
return this.parent != null;
}
public SoqlNode getParent(){
return this.parent;
}
public String getValue(){
return this.value;
}
public String getCapitalizedvalue(){
return this.value.substring(0, 1).toUpperCase() + this.value.substring(1);
}
public void setChild(SoqlNode child) {
this.child = child;
}
public void setParent(SoqlNode parent) {
this.parent = parent;
}
public void setValue(String value) { this.value = value; }
public String getIri() { return iri; }
public void setIri(String iri) { this.iri = iri; }
}