Package: AttributeNode
AttributeNode
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AttributeNode(SoqlNode, String) |
|
|
|
|
|
||||||||||||||||||||
AttributeNode(String) |
|
|
|
|
|
||||||||||||||||||||
getCapitalizedValue() |
|
|
|
|
|
||||||||||||||||||||
getIri() |
|
|
|
|
|
||||||||||||||||||||
getValue() |
|
|
|
|
|
||||||||||||||||||||
requiresFilterExpression() |
|
|
|
|
|
||||||||||||||||||||
setIri(String) |
|
|
|
|
|
||||||||||||||||||||
setValue(String) |
|
|
|
|
|
||||||||||||||||||||
static {...} |
|
|
|
|
|
||||||||||||||||||||
toFilterExpression(String, String) |
|
|
|
|
|
||||||||||||||||||||
toString() |
|
|
|
|
|
Coverage
1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.jopa.query.soql;
19:
20: public class AttributeNode extends SoqlNode {
21:
22: private String value;
23: private String iri = "";
24:
25: public AttributeNode(String value) {
26: this.value = value;
27: }
28:
29: public AttributeNode(SoqlNode parent, String value) {
30: super(parent);
31: this.value = value;
32: }
33:
34: @Override
35: public String getValue() {
36: return value;
37: }
38:
39: @Override
40: public String getCapitalizedValue() {
41:• assert value != null;
42: return value.substring(0, 1).toUpperCase() + value.substring(1);
43: }
44:
45: @Override
46: public void setValue(String value) {
47: this.value = value;
48: }
49:
50: @Override
51: public String getIri() {
52: return iri;
53: }
54:
55: @Override
56: public void setIri(String iri) {
57: this.iri = iri;
58: }
59:
60: @Override
61: public boolean requiresFilterExpression() {
62: return false;
63: }
64:
65: @Override
66: public String toFilterExpression(String filterParam, String filterValue) {
67: return filterParam;
68: }
69:
70: @Override
71: public String toString() {
72:• return getValue() + (getChild() != null ? "." + getChild() : "");
73: }
74: }