Skip to content

Method: getLocalDate()

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.XSD;
19:
20: import java.net.URI;
21: import java.time.Instant;
22: import java.time.LocalDate;
23: import java.time.LocalDateTime;
24: import java.util.Collection;
25: import java.util.Set;
26:
27: @OWLClass(iri = Vocabulary.C_OWL_CLASS_X)
28: public class OWLClassX implements HasUri {
29:
30: @Id(generated = true)
31: private URI uri;
32:
33: @OWLDataProperty(iri = Vocabulary.P_X_LOCAL_DATE_ATTRIBUTE)
34: private LocalDate localDate;
35:
36: @OWLDataProperty(iri = Vocabulary.P_X_LOCAL_DATETIME_ATTRIBUTE)
37: private LocalDateTime localDateTime;
38:
39: @OWLDataProperty(iri = Vocabulary.P_X_INSTANT_ATTRIBUTE)
40: private Instant instant;
41:
42: @OWLAnnotationProperty(iri = Vocabulary.P_X_OBJECT_ATTRIBUTE)
43: private Set<Object> objectAnnotation;
44:
45: @OWLObjectProperty(iri = Vocabulary.P_X_COLLECTION_ATTRIBUTE, cascade = CascadeType.PERSIST)
46: private Collection<OWLClassA> aCollection;
47:
48: @OWLDataProperty(iri = Vocabulary.p_m_explicitDatatype, datatype = XSD.INT)
49: private Set<String> explicitDatatypes;
50:
51: public URI getUri() {
52: return uri;
53: }
54:
55: public void setUri(URI uri) {
56: this.uri = uri;
57: }
58:
59: public LocalDate getLocalDate() {
60: return localDate;
61: }
62:
63: public void setLocalDate(LocalDate localDate) {
64: this.localDate = localDate;
65: }
66:
67: public LocalDateTime getLocalDateTime() {
68: return localDateTime;
69: }
70:
71: public void setLocalDateTime(LocalDateTime localDateTime) {
72: this.localDateTime = localDateTime;
73: }
74:
75: public Instant getInstant() {
76: return instant;
77: }
78:
79: public void setInstant(Instant instant) {
80: this.instant = instant;
81: }
82:
83: public Set<Object> getObjectAnnotation() {
84: return objectAnnotation;
85: }
86:
87: public void setObjectAnnotation(Set<Object> objectAnnotation) {
88: this.objectAnnotation = objectAnnotation;
89: }
90:
91: public Collection<OWLClassA> getACollection() {
92: return aCollection;
93: }
94:
95: public void setACollection(Collection<OWLClassA> aCollection) {
96: this.aCollection = aCollection;
97: }
98:
99: public Set<String> getExplicitDatatypes() {
100: return explicitDatatypes;
101: }
102:
103: public void setExplicitDatatypes(Set<String> explicitDatatypes) {
104: this.explicitDatatypes = explicitDatatypes;
105: }
106:
107: @Override
108: public String toString() {
109: return "OWLClassX{" +
110: "uri=" + uri +
111: ", localDate=" + localDate +
112: ", localDateTime=" + localDateTime +
113: ", instant=" + instant +
114: ", objectAnnotation=" + objectAnnotation +
115: ", aCollection=" + aCollection +
116: ", explicitDatatypes=" + explicitDatatypes +
117: '}';
118: }
119: }