Skip to content

Commit db4f6f1

Browse files
Merge branch 'develop' of github.com:LorenzBuehmann/DL-Learner into develop
2 parents 7cbffed + 03ec70e commit db4f6f1

35 files changed

Lines changed: 716 additions & 350 deletions

.github/workflows/workflow.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
9+
jobs:
10+
build:
11+
name: Build on Java ${{ matrix.java_version }} and ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
java_version: ['1.8', '9.0.x']
15+
os: [ubuntu-latest, windows-latest, macOS-latest]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Set up JDK ${{ matrix.java_version }}
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: ${{ matrix.java_version }}
25+
architecture: x64
26+
- name: Build with Maven
27+
run: mvn compile --file pom.xml

components-core/pom.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<plugin>
221221
<groupId>org.jacoco</groupId>
222222
<artifactId>jacoco-maven-plugin</artifactId>
223-
<version>0.7.6.201602180812</version>
223+
<version>0.8.4</version>
224224
<executions>
225225
<execution>
226226
<goals>
@@ -303,12 +303,12 @@
303303
<dependency>
304304
<groupId>javax.json</groupId>
305305
<artifactId>javax.json-api</artifactId>
306-
<version>1.1.2</version>
306+
<version>1.1.4</version>
307307
</dependency>
308308
<dependency>
309309
<groupId>org.glassfish</groupId>
310310
<artifactId>javax.json</artifactId>
311-
<version>1.1.2</version>
311+
<version>1.1.4</version>
312312
</dependency>
313313

314314
<!--
@@ -577,7 +577,18 @@
577577
<artifactId>commons-collections4</artifactId>
578578
</dependency>
579579

580-
580+
<dependency>
581+
<groupId>javax.annotation</groupId>
582+
<artifactId>javax.annotation-api</artifactId>
583+
</dependency>
584+
<dependency>
585+
<groupId>javax.xml.bind</groupId>
586+
<artifactId>jaxb-api</artifactId>
587+
</dependency>
588+
<dependency>
589+
<groupId>javax.xml.ws</groupId>
590+
<artifactId>jaxws-api</artifactId>
591+
</dependency>
581592

582593
<dependency>
583594
<groupId>org.apache.logging.log4j</groupId>

components-core/src/main/java/org/dllearner/algorithms/CELOEWrapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.dllearner.algorithms;
2020

21+
import com.google.common.base.StandardSystemProperty;
2122
import com.google.common.collect.Sets;
2223
import org.apache.jena.query.ParameterizedSparqlString;
2324
import org.apache.jena.query.QueryExecution;
@@ -41,6 +42,7 @@
4142
import org.semanticweb.owlapi.model.*;
4243
import uk.ac.manchester.cs.owl.owlapi.OWLClassImpl;
4344

45+
import java.io.File;
4446
import java.io.FileNotFoundException;
4547
import java.io.FileOutputStream;
4648
import java.util.Set;
@@ -113,7 +115,7 @@ protected void learnAxioms() {
113115

114116
OWLOntology fragment = buildFragment(posExamples, negExamples);
115117
try {
116-
fragment.getOWLOntologyManager().saveOntology(fragment, new RDFXMLDocumentFormat(), new FileOutputStream("/tmp/ont.owl"));
118+
fragment.getOWLOntologyManager().saveOntology(fragment, new RDFXMLDocumentFormat(), new FileOutputStream(System.getProperty("java.io.tmpdir") + File.separator + "ont.owl"));
117119
} catch (OWLOntologyStorageException | FileNotFoundException e1) {
118120
// TODO Auto-generated catch block
119121
e1.printStackTrace();

components-core/src/main/java/org/dllearner/algorithms/qtl/operations/lgg/LGGGeneratorRDFS.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.dllearner.algorithms.qtl.operations.lgg;
2020

21+
import com.google.common.base.StandardSystemProperty;
2122
import com.google.common.collect.Lists;
2223
import com.google.common.collect.Sets;
2324
import org.aksw.jena_sparql_api.cache.h2.CacheUtilsH2;
@@ -49,6 +50,7 @@
4950
import org.dllearner.utilities.NonStandardReasoningServices;
5051
import org.semanticweb.owlapi.model.EntityType;
5152

53+
import java.io.File;
5254
import java.util.*;
5355
import java.util.concurrent.TimeUnit;
5456
import java.util.function.Predicate;
@@ -214,7 +216,7 @@ public static void main(String[] args) throws Exception {
214216
endpoint = SparqlEndpoint.create("http://sake.informatik.uni-leipzig.de:8890/sparql", "http://dbpedia.org");
215217
QueryExecutionFactory qef = FluentQueryExecutionFactory
216218
.http(endpoint.getURL().toString(), endpoint.getDefaultGraphURIs()).config()
217-
.withCache(CacheUtilsH2.createCacheFrontend("/tmp/cache", false, TimeUnit.DAYS.toMillis(60)))
219+
.withCache(CacheUtilsH2.createCacheFrontend(System.getProperty("java.io.tmpdir") + File.separator + "cache", false, TimeUnit.DAYS.toMillis(60)))
218220
.withPagination(10000).withDelay(50, TimeUnit.MILLISECONDS).end().create();
219221

220222
// tree generation

components-core/src/main/java/org/dllearner/algorithms/qtl/operations/tuples/QTLTuples.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.stream.Collectors;
99
import java.util.stream.Stream;
1010

11+
import com.google.common.base.StandardSystemProperty;
1112
import com.google.common.collect.Lists;
1213
import com.google.common.collect.Maps;
1314
import com.google.common.collect.Sets;
@@ -308,7 +309,7 @@ private Map<String, Map.Entry<RDFResourceTree, List<Node>>> connect(List<Node> t
308309
});
309310
});
310311
log.debug("connected tree\n{}", tree::getStringRepresentation);
311-
QueryTreeUtils.asGraph(tree, baseIRI, pm, new File("/tmp/tree-" + FmtUtils.stringForNode(node, pm) + ".graphml"));
312+
QueryTreeUtils.asGraph(tree, baseIRI, pm, new File(System.getProperty("java.io.tmpdir") + File.separator + "tree-" + FmtUtils.stringForNode(node, pm) + ".graphml"));
312313
result.put(key, Maps.immutableEntry(tree, new ArrayList<>(nodes2Project)));
313314
};
314315

