Skip to content

Package: Rdf4jMemoryStorageConfig

Rdf4jMemoryStorageConfig

nameinstructionbranchcomplexitylinemethod
Rdf4jMemoryStorageConfig()
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%
createStorageConfiguration(int)
M: 8 C: 36
82%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 8
100%
M: 0 C: 1
100%
static {...}
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%

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 cz.cvut.kbss.jopa.model.JOPAPersistenceProperties;
21:
22: import java.util.HashMap;
23: import java.util.Map;
24:
25: /**
26: * Persistent storage configuration for Sesame in-memory store.
27: */
28: public class Rdf4jMemoryStorageConfig extends StorageConfig {
29:
30: private static final OntologyConnectorType TYPE = OntologyConnectorType.RDF4J;
31:
32: @Override
33: public Map<String, String> createStorageConfiguration(int index) {
34:• assert index >= 0;
35:• assert name != null;
36:
37: final String base = name + TYPE + index;
38:
39: final Map<String, String> config = new HashMap<>();
40: config.put(JOPAPersistenceProperties.DATA_SOURCE_CLASS, TYPE.getDriverClass());
41: config.put(JOPAPersistenceProperties.ONTOLOGY_URI_KEY, TestEnvironment.IRI_BASE + base);
42: config.put(JOPAPersistenceProperties.ONTOLOGY_PHYSICAL_URI_KEY, base);
43: return config;
44: }
45: }