Skip to content

Package: StorageConfig

StorageConfig

nameinstructionbranchcomplexitylinemethod
StorageConfig()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setDirectory(String)
M: 4 C: 7
64%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
setName(String)
M: 4 C: 7
64%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 1
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

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.test.environment;
16:
17: import java.util.Map;
18:
19: /**
20: * Persistent storage configuration.
21: *
22: * @author ledvima1
23: */
24: public abstract class StorageConfig {
25:
26: protected String name;
27: protected String directory;
28:
29: public StorageConfig() {
30: }
31:
32: public void setName(String name) {
33:• assert name != null;
34: this.name = name;
35: }
36:
37: public void setDirectory(String directory) {
38:• assert directory != null;
39: this.directory = directory;
40: }
41:
42: /**
43: * Creates ontology storage properties for this storage configuration. </p>
44: * <p>
45: * This method performs any necessary tasks before creating the storage properties (typically deleting the old
46: * data).
47: *
48: * @param index Index appended to file/folder name, used when multiple storages of the same type can occur
49: * @return OntologyStorageProperties
50: */
51: public abstract Map<String, String> createStorageConfiguration(int index);
52: }