Skip to content

Package: OWLClassWithQueryAttr4

OWLClassWithQueryAttr4

nameinstructionbranchcomplexitylinemethod
OWLClassWithQueryAttr4()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
OWLClassWithQueryAttr4(URI)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getAskQueryAttribute()
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getClassIri()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPersistenceContext()
M: 0 C: 10
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSparqlQuery()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getStrAttField()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getStrQueryAttField()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getStringAttribute()
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getUri()
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%
setAskQueryAttribute(Boolean)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setPersistenceContext(UnitOfWorkImpl)
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setStringAttribute(String)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setUri(URI)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 33 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

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.lang.reflect.Field;
23: import java.net.URI;
24:
25: @OWLClass(iri = Vocabulary.C_OwlClassWithQueryAttr4)
26: public class OWLClassWithQueryAttr4 {
27:
28: private static final String STR_ATT_FIELD = "stringAttribute";
29: private static final String ASK_QUERY_ATT_FIELD = "askQueryAttribute";
30: private static final String QUERY = "ASK" +
31: "WHERE {?this <http://krizik.felk.cvut.cz/ontologies/jopa/attributes#B-stringAttribute> ?stringAttribute}";
32:
33: @Id
34: private URI uri;
35:
36: @OWLDataProperty(iri = "http://krizik.felk.cvut.cz/ontologies/jopa/attributes#B-stringAttribute", simpleLiteral = true)
37: private String stringAttribute;
38:
39: @Sparql(query=QUERY)
40: private Boolean askQueryAttribute;
41:
42: public OWLClassWithQueryAttr4() {
43: }
44:
45: public OWLClassWithQueryAttr4(URI uri) {
46: this.uri = uri;
47: }
48:
49: /**
50: * @param uri the uri to set
51: */
52: public void setUri(URI uri) {
53: this.uri = uri;
54: }
55:
56: /**
57: * @return the uri
58: */
59: public URI getUri() {
60: return uri;
61: }
62:
63: public String getStringAttribute() {
64: return stringAttribute;
65: }
66:
67: public void setStringAttribute(String stringAttribute) {
68: this.stringAttribute = stringAttribute;
69: }
70:
71: public Boolean getAskQueryAttribute() {
72: return askQueryAttribute;
73: }
74:
75: public void setAskQueryAttribute(Boolean askQueryAttribute) {
76: this.askQueryAttribute = askQueryAttribute;
77: }
78:
79: public static String getClassIri() {
80: return OWLClassWithQueryAttr4.class.getAnnotation(OWLClass.class).iri();
81: }
82:
83: public static Field getStrAttField() throws NoSuchFieldException {
84: return OWLClassWithQueryAttr4.class.getDeclaredField(STR_ATT_FIELD);
85: }
86:
87: public static Field getStrQueryAttField() throws NoSuchFieldException {
88: return OWLClassWithQueryAttr4.class.getDeclaredField(ASK_QUERY_ATT_FIELD);
89: }
90:
91: public static String getSparqlQuery() {
92: return QUERY;
93: }
94:
95: @Override
96: public String toString() {
97: String out = "OWLClassWithQueryAttr: uri = " + uri;
98: out += ", stringAttribute = " + stringAttribute;
99: return out;
100: }
101: }