Skip to content

Commit

Permalink
Merge pull request #70 from hobbit-project/develop
Browse files Browse the repository at this point in the history
Developed version 1.0.23
  • Loading branch information
MichaelRoeder authored Jan 18, 2024
2 parents 797b965 + 204b80f commit aa0ea38
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 22 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Start Rabbit
run: make start-rabbit
- name: Build project
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Run tests
run: mvn jacoco:prepare-agent test -B jacoco:report
- name: Upload tests
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
LATEST_VERSION="$(curl -Ls https://api.bintray.com/packages/codacy/Binaries/codacy-coverage-reporter/versions/_latest | jq -r .name)"
curl -Ls -o codacy-coverage-reporter "https://dl.bintray.com/codacy/Binaries/${LATEST_VERSION}/codacy-coverage-reporter-linux"
chmod +x codacy-coverage-reporter
./codacy-coverage-reporter report -l Java -r target/site/jacoco/jacoco.xml
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Docker container with RabbitMQ can be started using `./start_test_environment.sh
<dependency>
<groupId>org.hobbit</groupId>
<artifactId>core</artifactId>
<version>1.0.3</version>
<version>1.0.22</version>
</dependency>
...
</dependencies>
Expand Down
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hobbit</groupId>
<artifactId>core</artifactId>
<version>1.0.22</version>
<version>1.0.23</version>

<!-- LICENSE -->
<licenses>
Expand Down Expand Up @@ -193,4 +193,16 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>org.aksw.maven.internal</id>
<name>University Leipzig, AKSW Maven2 Repository</name>
<url>https://maven.aksw.org/repository/internal</url>
</repository>
<snapshotRepository>
<id>org.aksw.maven.snapshots</id>
<name>University Leipzig, AKSW Maven2 Repository</name>
<url>https://maven.aksw.org/repository/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
65 changes: 65 additions & 0 deletions src/main/java/org/hobbit/vocab/HobbitErrorInstances.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* This file is part of core.
*
* core is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* core is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with core. If not, see <http://www.gnu.org/licenses/>.
*/
package org.hobbit.vocab;

import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;

/**
* HOBBIT namespace for error instances.
*
* @author Michael R&ouml;der ([email protected])
*
*/
public class HobbitErrorInstances {

protected static final String uri = "http://w3id.org/hobbit/error-instance#";

/**
* returns the URI for this schema
*
* @return the URI for this schema
*/
public static String getURI() {
return uri;
}

protected static final Resource resource(String local) {
return ResourceFactory.createResource(getErrorInstanceUri(local));
}

/**
* returns the error-instance resource given its ID
*
* @param instanceId the ID of the error instance
* @return the error instance resource
*/
public static Resource getErrorInstance(String instanceId) {
return resource(instanceId);
}

/**
* returns the URI of an error instance given its ID
*
* @param instanceId the ID of the error instance
* @return the error instance URI
*/
public static String getErrorInstanceUri(String instanceId) {
return uri + instanceId;
}

}

0 comments on commit aa0ea38

Please sign in to comment.