Skip to content

Instantly share code, notes, and snippets.

View kristofmeixner's full-sized avatar

Kristof Meixner kristofmeixner

  • TU Wien
  • Vienna
View GitHub Profile
@kristofmeixner
kristofmeixner / PPRModel.json
Last active March 25, 2021 18:25
Neo4J Test
{
"Products" : [{
"name": "Socket"
}, {
"name": "Pole1"
}, {
"name": "Rocker1"
}],
"Resources" : [{
"name": "Linefeed1"
@kristofmeixner
kristofmeixner / README.md
Created June 23, 2020 05:33
Work plan as IDEF0 for SPLC

The Workplan for the thesis as IDEF0 diagram

@kristofmeixner
kristofmeixner / retrievingdatasets.java
Created July 12, 2016 06:51
Retrieving the dataset commit and re-executing the query
String workingTreeDir = getWorkingTreeDir();
Git git = new Git(repository));
// Checking out the query branch and loading the query
git.checkout().setName("refs/heads/queries").call();
Path path = Paths.get(workingTreeDir, DigestUtils.sha1Hex(pid) + ".query");
Properties properties = properties.load(Files.newBufferedReader(path))
// Extracting the commit hash from the metadata file
Query query = new DefaultQuery(properties.getProperty("commit"));
@kristofmeixner
kristofmeixner / savingqueries.java
Created July 12, 2016 06:49
Saving query files in the queries branch
Git git = new Git(repository);
String pid = query.getPid().getIdentifier();
PersonIdent personIdent = new PersonIdent("Jane Doe","doe@gmail.com");
String message = "Created query file for PID=" + pid;
// Building the SHA1 hash for the PID
String fileName = DigestUtils.sha1Hex(pid) + ".query";
// Retrieving the queries branch
git.checkout().setName("refs/heads/queries").call();
@kristofmeixner
kristofmeixner / gitbranchcreation.java
Created July 12, 2016 06:38
Creating the CSV and metadata branch
Git git = new Git(repository);
// Creating the master branch if it doesn't exist
ObjectId head = repository.resolve("refs/heads/master");
if (head != null) { return; }
// Creating the initial commit on the branch
git.commit().setMessage("Initial commit").call();
String readmeFileName = "README.md";