Skip to content

Package: Types

Types

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.ontodriver;
16:
17: import cz.cvut.kbss.ontodriver.exception.OntoDriverException;
18: import cz.cvut.kbss.ontodriver.model.Axiom;
19: import cz.cvut.kbss.ontodriver.model.NamedResource;
20:
21: import java.net.URI;
22: import java.util.Set;
23:
24: /**
25: * This interface is used for working with individuals' types.
26: *
27: * @author ledvima1
28: */
29: public interface Types {
30:
31: /**
32: * Gets types associated with the specified individual.
33: *
34: * @param individual Resource for which types should be found
35: * @param context Context in which to look for the types
36: * @param includeInferred Whether to include inferred types as well
37: * @return Set of type URIs
38: * @throws OntoDriverException When an ontology access error occurs
39: */
40: public Set<Axiom<URI>> getTypes(NamedResource individual, URI context, boolean includeInferred) throws OntoDriverException;
41:
42: /**
43: * Adds the specified types to the named individual in the ontology.
44: *
45: * @param individual The types subject
46: * @param context Context into which the type statements will be added
47: * @param types The types to add
48: * @throws OntoDriverException When an ontology access error occurs
49: */
50: public void addTypes(NamedResource individual, URI context, Set<URI> types) throws OntoDriverException;
51:
52: /**
53: * Removes the specified types of the named individual in the ontology.
54: *
55: * @param individual The types subject
56: * @param context Context into which the type statements will be added
57: * @param types The types to add
58: * @throws OntoDriverException When an ontology access error occurs
59: */
60: public void removeTypes(NamedResource individual, URI context, Set<URI> types) throws OntoDriverException;
61: }