Skip to content

Package: OWLClassA

OWLClassA

nameinstructionbranchcomplexitylinemethod
OWLClassA()
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%
OWLClassA(URI)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getClassIri()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
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%
getTypes()
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%
setStringAttribute(String)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setTypes(Set)
M: 0 C: 21
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: 0 C: 71
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (C) 2016 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: import java.util.Set;
21:
22: @NamedNativeQueries({
23: @NamedNativeQuery(name = "OWLClassA.findAll", query = "SELECT ?x WHERE {?x a <http://krizik.felk.cvut.cz/ontologies/jopa/entities#OWLClassA> . }"),
24: @NamedNativeQuery(name = "OWLClassA.findByString", query = "SELECT ?x WHERE { ?x <" +
25: Vocabulary.pAStringAttribute + "> ?str . }")
26: })
27: @OWLClass(iri = "http://krizik.felk.cvut.cz/ontologies/jopa/entities#OWLClassA")
28: public class OWLClassA {
29:
30: @Types(fetchType = FetchType.EAGER)
31: private Set<String> types;
32:
33: @Id
34: private URI uri;
35:
36: @OWLDataProperty(iri = Vocabulary.pAStringAttribute)
37: private String stringAttribute;
38:
39: public OWLClassA() {
40: }
41:
42: public OWLClassA(URI uri) {
43: this.uri = uri;
44: }
45:
46: /**
47: * @param uri the uri to set
48: */
49: public void setUri(URI uri) {
50: this.uri = uri;
51: }
52:
53: /**
54: * @return the uri
55: */
56: public URI getUri() {
57: return uri;
58: }
59:
60: public void setStringAttribute(String stringAttribute) {
61: this.stringAttribute = stringAttribute;
62: }
63:
64: public String getStringAttribute() {
65: return stringAttribute;
66: }
67:
68: public void setTypes(Set<String> types) {
69: this.types = types;
70: }
71:
72: public Set<String> getTypes() {
73: return types;
74: }
75:
76: @Override
77: public String toString() {
78: String out = "OWLClassA: uri = " + uri;
79: out += ", stringAttribute = " + stringAttribute;
80:• if (types != null) {
81: out += ", types = {" + types.toString() + "}";
82: }
83: return out;
84: }
85:
86: public static String getClassIri() {
87: return OWLClassA.class.getDeclaredAnnotation(OWLClass.class).iri();
88: }
89: }