Skip to content

Package: QuerySpecification

QuerySpecification

nameinstructionbranchcomplexitylinemethod
QuerySpecification(String)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
disableInference(boolean)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
equals(Object)
M: 5 C: 27
84%
M: 5 C: 5
50%
M: 5 C: 1
17%
M: 2 C: 4
67%
M: 0 C: 1
100%
getQuery()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getStatement()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
hashCode()
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
isDisableInference()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
query(String)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
statement(Statement)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (C) 2023 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.ontodriver.owlapi.query;
16:
17: import cz.cvut.kbss.ontodriver.Statement;
18:
19: import java.util.Objects;
20:
21: class QuerySpecification {
22:
23: private final String query;
24:
25: private Statement statement;
26:
27: private boolean disableInference = false;
28:
29: private QuerySpecification(String query) {
30: this.query = query;
31: }
32:
33: public String getQuery() {
34: return query;
35: }
36:
37: public Statement getStatement() {
38: return statement;
39: }
40:
41: public boolean isDisableInference() {
42: return disableInference;
43: }
44:
45: public QuerySpecification statement(Statement statement) {
46: this.statement = statement;
47: return this;
48: }
49:
50: public QuerySpecification disableInference(boolean disableInference) {
51: this.disableInference = disableInference;
52: return this;
53: }
54:
55: public static QuerySpecification query(String query) {
56: return new QuerySpecification(query);
57: }
58:
59: @Override
60: public boolean equals(Object o) {
61:• if (this == o) {
62: return true;
63: }
64:• if (o == null || getClass() != o.getClass()) {
65: return false;
66: }
67: QuerySpecification that = (QuerySpecification) o;
68:• return disableInference == that.disableInference && query.equals(that.query);
69: }
70:
71: @Override
72: public int hashCode() {
73: return Objects.hash(query, disableInference);
74: }
75: }