Package: OWLClassWithQueryAttr4
OWLClassWithQueryAttr4
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OWLClassWithQueryAttr4() |
|
|
|
|
|
||||||||||||||||||||
OWLClassWithQueryAttr4(URI) |
|
|
|
|
|
||||||||||||||||||||
getAskQueryAttribute() |
|
|
|
|
|
||||||||||||||||||||
getPersistenceContext() |
|
|
|
|
|
||||||||||||||||||||
getSparqlQuery() |
|
|
|
|
|
||||||||||||||||||||
getStringAttribute() |
|
|
|
|
|
||||||||||||||||||||
getUri() |
|
|
|
|
|
||||||||||||||||||||
setAskQueryAttribute(Boolean) |
|
|
|
|
|
||||||||||||||||||||
setPersistenceContext(UnitOfWorkImpl) |
|
|
|
|
|
||||||||||||||||||||
setStringAttribute(String) |
|
|
|
|
|
||||||||||||||||||||
setUri(URI) |
|
|
|
|
|
||||||||||||||||||||
static {...} |
|
|
|
|
|
||||||||||||||||||||
toString() |
|
|
|
|
|
Coverage
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.test;
16:
17: import cz.cvut.kbss.jopa.model.annotations.Id;
18: import cz.cvut.kbss.jopa.model.annotations.OWLClass;
19: import cz.cvut.kbss.jopa.model.annotations.OWLDataProperty;
20: import cz.cvut.kbss.jopa.model.annotations.Sparql;
21:
22: import java.net.URI;
23:
24: @OWLClass(iri = Vocabulary.C_OwlClassWithQueryAttr4)
25: public class OWLClassWithQueryAttr4 implements HasUri {
26:
27: private static final String QUERY = "ASK" +
28: "WHERE {?this <http://krizik.felk.cvut.cz/ontologies/jopa/attributes#B-stringAttribute> ?stringAttribute}";
29:
30: @Id
31: private URI uri;
32:
33: @OWLDataProperty(iri = "http://krizik.felk.cvut.cz/ontologies/jopa/attributes#B-stringAttribute", simpleLiteral = true)
34: private String stringAttribute;
35:
36: @Sparql(query=QUERY)
37: private Boolean askQueryAttribute;
38:
39: public OWLClassWithQueryAttr4() {
40: }
41:
42: public OWLClassWithQueryAttr4(URI uri) {
43: this.uri = uri;
44: }
45:
46: public void setUri(URI uri) {
47: this.uri = uri;
48: }
49:
50: @Override
51: public URI getUri() {
52: return uri;
53: }
54:
55: public String getStringAttribute() {
56: return stringAttribute;
57: }
58:
59: public void setStringAttribute(String stringAttribute) {
60: this.stringAttribute = stringAttribute;
61: }
62:
63: public Boolean getAskQueryAttribute() {
64: return askQueryAttribute;
65: }
66:
67: public void setAskQueryAttribute(Boolean askQueryAttribute) {
68: this.askQueryAttribute = askQueryAttribute;
69: }
70:
71: public static String getSparqlQuery() {
72: return QUERY;
73: }
74:
75: @Override
76: public String toString() {
77: String out = "OWLClassWithQueryAttr: uri = " + uri;
78: out += ", stringAttribute = " + stringAttribute;
79: return out;
80: }
81: }