Skip to contentMethod: OWLClassF(URI)
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: import java.util.HashSet;
21: import java.util.Set;
22:
23: @OWLClass(iri = Vocabulary.C_OWL_CLASS_F)
24: public class OWLClassF implements HasUri {
25:
26: @Id
27: private URI uri;
28:
29: @Inferred
30: @OWLDataProperty(iri = "http://F-secondStringAttribute")
31: private String secondStringAttribute;
32:
33: @OWLObjectProperty(iri = Vocabulary.P_F_HAS_SIMPLE_SET)
34: private Set<OWLClassA> simpleSet;
35:
36: public OWLClassF() {
37: }
38:
39: public OWLClassF(URI uri) {
40: this.uri = uri;
41: }
42:
43: @Override
44: public URI getUri() {
45: return uri;
46: }
47:
48: public void setUri(URI uri) {
49: this.uri = uri;
50: }
51:
52: public String getSecondStringAttribute() {
53: return secondStringAttribute;
54: }
55:
56: public void setSecondStringAttribute(String secondStringAttribute) {
57: this.secondStringAttribute = secondStringAttribute;
58: }
59:
60: public Set<OWLClassA> getSimpleSet() {
61: if (simpleSet == null) {
62: this.simpleSet = new HashSet<>();
63: }
64: return simpleSet;
65: }
66:
67: public void setSimpleSet(Set<OWLClassA> simpleSet) {
68: this.simpleSet = simpleSet;
69: }
70:
71: @Override
72: public String toString() {
73: String out = "OWLClassF: uri = " + uri;
74: out += ", secondStringAttribute = " + secondStringAttribute;
75: return out;
76: }
77: }