Package: JenaStorageConfig
JenaStorageConfig
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JenaStorageConfig() |
|
|
|
|
|
||||||||||||||||||||
createStorageConfiguration(int) |
|
|
|
|
|
||||||||||||||||||||
static {...} |
|
|
|
|
|
Coverage
1: /*
2: * JOPA
3: * Copyright (C) 2024 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 Jena accessed in-memory storage.
27: */
28: public class JenaStorageConfig extends StorageConfig {
29:
30: private static final OntologyConnectorType TYPE = OntologyConnectorType.JENA;
31:
32: @Override
33: public Map<String, String> createStorageConfiguration(int index) {
34:• assert index >= 0;
35:• assert name != null;
36:
37: 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: }
46:
47: }