Skip to contentPackage: Properties
Properties
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 java.lang.annotation.*;
21:
22: /**
23: * Denotes an attribute containing values of unmapped properties relevant for an entity.
24: * <p>
25: * The attribute has to be a {@link java.util.Map} of keys which are of a valid identifier type and represent
26: * ontological properties, e.g. {@link String}, and {@link java.util.Set}s of values of the properties. The type of the
27: * values can be either {@link String} or it can be {@link Object}, in which case the respective ontological type will
28: * be retained.
29: * <p>
30: * For example:
31: *
32: * <pre><code>Map<String, Set<String>></code></pre>
33: * <pre><code>Map<URI, Set<Object>></code></pre>
34: */
35: @Documented
36: @Retention(RetentionPolicy.RUNTIME)
37: @Target(ElementType.FIELD)
38: public @interface Properties {
39:
40: FetchType fetchType() default FetchType.LAZY;
41:
42: /**
43: * Denotes a member that is inferred (true) using the OWL reasoner or just asserted (false).
44: *
45: * @return Whether this property is read only
46: */
47: boolean readOnly() default false;
48: }