@@ -729,7 +730,7 @@ public static void main(String[] args) throws Exception {
729730

730731
Graph<Vertex, Edge> g = QueryTreeUtils.toGraph(tree, baseIRI, pm);
731732

732-
QueryTreeUtils.asGraph(tree, baseIRI, pm, new File("/tmp/lgg.graphml"));
733+
QueryTreeUtils.asGraph(tree, baseIRI, pm, new File(System.getProperty("java.io.tmpdir") + File.separator + "lgg.graphml"));
733734

734735
});
735736

components-core/src/main/java/org/dllearner/kb/repository/bioportal/BioPortalRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.dllearner.kb.repository.bioportal;
2020

2121
import com.google.common.base.Charsets;
22+
import com.google.common.base.StandardSystemProperty;
2223
import joptsimple.OptionParser;
2324
import joptsimple.OptionSet;
2425
import joptsimple.OptionSpec;
@@ -186,7 +187,7 @@ public static void main(String[] args) throws Exception{
186187
// create Options object
187188
OptionParser parser = new OptionParser();
188189
OptionSpec<File> baseDir =
189-
parser.accepts( "basedir" ).withRequiredArg().ofType( File.class ).defaultsTo(new File("/tmp/bioportal/"));
190+
parser.accepts( "basedir" ).withRequiredArg().ofType( File.class ).defaultsTo(new File(System.getProperty("java.io.tmpdir") + File.separator + "bioportal" + File.separator));
190191
OptionSpec<Void> downloadOption =
191192
parser.accepts( "download" );
192193
OptionSpec<Void> parseOption =

components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.clarkparsia.owlapi.explanation.PelletExplanation;
2222
import com.clarkparsia.owlapiv3.XSD;
2323
import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory;
24+
import com.google.common.base.StandardSystemProperty;
2425
import org.apache.log4j.Level;
2526
import org.apache.log4j.Logger;
2627
import org.dllearner.core.*;
@@ -1258,7 +1259,7 @@ public void setSynchronized() {
12581259
}
12591260

12601261
public static void main(String[] args) throws Exception{
1261-
OWLOntology o = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new File("/tmp/test2.rdf"));
1262+
OWLOntology o = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new File(System.getProperty("java.io.tmpdir") + File.separator + "test2.rdf"));
12621263
System.out.println(o.getClassesInSignature());
12631264
System.out.println(o.getDataPropertiesInSignature());
12641265
System.out.println(o.getIndividualsInSignature().size());

components-core/src/main/java/org/dllearner/reasoning/StructuralReasonerExtended.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.dllearner.reasoning;
2020

21+
import com.google.common.base.StandardSystemProperty;
2122
import org.dllearner.kb.OWLAPIOntology;
2223
import org.dllearner.kb.OWLOntologyKnowledgeSource;
2324
import org.joda.time.Period;
@@ -33,6 +34,7 @@
3334
import org.semanticweb.owlapi.util.Version;
3435

3536
import javax.annotation.Nonnull;
37+
import java.io.File;
3638
import java.util.*;
3739
import java.util.stream.Stream;
3840

@@ -1446,7 +1448,7 @@ public Collection<OWLDataProperty> getChildren(OWLDataProperty parent) {
14461448
public static void main(String[] args) throws Exception {
14471449
OWLOntologyManager man = OWLManager.createOWLOntologyManager();
14481450
OWLOntology schema = //man.loadOntology(IRI.create("http://downloads.dbpedia.org/2016-10/dbpedia_2016-10.nt"));
1449-
man.loadOntology(IRI.create("file:///tmp/merged.ttl"));
1451+
man.loadOntology(IRI.create("file://" + System.getProperty("java.io.tmpdir") + "/merged.ttl"));
14501452

14511453
OWLOntologyKnowledgeSource sampleKS = new OWLAPIOntology(schema);
14521454
sampleKS.init();

0 commit comments

Comments
 (0)