Skip to content

Method: getIri()

1: /**
2: * Copyright (C) 2022 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.query.soql;
16:
17: public class SoqlNode {
18:
19: private SoqlNode parent;
20: private SoqlNode child;
21: private String value;
22: private String iri = "";
23:
24: public SoqlNode(SoqlNode parent, SoqlNode child, String value) {
25: this.parent = parent;
26: this.child = child;
27: this.value = value;
28: }
29:
30: public SoqlNode(String value) {
31: this.value = value;
32: }
33:
34: public SoqlNode(SoqlNode parent, String value) {
35: this.parent = parent;
36: this.value = value;
37: }
38:
39:
40: public boolean hasNextChild() {
41: return this.child != null;
42: }
43:
44: public SoqlNode getChild() {
45: return this.child;
46: }
47:
48: public boolean hasNextParent() {
49: return this.parent != null;
50: }
51:
52: public SoqlNode getParent() {
53: return this.parent;
54: }
55:
56: public String getValue() {
57: return this.value;
58: }
59:
60: public String getCapitalizedValue() {
61: return this.value.substring(0, 1).toUpperCase() + this.value.substring(1);
62: }
63:
64: public void setChild(SoqlNode child) {
65: this.child = child;
66: }
67:
68: public void setParent(SoqlNode parent) {
69: this.parent = parent;
70: }
71:
72: public void setValue(String value) {
73: this.value = value;
74: }
75:
76: public String getIri() {
77: return iri;
78: }
79:
80: public void setIri(String iri) {
81: this.iri = iri;
82: }
83:
84:
85: }