Skip to content

Package: ListAttribute

ListAttribute

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.metamodel;
19:
20: import cz.cvut.kbss.jopa.NonJPA;
21: import cz.cvut.kbss.jopa.model.IRI;
22: import cz.cvut.kbss.jopa.model.annotations.SequenceType;
23:
24: /**
25: * Instances of the type ListAttribute represent persistent {@link java.util.List}-valued attributes.
26: *
27: * @param <X> The type the represented List belongs to
28: * @param <E> The element type of the represented List
29: */
30: public interface ListAttribute<X, E> extends PluralAttribute<X, java.util.List<E>, E> {
31:
32: /**
33: * Gets the type of the sequence.
34: *
35: * @return List type
36: */
37: @NonJPA
38: SequenceType getSequenceType();
39:
40: /**
41: * Gets the IRI of the class that represents the 'OWLList' concept.
42: * <p>
43: * This is relevant only for referenced lists.
44: *
45: * @return List type IRI
46: */
47: @NonJPA
48: IRI getListClassIRI();
49:
50: /**
51: * Gets IRI of the property representing the relation between a list node and its content (value).
52: * <p>
53: * Relevant only for referenced lists.
54: *
55: * @return Property IRI
56: */
57: @NonJPA
58: IRI getHasContentsPropertyIRI();
59:
60: /**
61: * Gets IRI of the property representing next node in the list.
62: *
63: * @return Property IRI
64: */
65: @NonJPA
66: IRI getHasNextPropertyIRI();
67:
68: /**
69: * Whether this list represents a <a href="https://www.w3.org/TR/rdf12-schema/#ch_collectionvocab">RDF
70: * collection</a>.
71: *
72: * @return {@code true} when this list attribute is an RDF collection, {@code false} otherwise
73: * @see cz.cvut.kbss.jopa.model.annotations.RDFCollection
74: */
75: @NonJPA
76: boolean isRDFCollection();
77: }