Skip to content

Method: getPersistenceContext()

1:•/**
2: * Copyright (C) 2022 Czech Technical University in Prague
3: * <p>
4: * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
5: * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
6: * version.
7: * <p>
8: * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
9: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
10: * details. You should have received a copy of the GNU General Public License along with this program. If not, see
11: * <http://www.gnu.org/licenses/>.
12: */
13: package cz.cvut.kbss.jopa.test;
14:
15: import cz.cvut.kbss.jopa.model.annotations.*;
16: import cz.cvut.kbss.jopa.vocabulary.RDFS;
17:
18: import java.net.URI;
19: import java.util.Objects;
20:
21: @OWLClass(iri = Vocabulary.C_OWL_CLASS_R)
22: public class OWLClassR implements HasUri {
23:
24: @Id
25: private URI uri;
26:
27: @OWLAnnotationProperty(iri = RDFS.LABEL)
28: private String name;
29:
30: @Enumerated(EnumType.OBJECT_ONE_OF)
31: @OWLObjectProperty(iri = Vocabulary.P_HAS_OBJECT_ONE_OF)
32: private ObjectOneOfEnum objectOneOf;
33:
34: public OWLClassR() {
35: }
36:
37: public OWLClassR(URI uri) {
38: this.uri = uri;
39: }
40:
41: @Override
42: public URI getUri() {
43: return uri;
44: }
45:
46: public void setUri(URI uri) {
47: this.uri = uri;
48: }
49:
50: public String getName() {
51: return name;
52: }
53:
54: public void setName(String name) {
55: this.name = name;
56: }
57:
58: public ObjectOneOfEnum getObjectOneOf() {
59: return objectOneOf;
60: }
61:
62: public void setObjectOneOf(ObjectOneOfEnum objectOneOf) {
63: this.objectOneOf = objectOneOf;
64: }
65:
66: @Override
67: public boolean equals(Object o) {
68: if (this == o) {
69: return true;
70: }
71: if (o == null || getClass() != o.getClass()) {
72: return false;
73: }
74: OWLClassR owlClassR = (OWLClassR) o;
75: return Objects.equals(name, owlClassR.name);
76: }
77:
78: @Override
79: public int hashCode() {
80: return Objects.hashCode(name);
81: }
82:
83: @Override
84: public String toString() {
85: return "OWLClassR{<" +
86: uri +
87: ">, name='" + name +
88: "', objectOneOf=" + objectOneOf +
89: '}';
90: }
91: }