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