Package: OWLClassZChild
OWLClassZChild
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OWLClassZChild() |
|
|
|
|
|
||||||||||||||||||||
equals(Object) |
|
|
|
|
|
||||||||||||||||||||
getChildren() |
|
|
|
|
|
||||||||||||||||||||
getId() |
|
|
|
|
|
||||||||||||||||||||
getName() |
|
|
|
|
|
||||||||||||||||||||
getPersistenceContext() |
|
|
|
|
|
||||||||||||||||||||
hashCode() |
|
|
|
|
|
||||||||||||||||||||
setChildren(Set) |
|
|
|
|
|
||||||||||||||||||||
setId(URI) |
|
|
|
|
|
||||||||||||||||||||
setName(String) |
|
|
|
|
|
||||||||||||||||||||
setPersistenceContext(UnitOfWorkImpl) |
|
|
|
|
|
||||||||||||||||||||
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.*;
18: import cz.cvut.kbss.jopa.vocabulary.RDFS;
19:
20: import java.net.URI;
21: import java.util.HashSet;
22: import java.util.Objects;
23: import java.util.Set;
24:
25: @OWLClass(iri = Vocabulary.C_OWL_CLASS_Z_CHILD)
26: public class OWLClassZChild {
27:
28: @Id
29: private URI id;
30:
31: @ParticipationConstraints(nonEmpty = true)
32: @OWLDataProperty(iri = RDFS.LABEL)
33: private String name;
34:
35: @OWLObjectProperty(iri = Vocabulary.ATTRIBUTE_IRI_BASE + "hasChild", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
36: private Set<OWLClassZChild> children = new HashSet<>();
37:
38: public URI getId() {
39: return id;
40: }
41:
42: public void setId(URI id) {
43: this.id = id;
44: }
45:
46: public String getName() {
47: return name;
48: }
49:
50: public void setName(String name) {
51: this.name = name;
52: }
53:
54: public Set<OWLClassZChild> getChildren() {
55: return children;
56: }
57:
58: public void setChildren(Set<OWLClassZChild> children) {
59: this.children = children;
60: }
61:
62: @Override
63: public boolean equals(Object o) {
64:• if (this == o) return true;
65:• if (o == null || getClass() != o.getClass()) return false;
66: OWLClassZChild that = (OWLClassZChild) o;
67: return Objects.equals(id, that.id);
68: }
69:
70: @Override
71: public int hashCode() {
72: return Objects.hash(id);
73: }
74:
75: @Override
76: public String toString() {
77: return "OWLClassZChild{<" + getId() + ">" +
78: ", name='" + name + '\'' +
79: '}';
80: }
81: }