I have a project with the structure:
-config
-repositories
-test-repo.ttl
The test-repo.ttl file looks like this:
@prefix lookup: <http://www.metaphacts.com/ontologies/platform/repository/lookup#> .
@prefix pathfinder: <http://www.metaphacts.com/ontologies/platform/service/pathfinder/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rep: <http://www.openrdf.org/config/repository#> .
@prefix sail: <http://www.openrdf.org/config/sail#> .
@prefix sr: <http://www.openrdf.org/config/repository/sail#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix mph: <http://www.metaphacts.com/ontologies/platform/repository#> .
@prefix ephedra: <http://www.metaphacts.com/ontologies/platform/ephedra#> .
@prefix fedsail: <http://www.openrdf.org/config/sail/federation#> .
@prefix sparqlr: <http://www.openrdf.org/config/repository/sparql#> .
[] a rep:Repository;
rep:repositoryID "test-repo";
rdfs:label "Repository to access data.";
rep:repositoryImpl [
rep:repositoryType "openrdf:SailRepository";
sr:sailImpl [
sail:sailType "metaphacts:RESTService";
ephedra:serviceURL "https://request-to-access-data.com";
ephedra:implementsService ephedra:test-ephedra;
ephedra:httpMethod "GET";
ephedra:httpHeader [
ephedra:name "Authorization";
ephedra:value "my_secret_token"
]
]
] .
The string my_secret_token changes every time the project is run, so I would need to imput its value from a java file. I am an absolute beginner in java. Is it possible to have a java file in which I create the my_secret_token variable and assign it the value of "123" for example, and then to pass this value to the ephedra:value
field in the turtle file?
If so, can you help me to achieve this?