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