diff --git a/exampleconfig.yml b/exampleconfig.yml index 1055cf2..97baa94 100644 --- a/exampleconfig.yml +++ b/exampleconfig.yml @@ -25,6 +25,4 @@ maxGenerateConcepts: 100 maxConceptLength: 8 maxDepth: 1 removeLiterals: true -namespace: http://dbpedia.org/ontology/ -concepts: - - positive: Album and (artist some Agent) \ No newline at end of file +namespace: http://dbpedia.org/ontology/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index 88b5014..ef73fd4 100644 --- a/pom.xml +++ b/pom.xml @@ -26,8 +26,8 @@ - 1.8 - 1.8 + 11 + 11 2.13.3 @@ -101,7 +101,6 @@ net.sourceforge.owlapi org.semanticweb.hermit 1.4.5.519 - test @@ -144,7 +143,6 @@ net.sourceforge.owlapi org.semanticweb.hermit 1.4.5.519 - compile @@ -161,4 +159,69 @@ http://maven.aksw.org/archiva/repository/snapshots + + + + + + maven-dependency-plugin + + + install + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + + shade + + + true + + + org.dice_group.lpbenchgen.Main + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + UTF-8 + + -parameters + + + + + \ No newline at end of file diff --git a/src/main/java/org/dice_group/LPBenchGen/Main.java b/src/main/java/org/dice_group/lpbenchgen/Main.java similarity index 83% rename from src/main/java/org/dice_group/LPBenchGen/Main.java rename to src/main/java/org/dice_group/lpbenchgen/Main.java index 5269c27..cc399fe 100644 --- a/src/main/java/org/dice_group/LPBenchGen/Main.java +++ b/src/main/java/org/dice_group/lpbenchgen/Main.java @@ -1,8 +1,8 @@ -package org.dice_group.LPBenchGen; +package org.dice_group.lpbenchgen; -import com.fasterxml.jackson.core.JsonProcessingException; -import org.dice_group.LPBenchGen.lp.LPGenerator; +import org.apache.jena.query.ARQ; +import org.dice_group.lpbenchgen.lp.LPGenerator; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import java.io.IOException; @@ -26,6 +26,8 @@ public static void main(String[] args) throws OWLOntologyCreationException, IOEx printHelp(); } else { + //somehow we need to do this manually otherwise the jar will not do it for weird reasons I do not understand. + ARQ.init(); String name=""; String config=""; if(args[0].equals("--name")){ @@ -54,7 +56,7 @@ public static void main(String[] args) throws OWLOntologyCreationException, IOEx * Print help. */ public static void printHelp(){ - String help =" obscene --config --name \n" + + String help =" lpbenchgen --config --name \n" + "\n\twill create learning problems and an ontology " + "\n\tbased upon a SPARQL endpoint and a base ontology" + "\n\tfor each concept in a learning problem will be created" + @@ -62,6 +64,7 @@ public static void printHelp(){ "\n\tfurther on a certain amount of random Individuals will be added as well which will be retrieved using the types" + "\n\tstated in " + "\n\n\tOutput at -lp.json and -ontology.owl"; + System.out.println(help); } } \ No newline at end of file diff --git a/src/main/java/org/dice_group/LPBenchGen/cleaner/OntologyInconsistentFinder.java b/src/main/java/org/dice_group/lpbenchgen/cleaner/OntologyInconsistentFinder.java similarity index 99% rename from src/main/java/org/dice_group/LPBenchGen/cleaner/OntologyInconsistentFinder.java rename to src/main/java/org/dice_group/lpbenchgen/cleaner/OntologyInconsistentFinder.java index e30b79d..66cc927 100644 --- a/src/main/java/org/dice_group/LPBenchGen/cleaner/OntologyInconsistentFinder.java +++ b/src/main/java/org/dice_group/lpbenchgen/cleaner/OntologyInconsistentFinder.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.cleaner; +package org.dice_group.lpbenchgen.cleaner; import com.google.common.collect.Sets; import org.apache.jena.query.*; @@ -15,7 +15,6 @@ import java.io.FileOutputStream; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; /** * The type Ontology inconsistent finder. diff --git a/src/main/java/org/dice_group/LPBenchGen/cleaner/TreeNode.java b/src/main/java/org/dice_group/lpbenchgen/cleaner/TreeNode.java similarity index 77% rename from src/main/java/org/dice_group/LPBenchGen/cleaner/TreeNode.java rename to src/main/java/org/dice_group/lpbenchgen/cleaner/TreeNode.java index acf3f47..a1f7f42 100644 --- a/src/main/java/org/dice_group/LPBenchGen/cleaner/TreeNode.java +++ b/src/main/java/org/dice_group/lpbenchgen/cleaner/TreeNode.java @@ -1,6 +1,4 @@ -package org.dice_group.LPBenchGen.cleaner; - -import org.semanticweb.owlapi.model.OWLClass; +package org.dice_group.lpbenchgen.cleaner; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/dice_group/LPBenchGen/config/Configuration.java b/src/main/java/org/dice_group/lpbenchgen/config/Configuration.java similarity index 99% rename from src/main/java/org/dice_group/LPBenchGen/config/Configuration.java rename to src/main/java/org/dice_group/lpbenchgen/config/Configuration.java index dd02f4a..3575167 100644 --- a/src/main/java/org/dice_group/LPBenchGen/config/Configuration.java +++ b/src/main/java/org/dice_group/lpbenchgen/config/Configuration.java @@ -1,7 +1,6 @@ -package org.dice_group.LPBenchGen.config; +package org.dice_group.lpbenchgen.config; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; diff --git a/src/main/java/org/dice_group/LPBenchGen/config/PosNegExample.java b/src/main/java/org/dice_group/lpbenchgen/config/PosNegExample.java similarity index 96% rename from src/main/java/org/dice_group/LPBenchGen/config/PosNegExample.java rename to src/main/java/org/dice_group/lpbenchgen/config/PosNegExample.java index fc16510..76ba92c 100644 --- a/src/main/java/org/dice_group/LPBenchGen/config/PosNegExample.java +++ b/src/main/java/org/dice_group/lpbenchgen/config/PosNegExample.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.config; +package org.dice_group.lpbenchgen.config; import com.fasterxml.jackson.annotation.JsonProperty; import org.semanticweb.owlapi.model.OWLClassExpression; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/ABoxFiller.java b/src/main/java/org/dice_group/lpbenchgen/dl/ABoxFiller.java similarity index 92% rename from src/main/java/org/dice_group/LPBenchGen/dl/ABoxFiller.java rename to src/main/java/org/dice_group/lpbenchgen/dl/ABoxFiller.java index 13a87a2..dc71d99 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/ABoxFiller.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/ABoxFiller.java @@ -1,16 +1,14 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; -import com.google.common.collect.Lists; import org.apache.jena.query.Query; import org.apache.jena.query.QueryFactory; import org.apache.jena.query.ResultSet; -import org.apache.jena.sparql.algebra.optimize.VariableUsageVisitor; import org.apache.jena.sparql.core.Var; import org.apache.jena.sparql.syntax.ElementWalker; -import org.dice_group.LPBenchGen.sparql.IndividualRetriever; -import org.dice_group.LPBenchGen.sparql.QueryTripleMappingVisitor; -import org.dice_group.LPBenchGen.sparql.VariableCollector; -import org.dice_group.LPBenchGen.sparql.visitors.QueryRemoveUselessTriplesVisitor; +import org.dice_group.lpbenchgen.sparql.IndividualRetriever; +import org.dice_group.lpbenchgen.sparql.QueryTripleMappingVisitor; +import org.dice_group.lpbenchgen.sparql.VariableCollector; +import org.dice_group.lpbenchgen.sparql.visitors.QueryRemoveUselessTriplesVisitor; import org.semanticweb.owlapi.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/ConceptLengthCalculator.java b/src/main/java/org/dice_group/lpbenchgen/dl/ConceptLengthCalculator.java similarity index 96% rename from src/main/java/org/dice_group/LPBenchGen/dl/ConceptLengthCalculator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/ConceptLengthCalculator.java index d1b05ef..4732545 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/ConceptLengthCalculator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/ConceptLengthCalculator.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxObjectRenderer; import org.semanticweb.owlapi.model.*; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWL2SPARQL.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWL2SPARQL.java similarity index 99% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWL2SPARQL.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWL2SPARQL.java index 914c99c..8bffc70 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWL2SPARQL.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWL2SPARQL.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; @@ -14,7 +14,6 @@ import org.apache.jena.query.Syntax; import org.apache.jena.sparql.algebra.Algebra; import org.apache.jena.sparql.algebra.Op; -import org.eclipse.rdf4j.model.vocabulary.XSD; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxObjectRenderer; import org.semanticweb.owlapi.io.ToStringRenderer; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLAxiomVisitorBase.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLAxiomVisitorBase.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLAxiomVisitorBase.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLAxiomVisitorBase.java index 66ddcc7..c9ae6c0 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLAxiomVisitorBase.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLAxiomVisitorBase.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import org.semanticweb.owlapi.model.*; import uk.ac.manchester.cs.owl.owlapi.OWLObjectSomeValuesFromImpl; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLNegationCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLNegationCreator.java similarity index 98% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLNegationCreator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLNegationCreator.java index ec803c5..e3b290b 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLNegationCreator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLNegationCreator.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.Lists; @@ -6,7 +6,6 @@ import uk.ac.manchester.cs.owl.owlapi.*; import java.util.ArrayList; -import java.util.HashSet; import java.util.Collection; import java.util.List; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLSPARQLPositiveCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLSPARQLPositiveCreator.java similarity index 76% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLSPARQLPositiveCreator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLSPARQLPositiveCreator.java index 967a3b1..e7770fe 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLSPARQLPositiveCreator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLSPARQLPositiveCreator.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; /** * The type Owlsparql positive creator. diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxConceptCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxConceptCreator.java similarity index 89% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxConceptCreator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxConceptCreator.java index 88a9206..61fe168 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxConceptCreator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxConceptCreator.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import java.util.Collection; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPatternPositiveCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPatternPositiveCreator.java similarity index 92% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPatternPositiveCreator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPatternPositiveCreator.java index 87e2826..9ffae71 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPatternPositiveCreator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPatternPositiveCreator.java @@ -1,13 +1,11 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; -import org.dice_group.LPBenchGen.dl.visitors.Pattern2ExprVisitor; +import org.dice_group.lpbenchgen.dl.visitors.Pattern2ExprVisitor; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLOntology; -import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; -import java.util.Random; /** * The type Owlt box pattern positive creator. diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPositiveCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPositiveCreator.java similarity index 96% rename from src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPositiveCreator.java rename to src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPositiveCreator.java index add8cd0..37f7c43 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/OWLTBoxPositiveCreator.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/OWLTBoxPositiveCreator.java @@ -1,9 +1,7 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.Lists; -import com.google.common.collect.Sets; -import org.dice_group.LPBenchGen.sparql.IndividualRetriever; -import org.semanticweb.HermiT.Configuration; +import org.dice_group.lpbenchgen.sparql.IndividualRetriever; import org.semanticweb.HermiT.Reasoner; import org.semanticweb.owlapi.model.*; import org.slf4j.Logger; @@ -12,7 +10,6 @@ import uk.ac.manchester.cs.owl.owlapi.OWLObjectComplementOfImpl; import uk.ac.manchester.cs.owl.owlapi.OWLObjectIntersectionOfImpl; import uk.ac.manchester.cs.owl.owlapi.OWLObjectSomeValuesFromImpl; -import org.semanticweb.owlapi.reasoner.Node; import java.util.*; @@ -86,16 +83,19 @@ public Collection createDistinctConcepts(int noOfConcepts){ toSmallCount++; continue; } - if(!retriever.retrieveIndividualsForConcept(concept, 1, 5).isEmpty()) { + try { + if (!retriever.retrieveIndividualsForConcept(concept, 1, 5).isEmpty()) { - ret.add(parser.render(concept)); - if(ret.size()>=noOfConcepts){ - break; + ret.add(parser.render(concept)); + if (ret.size() >= noOfConcepts) { + break; + } + } else { + noResults++; } - }else{ - noResults++; + }catch(Exception e){ + e.printStackTrace(); } - } List ret2= new ArrayList(ret); LOGGER.info("Final {} concepts. [{} to small, {} with no results/timeout]", ret2.size(), toSmallCount, noResults); diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/Parser.java b/src/main/java/org/dice_group/lpbenchgen/dl/Parser.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/dl/Parser.java rename to src/main/java/org/dice_group/lpbenchgen/dl/Parser.java index 6dcd5c5..6ef48be 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/Parser.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/Parser.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.Sets; import org.semanticweb.owlapi.apibinding.OWLManager; @@ -8,7 +8,6 @@ import org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxOWLObjectRendererImpl; import org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxPrefixNameShortFormProvider; import org.semanticweb.owlapi.model.*; -import org.semanticweb.owlapi.util.BidirectionalShortFormProvider; import org.semanticweb.owlapi.util.BidirectionalShortFormProviderAdapter; import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/visitors/ConceptSubClassesExchanger.java b/src/main/java/org/dice_group/lpbenchgen/dl/visitors/ConceptSubClassesExchanger.java similarity index 98% rename from src/main/java/org/dice_group/LPBenchGen/dl/visitors/ConceptSubClassesExchanger.java rename to src/main/java/org/dice_group/lpbenchgen/dl/visitors/ConceptSubClassesExchanger.java index 1244b23..426c439 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/visitors/ConceptSubClassesExchanger.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/visitors/ConceptSubClassesExchanger.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl.visitors; +package org.dice_group.lpbenchgen.dl.visitors; import org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxObjectRenderer; import org.semanticweb.owlapi.model.*; diff --git a/src/main/java/org/dice_group/LPBenchGen/dl/visitors/Pattern2ExprVisitor.java b/src/main/java/org/dice_group/lpbenchgen/dl/visitors/Pattern2ExprVisitor.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/dl/visitors/Pattern2ExprVisitor.java rename to src/main/java/org/dice_group/lpbenchgen/dl/visitors/Pattern2ExprVisitor.java index 33e8adb..aa0d6eb 100644 --- a/src/main/java/org/dice_group/LPBenchGen/dl/visitors/Pattern2ExprVisitor.java +++ b/src/main/java/org/dice_group/lpbenchgen/dl/visitors/Pattern2ExprVisitor.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl.visitors; +package org.dice_group.lpbenchgen.dl.visitors; import org.semanticweb.owlapi.model.*; diff --git a/src/main/java/org/dice_group/LPBenchGen/lp/LPGenerator.java b/src/main/java/org/dice_group/lpbenchgen/lp/LPGenerator.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/lp/LPGenerator.java rename to src/main/java/org/dice_group/lpbenchgen/lp/LPGenerator.java index fb250b2..99df8c9 100644 --- a/src/main/java/org/dice_group/LPBenchGen/lp/LPGenerator.java +++ b/src/main/java/org/dice_group/lpbenchgen/lp/LPGenerator.java @@ -1,14 +1,14 @@ -package org.dice_group.LPBenchGen.lp; +package org.dice_group.lpbenchgen.lp; import com.google.common.collect.Lists; -import org.dice_group.LPBenchGen.config.Configuration; -import org.dice_group.LPBenchGen.config.PosNegExample; -import org.dice_group.LPBenchGen.dl.ABoxFiller; -import org.dice_group.LPBenchGen.dl.OWLNegationCreator; -import org.dice_group.LPBenchGen.dl.OWLTBoxPositiveCreator; -import org.dice_group.LPBenchGen.dl.Parser; -import org.dice_group.LPBenchGen.dl.visitors.ConceptSubClassesExchanger; -import org.dice_group.LPBenchGen.sparql.IndividualRetriever; +import org.dice_group.lpbenchgen.config.Configuration; +import org.dice_group.lpbenchgen.config.PosNegExample; +import org.dice_group.lpbenchgen.dl.ABoxFiller; +import org.dice_group.lpbenchgen.dl.OWLNegationCreator; +import org.dice_group.lpbenchgen.dl.OWLTBoxPositiveCreator; +import org.dice_group.lpbenchgen.dl.Parser; +import org.dice_group.lpbenchgen.dl.visitors.ConceptSubClassesExchanger; +import org.dice_group.lpbenchgen.sparql.IndividualRetriever; import org.semanticweb.HermiT.Reasoner; import org.semanticweb.owlapi.formats.TurtleDocumentFormat; import org.semanticweb.owlapi.model.*; diff --git a/src/main/java/org/dice_group/LPBenchGen/lp/LPProblem.java b/src/main/java/org/dice_group/lpbenchgen/lp/LPProblem.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/lp/LPProblem.java rename to src/main/java/org/dice_group/lpbenchgen/lp/LPProblem.java index f230e25..e5ebbc4 100644 --- a/src/main/java/org/dice_group/LPBenchGen/lp/LPProblem.java +++ b/src/main/java/org/dice_group/lpbenchgen/lp/LPProblem.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.lp; +package org.dice_group.lpbenchgen.lp; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLDataProperty; diff --git a/src/main/java/org/dice_group/LPBenchGen/sparql/IndividualRetriever.java b/src/main/java/org/dice_group/lpbenchgen/sparql/IndividualRetriever.java similarity index 92% rename from src/main/java/org/dice_group/LPBenchGen/sparql/IndividualRetriever.java rename to src/main/java/org/dice_group/lpbenchgen/sparql/IndividualRetriever.java index 91e644c..5e84ad3 100644 --- a/src/main/java/org/dice_group/LPBenchGen/sparql/IndividualRetriever.java +++ b/src/main/java/org/dice_group/lpbenchgen/sparql/IndividualRetriever.java @@ -1,11 +1,8 @@ -package org.dice_group.LPBenchGen.sparql; +package org.dice_group.lpbenchgen.sparql; import com.google.common.base.Charsets; import com.google.common.io.ByteSource; -import org.aksw.owl2sparql.OWLClassExpressionToSPARQLConverter; import org.apache.http.HttpHeaders; -import org.apache.http.HttpRequest; -import org.apache.http.HttpRequestFactory; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.config.RequestConfig; @@ -14,27 +11,19 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.BasicHttpClientConnectionManager; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.jena.datatypes.RDFDatatype; import org.apache.jena.query.*; import org.apache.jena.rdf.model.Literal; import org.apache.jena.riot.Lang; -import org.apache.jena.riot.RDFDataMgr; import org.apache.jena.riot.ResultSetMgr; import org.apache.jena.riot.WebContent; import org.apache.jena.sparql.engine.http.QueryEngineHTTP; -import org.dice_group.LPBenchGen.dl.OWL2SPARQL; +import org.dice_group.lpbenchgen.dl.OWL2SPARQL; import org.semanticweb.owlapi.model.OWLClassExpression; -import org.semanticweb.owlapi.model.OWLDataFactory; -import org.semanticweb.owlapi.model.OWLDataProperty; import org.semanticweb.owlapi.model.OWLLiteral; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; -import uk.ac.manchester.cs.owl.owlapi.OWLLiteralImplString; -import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/org/dice_group/LPBenchGen/sparql/QueryTripleMappingVisitor.java b/src/main/java/org/dice_group/lpbenchgen/sparql/QueryTripleMappingVisitor.java similarity index 94% rename from src/main/java/org/dice_group/LPBenchGen/sparql/QueryTripleMappingVisitor.java rename to src/main/java/org/dice_group/lpbenchgen/sparql/QueryTripleMappingVisitor.java index 0885666..3ef4ebe 100644 --- a/src/main/java/org/dice_group/LPBenchGen/sparql/QueryTripleMappingVisitor.java +++ b/src/main/java/org/dice_group/lpbenchgen/sparql/QueryTripleMappingVisitor.java @@ -1,13 +1,8 @@ -package org.dice_group.LPBenchGen.sparql; +package org.dice_group.lpbenchgen.sparql; -import com.google.common.collect.Lists; -import org.apache.jena.graph.Triple; import org.apache.jena.query.QuerySolution; -import org.apache.jena.query.QueryVisitor; import org.apache.jena.query.ResultSet; -import org.apache.jena.rdf.model.RDFNode; import org.apache.jena.sparql.syntax.*; -import org.checkerframework.checker.units.qual.A; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/org/dice_group/LPBenchGen/sparql/VariableCollector.java b/src/main/java/org/dice_group/lpbenchgen/sparql/VariableCollector.java similarity index 97% rename from src/main/java/org/dice_group/LPBenchGen/sparql/VariableCollector.java rename to src/main/java/org/dice_group/lpbenchgen/sparql/VariableCollector.java index 3ecc67a..4bf8948 100644 --- a/src/main/java/org/dice_group/LPBenchGen/sparql/VariableCollector.java +++ b/src/main/java/org/dice_group/lpbenchgen/sparql/VariableCollector.java @@ -1,7 +1,6 @@ -package org.dice_group.LPBenchGen.sparql; +package org.dice_group.lpbenchgen.sparql; import org.apache.jena.query.Query; -import org.apache.jena.query.QueryVisitor; import org.apache.jena.sparql.core.Var; import org.apache.jena.sparql.syntax.*; diff --git a/src/main/java/org/dice_group/LPBenchGen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java b/src/main/java/org/dice_group/lpbenchgen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java similarity index 99% rename from src/main/java/org/dice_group/LPBenchGen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java rename to src/main/java/org/dice_group/lpbenchgen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java index 12d8981..eeb1cfb 100644 --- a/src/main/java/org/dice_group/LPBenchGen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java +++ b/src/main/java/org/dice_group/lpbenchgen/sparql/visitors/QueryRemoveUselessTriplesVisitor.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.sparql.visitors; +package org.dice_group.lpbenchgen.sparql.visitors; import org.apache.jena.sparql.core.TriplePath; import org.apache.jena.sparql.syntax.*; diff --git a/src/main/resources/log4j2.yml b/src/main/resources/log4j2.yml index c9e46f1..ffe7c6a 100644 --- a/src/main/resources/log4j2.yml +++ b/src/main/resources/log4j2.yml @@ -25,6 +25,18 @@ Configuration: Loggers: logger: + - name: uk.ac.manchester.cs.owl + level: error + additivity: true + AppenderRef: + - ref: STDOUT + - ref: File + - name: org.semanticweb.owlapi + level: error + additivity: true + AppenderRef: + - ref: STDOUT + - ref: File - name: org.apache.http.client.protocol level: error additivity: true diff --git a/src/test/java/org/dice_group/LPBenchGen/dl/OWLNegationCreatorTest.java b/src/test/java/org/dice_group/lpbenchgen/dl/OWLNegationCreatorTest.java similarity index 95% rename from src/test/java/org/dice_group/LPBenchGen/dl/OWLNegationCreatorTest.java rename to src/test/java/org/dice_group/lpbenchgen/dl/OWLNegationCreatorTest.java index 704ef30..c54184d 100644 --- a/src/test/java/org/dice_group/LPBenchGen/dl/OWLNegationCreatorTest.java +++ b/src/test/java/org/dice_group/lpbenchgen/dl/OWLNegationCreatorTest.java @@ -1,11 +1,10 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.Lists; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.semanticweb.owlapi.model.OWLClassExpression; -import org.semanticweb.owlapi.model.OWLObjectUnionOf; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import java.util.ArrayList; diff --git a/src/test/java/org/dice_group/LPBenchGen/dl/Sandbox.java b/src/test/java/org/dice_group/lpbenchgen/dl/Sandbox.java similarity index 95% rename from src/test/java/org/dice_group/LPBenchGen/dl/Sandbox.java rename to src/test/java/org/dice_group/lpbenchgen/dl/Sandbox.java index afe2822..be5ee08 100644 --- a/src/test/java/org/dice_group/LPBenchGen/dl/Sandbox.java +++ b/src/test/java/org/dice_group/lpbenchgen/dl/Sandbox.java @@ -1,4 +1,4 @@ -package org.dice_group.LPBenchGen.dl; +package org.dice_group.lpbenchgen.dl; import com.google.common.collect.Sets; @@ -15,14 +15,11 @@ import org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser; import org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxPrefixNameShortFormProvider; import org.semanticweb.owlapi.model.*; -import org.semanticweb.owlapi.reasoner.NodeSet; import org.semanticweb.owlapi.reasoner.OWLReasoner; import org.semanticweb.owlapi.util.BidirectionalShortFormProviderAdapter; import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; -import uk.ac.manchester.cs.owl.owlapi.OWLNamedIndividualImpl; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.util.HashSet; import java.util.Set;