Skip to content

Package: OWLDataProperty

OWLDataProperty

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 datatype property.
21: * <p>
22: * This means that literal values are expected for such attributes.
23: * <p>
24: * Note that for use with RDF(S), attributes annotated with this annotation are expected to reference literals.
25: */
26: @Documented
27: @Retention(RetentionPolicy.RUNTIME)
28: @Target(ElementType.FIELD)
29: public @interface OWLDataProperty {
30:
31: /**
32: * IRI of the data property
33: *
34: * @return IRI of the data property
35: */
36: String iri();
37:
38: /**
39: * (Optional) Whether the association should be lazily loaded or must be eagerly fetched.
40: *
41: * @return Fetch type of this property
42: */
43: FetchType fetch() default FetchType.EAGER;
44:
45: /**
46: * (Optional) Marks an attribute whose value is a lexical form of a literal value.
47: * <p>
48: * This parameter should be used on {@code String} attributes, as literal lexical form is always a string. Lexical
49: * form of a literal of any datatype can be loaded. However, saving the lexical form is forbidden to prevent
50: * unintentional change of the data 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: *
58: * @return Whether the mapped value is a simple literal
59: */
60: boolean simpleLiteral() default false;
61: }