Skip to contentPackage: Types
Types
Coverage
1: /**
2: * Copyright (C) 2020 Czech Technical University in Prague
3: * <p>
4: * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
5: * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
6: * version.
7: * <p>
8: * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
9: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
10: * details. You should have received a copy of the GNU General Public License along with this program. If not, see
11: * <http://www.gnu.org/licenses/>.
12: */
13: package cz.cvut.kbss.ontodriver;
14:
15: import cz.cvut.kbss.ontodriver.exception.OntoDriverException;
16: import cz.cvut.kbss.ontodriver.model.Axiom;
17: import cz.cvut.kbss.ontodriver.model.NamedResource;
18:
19: import java.net.URI;
20: import java.util.Collection;
21: import java.util.Set;
22:
23: /**
24: * This interface is used for working with individuals' types.
25: */
26: public interface Types {
27:
28: /**
29: * Gets types associated with the specified individual.
30: *
31: * @param individual Resource for which types should be found
32: * @param contexts Context in which to look for the types. Empty collection indicates the default context
33: * @param includeInferred Whether to include inferred types as well
34: * @return Set of type URIs
35: * @throws OntoDriverException When an ontology access error occurs
36: */
37: Set<Axiom<URI>> getTypes(NamedResource individual, Collection<URI> contexts, boolean includeInferred)
38: throws OntoDriverException;
39:
40: /**
41: * Adds the specified types to the named individual in the ontology.
42: *
43: * @param individual The types subject
44: * @param context Context into which the type statements will be added
45: * @param types The types to add
46: * @throws OntoDriverException When an ontology access error occurs
47: */
48: void addTypes(NamedResource individual, URI context, Set<URI> types) throws OntoDriverException;
49:
50: /**
51: * Removes the specified types of the named individual in the ontology.
52: *
53: * @param individual The types subject
54: * @param context Context into which the type statements will be added
55: * @param types The types to add
56: * @throws OntoDriverException When an ontology access error occurs
57: */
58: void removeTypes(NamedResource individual, URI context, Set<URI> types) throws OntoDriverException;
59: }