-
Notifications
You must be signed in to change notification settings - Fork 14
/
StorageTestUtil.java
30 lines (23 loc) · 1.31 KB
/
StorageTestUtil.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cz.cvut.kbss.ontodriver.jena.connector;
import cz.cvut.kbss.ontodriver.OntologyStorageProperties;
import cz.cvut.kbss.ontodriver.config.Configuration;
import cz.cvut.kbss.ontodriver.jena.JenaDataSource;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.rdf.model.Statement;
import java.net.URI;
import static org.apache.jena.rdf.model.ResourceFactory.createProperty;
import static org.apache.jena.rdf.model.ResourceFactory.createResource;
class StorageTestUtil {
static final String RESOURCE = "http://onto.fel.cvut.cz/ontologies/jena-driver/Resource";
static final String TYPE_ONE = "http://onto.fel.cvut.cz/ontologies/jena-driver/TypeOne";
static final String TYPE_TWO = "http://onto.fel.cvut.cz/ontologies/jena-driver/TypeTwo";
static final String NAMED_GRAPH = "http://onto.fel.cvut.cz/ontologies/jena-driver/GraphOne";
static Configuration createConfiguration(String physicalUri) {
return new Configuration(OntologyStorageProperties.driver(JenaDataSource.class.toString()).physicalUri(
URI.create(physicalUri)).build());
}
static Statement statement(String subject, String property, String value) {
return ResourceFactory
.createStatement(createResource(subject), createProperty(property), createResource(value));
}
}