Skip to content

Package: EntityType

EntityType

Coverage

1: /**
2: * Copyright (C) 2016 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.metamodel;
16:
17: import cz.cvut.kbss.jopa.NonJPA;
18: import cz.cvut.kbss.jopa.model.IRI;
19:
20: import java.util.Set;
21:
22: /**
23: * Instances of the type EntityType represent entity types.
24: *
25: * @param <X> The represented entity type.
26: */
27: public interface EntityType<X> extends IdentifiableType<X>, Bindable<X> {
28: /**
29: * Return the entity name.
30: *
31: * @return entity name
32: */
33: String getName();
34:
35: /**
36: * Gets IRI of the OWL class represented by this entity type.
37: *
38: * @return OWL class IRI
39: */
40: @NonJPA
41: IRI getIRI();
42:
43: @NonJPA
44: Identifier getIdentifier();
45:
46: @NonJPA
47: TypesSpecification<? super X, ?> getTypes();
48:
49: @NonJPA
50: PropertiesSpecification<? super X, ?, ?, ?> getProperties();
51:
52: /**
53: * Gets specification of a field with the specified name.
54: * <p>
55: * In contrast to {@link #getAttribute(String)}, calling this method can also return field specification for a types
56: * or properties field.
57: *
58: * @param fieldName Name of the field
59: * @return Field specification
60: * @throws IllegalArgumentException If attribute of the given name is not present in the managed type
61: */
62: @NonJPA
63: FieldSpecification<? super X, ?> getFieldSpecification(String fieldName);
64:
65: /**
66: * Gets all field specifications of this entity type.
67: * <p>
68: * In contrast to {@link #getAttributes()}, this method returns also specifications of types and properties (if
69: * present).
70: *
71: * @return Field specifications
72: */
73: @NonJPA
74: Set<FieldSpecification<? super X, ?>> getFieldSpecifications();
75: }