Skip to content

Package: OWLClassWithQueryAttr2

OWLClassWithQueryAttr2

nameinstructionbranchcomplexitylinemethod
OWLClassWithQueryAttr2()
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%
OWLClassWithQueryAttr2(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%
getEntityAttribute()
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%
getEntityQueryAttribute()
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%
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%
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%
setEntityAttribute(OWLClassA)
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%
setEntityQueryAttribute(OWLClassA)
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%
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.*;
18:
19: import java.net.URI;
20:
21: @SparqlResultSetMapping(name = OWLClassWithQueryAttr2.MAPPING_NAME, entities = {
22: @EntityResult(entityClass = OWLClassWithQueryAttr2.class, fields = {
23: @FieldResult(name = "uri", variable = "x"),
24: @FieldResult(name = "entityAttribute", variable = "y"),
25: @FieldResult(name = "entityQueryAttribute", variable = "z")
26: })
27: })
28: @OWLClass(iri = Vocabulary.C_OwlClassWithQueryAttr2)
29: public class OWLClassWithQueryAttr2 implements HasUri {
30:
31: public static final String MAPPING_NAME = "OWLClassWithQueryAttr2.entityMapping";
32:
33: private static final String QUERY_ENTITY = "SELECT ?x\n" +
34: "WHERE {?this <" + Vocabulary.P_HAS_OWL_CLASS_A + "> ?x }";
35:
36: @Id
37: private URI uri;
38:
39: @OWLObjectProperty(iri = Vocabulary.P_HAS_OWL_CLASS_A, fetch = FetchType.EAGER)
40: private OWLClassA entityAttribute;
41:
42: @Sparql(query = QUERY_ENTITY)
43: private OWLClassA entityQueryAttribute;
44:
45: public OWLClassWithQueryAttr2() {
46: }
47:
48: public OWLClassWithQueryAttr2(URI uri) {
49: this.uri = uri;
50: }
51:
52: public void setUri(URI uri) {
53: this.uri = uri;
54: }
55:
56: @Override
57: public URI getUri() {
58: return uri;
59: }
60:
61: public OWLClassA getEntityAttribute() {
62: return entityAttribute;
63: }
64:
65: public void setEntityAttribute(OWLClassA entityAttribute) {
66: this.entityAttribute = entityAttribute;
67: }
68:
69: public OWLClassA getEntityQueryAttribute() {
70: return entityQueryAttribute;
71: }
72:
73: public void setEntityQueryAttribute(OWLClassA entityQueryAttribute) {
74: this.entityQueryAttribute = entityQueryAttribute;
75: }
76:
77: @Override
78: public String toString() {
79: String out = "OWLClassWithQueryAttr2: uri = " + uri;
80: out += ", entityAttribute = " + entityAttribute;
81: return out;
82: }
83: }