Skip to content

Package: QuerySpecification

QuerySpecification

nameinstructionbranchcomplexitylinemethod
QuerySpecification(String)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
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%
hashCode()
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
includeInference(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%
isIncludeInference()
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%

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.ontodriver.rdf4j.query;
19:
20: import java.util.Objects;
21:
22: /**
23: * Represents a query and configuration relevant to the query execution.
24: */
25: public class QuerySpecification {
26:
27: private final String query;
28:
29: private boolean includeInference = true;
30:
31: private QuerySpecification(String query) {
32: this.query = Objects.requireNonNull(query);
33: }
34:
35: public String getQuery() {
36: return query;
37: }
38:
39: public QuerySpecification includeInference(boolean includeInference) {
40: this.includeInference = includeInference;
41: return this;
42: }
43:
44: public boolean isIncludeInference() {
45: return includeInference;
46: }
47:
48: @Override
49: public boolean equals(Object o) {
50:• if (this == o) {
51: return true;
52: }
53:• if (o == null || getClass() != o.getClass()) {
54: return false;
55: }
56: QuerySpecification that = (QuerySpecification) o;
57:• return includeInference == that.includeInference && query.equals(that.query);
58: }
59:
60: @Override
61: public int hashCode() {
62: return Objects.hash(query, includeInference);
63: }
64:
65: public static QuerySpecification query(String query) {
66: return new QuerySpecification(query);
67: }
68: }