Skip to contentPackage: OWLObjectProperty
OWLObjectProperty
Coverage
1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.jopa.model.annotations;
19:
20: import cz.cvut.kbss.jopa.model.annotations.util.Property;
21:
22: import java.lang.annotation.Documented;
23: import java.lang.annotation.ElementType;
24: import java.lang.annotation.Retention;
25: import java.lang.annotation.RetentionPolicy;
26: import java.lang.annotation.Target;
27:
28: /**
29: * Marks an attribute mapped to an OWL object property.
30: *
31: * The Java type of such attributes is either another entity or a valid identifier type.
32: *
33: * Note that for use with RDF(S), attributes annotated with this annotation are expected to reference other RDF resources.
34: */
35: @Documented
36: @Property
37: @Retention(RetentionPolicy.RUNTIME)
38: @Target({ElementType.FIELD,ElementType.METHOD})
39: public @interface OWLObjectProperty {
40:
41: /**
42: * IRI of the object property
43: *
44: * @return IRI of the object property
45: */
46: String iri();
47:
48: /**
49: * (Optional) The operations that must be cascaded to the target of the association.
50: * <p>
51: * By default no operations are cascaded.
52: *
53: * @return Cascading setting for the annotated attribute
54: */
55: CascadeType[] cascade() default {};
56:
57: /**
58: * (Optional) Whether the association should be lazily loaded or must be eagerly fetched.
59: *
60: * @return Whether this property is read only
61: */
62: FetchType fetch() default FetchType.LAZY;
63: }