Skip to content

Package: OWLClassWithQueryAttr5

OWLClassWithQueryAttr5

nameinstructionbranchcomplexitylinemethod
OWLClassWithQueryAttr5()
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%
OWLClassWithQueryAttr5(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%
getPluralAttribute()
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%
getPluralQueryAttribute()
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%
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%
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%
setPluralAttribute(Set)
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%
setPluralQueryAttribute(Set)
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%
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%
toString()
M: 11 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: * JOPA
3: * Copyright (C) 2023 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.jopa.test;
19:
20: import cz.cvut.kbss.jopa.model.annotations.*;
21:
22: import java.net.URI;
23: import java.util.Set;
24:
25: @OWLClass(iri = Vocabulary.C_OwlClassWithQueryAttr5)
26: public class OWLClassWithQueryAttr5 implements HasUri {
27:
28: private static final String QUERY = "SELECT ?pluralAttribute\n" +
29: "WHERE {?this <" + Vocabulary.P_HAS_SIMPLE_LIST + "> ?pluralAttribute}";
30:
31: @Id
32: private URI uri;
33:
34: @OWLObjectProperty(iri = Vocabulary.P_HAS_SIMPLE_LIST, cascade = CascadeType.ALL)
35: private Set<OWLClassA> pluralAttribute;
36:
37: @Sparql(query=QUERY)
38: private Set<OWLClassA> pluralQueryAttribute;
39:
40: public OWLClassWithQueryAttr5() {
41: }
42:
43: public OWLClassWithQueryAttr5(URI uri) {
44: this.uri = uri;
45: }
46:
47: public void setUri(URI uri) {
48: this.uri = uri;
49: }
50:
51: @Override
52: public URI getUri() {
53: return uri;
54: }
55:
56: public Set<OWLClassA> getPluralAttribute() {
57: return pluralAttribute;
58: }
59:
60: public void setPluralAttribute(Set<OWLClassA> pluralAttribute) {
61: this.pluralAttribute = pluralAttribute;
62: }
63:
64: public Set<OWLClassA> getPluralQueryAttribute() {
65: return pluralQueryAttribute;
66: }
67:
68: public void setPluralQueryAttribute(Set<OWLClassA> pluralQueryAttribute) {
69: this.pluralQueryAttribute = pluralQueryAttribute;
70: }
71:
72: public static String getSparqlQuery() {
73: return QUERY;
74: }
75:
76: @Override
77: public String toString() {
78: String out = "OWLClassWithQueryAttr: uri = " + uri;
79: out += ", pluralAttribute = " + pluralAttribute;
80: return out;
81: }
82: }