Skip to contentPackage: OWLAnnotationProperty
OWLAnnotationProperty
Coverage
1: /**
2: * Copyright (C) 2020 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 annotation property.
21: * <p>
22: * This means that the attribute can contain a literal or a reference to another object.
23: */
24: @Documented
25: @Retention(RetentionPolicy.RUNTIME)
26: @Target(ElementType.FIELD)
27: public @interface OWLAnnotationProperty {
28: /**
29: * IRI of the annotation property
30: *
31: * @return IRI of the annotation property
32: */
33: String iri();
34:
35: /**
36: * (Optional) Whether the association should be lazily loaded or must be eagerly fetched.
37: *
38: * @return Fetch type of this property
39: */
40: FetchType fetch() default FetchType.EAGER;
41:
42: /**
43: * (Optional) Marks an attribute whose value is a lexical form of a literal value.
44: * <p>
45: * This parameter should be used on {@code String} attributes, as literal lexical form is always a string. Lexical
46: * form of a literal of any datatype can be loaded. However, saving the lexical form is forbidden to prevent
47: * unintentional change of the data type.
48: * <p>
49: * Note that if the value being loaded is an identifier, it will still be loaded, because it is not a literal and
50: * {@code String} is a valid identifier mapping type.
51: */
52: boolean lexicalForm() default false;
53:
54: /**
55: * (Optional) Whether the value should be stored as a <a href="https://www.w3.org/TR/rdf11-concepts/">simple
56: * literal</a>, i.e. {@code xsd:string}.
57: * <p>
58: * Note that if the value being loaded is an identifier, it will still be loaded, because it is not a literal and
59: * {@code String} is a valid identifier mapping type. However, updates will replace the original with a {@code
60: * xsd:string} value.
61: *
62: * @return Whether the mapped value is a simple literal
63: */
64: boolean simpleLiteral() default false;
65: }