Skip to content

Package: OWLObjectProperty

OWLObjectProperty

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.model.annotations;
16:
17: import java.lang.annotation.*;
18:
19: /**
20: * Marks an attribute mapped to an OWL object property.
21: *
22: * The Java type of such attributes is either another entity or a valid identifier type.
23: *
24: * Note that for use with RDF(S), attributes annotated with this annotation are expected to reference other RDF resources.
25: */
26: @Documented
27: @Retention(RetentionPolicy.RUNTIME)
28: @Target(ElementType.FIELD)
29: public @interface OWLObjectProperty {
30:
31: /**
32: * IRI of the object property
33: *
34: * @return IRI of the object property
35: */
36: String iri();
37:
38: /**
39: * (Optional) The operations that must be cascaded to the target of the association.
40: * <p>
41: * By default no operations are cascaded.
42: *
43: * @return Cascading setting for the annotated attribute
44: */
45: CascadeType[] cascade() default {};
46:
47: /**
48: * (Optional) Whether the association should be lazily loaded or must be eagerly fetched.
49: *
50: * @return Whether this property is read only
51: */
52: FetchType fetch() default FetchType.LAZY;
53: }