Permalink
Please sign in to comment.
Showing
with
400 additions
and 111 deletions.
- 0 build-deb-and-install.sh
- +5 −0 linkedgeodata-cli/pom.xml
- +5 −0 linkedgeodata-cli/src/main/java/org/aksw/linkedgeodata/cli/command/main/CommandMain.java
- +5 −0 linkedgeodata-cli/src/main/java/org/aksw/linkedgeodata/cli/command/main/CommandOsm.java
- +47 −0 linkedgeodata-cli/src/main/java/org/aksw/linkedgeodata/cli/command/osm/CommandOsmDateToSeq.java
- +5 −0 linkedgeodata-cli/src/main/java/org/aksw/linkedgeodata/cli/main/MainLinkedGeoData.java
- +0 −7 linkedgeodata-cli/src/main/java/org/linkedgeodata/cli/MainLinkedGeoData.java
- +41 −0 linkedgeodata-cli/src/main/resources/log4j.properties
- +4 −0 linkedgeodata-core/pom.xml
- +37 −0 linkedgeodata-core/src/main/java/org/aksw/linkedgeodata/core/init/InitJenaLinkedGeoData.java
- +0 −18 linkedgeodata-core/src/main/java/org/aksw/linkedgeodata/osm/replication/dao/LgdPersonality.java
- +4 −5 linkedgeodata-core/src/main/java/org/aksw/linkedgeodata/osm/replication/dao/OsmRepoCoreDaoImpl.java
- +9 −0 linkedgeodata-core/src/main/java/org/aksw/linkedgeodata/osm/replication/dao/StateImpl.java
- +1 −0 ...edgeodata-core/src/main/resources/META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
- +152 −0 linkedgeodata-debian/dependency-reduced-pom.xml
- +17 −72 linkedgeodata-debian/pom.xml
- +4 −0 linkedgeodata-debian/src/deb/resources/usr/bin/lgd-osm-date-to-seq
- +64 −9 pom.xml
0
build-deb-and-install.sh
100644 → 100755
No changes.
| @@ -0,0 +1,5 @@ | ||
| +package org.aksw.linkedgeodata.cli.command.main; | ||
| + | ||
| +public class CommandMain { | ||
| + // Placeholder for entry point to general lgd related commands | ||
| +} |
| @@ -0,0 +1,5 @@ | ||
| +package org.aksw.linkedgeodata.cli.command.main; | ||
| + | ||
| +public class CommandOsm { | ||
| + // Placeholder for entry point to osm related commands | ||
| +} |
| @@ -0,0 +1,47 @@ | ||
| +package org.aksw.linkedgeodata.cli.command.osm; | ||
| + | ||
| +import java.time.Instant; | ||
| +import java.util.Properties; | ||
| + | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.OsmRepoDao; | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.OsmRepoDaoImpl; | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.State; | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.StateImpl; | ||
| + | ||
| +import com.beust.jcommander.JCommander; | ||
| +import com.beust.jcommander.Parameter; | ||
| + | ||
| +public class CommandOsmDateToSeq { | ||
| + | ||
| + @Parameter(names = {"-u", "-url"}, description = "OSM Repository base URL") | ||
| + public String osmReplicationRepoBaseUrl = null; | ||
| + | ||
| + @Parameter(names = {"-d", "-date"}, description = "Timestamp") | ||
| + public String timestamp = null; | ||
| + | ||
| + public static void main(String[] args) throws Exception { | ||
| + | ||
| + CommandOsmDateToSeq options = new CommandOsmDateToSeq(); | ||
| + JCommander jCommander = new JCommander(options); | ||
| + jCommander.parse(args); | ||
| + | ||
| + OsmRepoDao repoDao = OsmRepoDaoImpl.create(options.osmReplicationRepoBaseUrl); | ||
| + | ||
| + Instant instant = Instant.parse(options.timestamp); | ||
| + | ||
| + | ||
| + State state = repoDao.findState(instant); | ||
| + | ||
| + java.util.Properties properties = StateImpl.toProperties(new Properties(), state); | ||
| + properties.store(System.out, null); | ||
| + | ||
| + | ||
| +// if(commandLineArgs.isHelp()) | ||
| +// { | ||
| +// jCommander.usage(); | ||
| +// System.exit(0); | ||
| +// } | ||
| +// | ||
| +// | ||
| + } | ||
| +} |
| @@ -0,0 +1,5 @@ | ||
| +package org.aksw.linkedgeodata.cli.main; | ||
| + | ||
| +public class MainLinkedGeoData { | ||
| + // Placeholder for entry point to lgd related commands | ||
| +} |
| @@ -1,7 +0,0 @@ | ||
| -package org.linkedgeodata.cli; | ||
| - | ||
| -public class MainLinkedGeoData { | ||
| - public static void main() { | ||
| - | ||
| - } | ||
| -} |
| @@ -0,0 +1,41 @@ | ||
| +# Appenders are output targets | ||
| +############################################################################### | ||
| +# console logging | ||
| +############################################################################### | ||
| +log4j.appender.stderr=org.apache.log4j.ConsoleAppender | ||
| +log4j.appender.stderr.Target=System.err | ||
| +log4j.appender.stderr.layout=org.apache.log4j.EnhancedPatternLayout | ||
| +log4j.appender.stderr.layout.ConversionPattern=%d [%t] %-5p %c{1.}: %m%n | ||
| +#log4j.appender.stderr.layout=org.apache.log4j.PatternLayout | ||
| +#log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c: %m%n | ||
| +#log4j.appender.stderr.layout.ConversionPattern=%d %-5p %c: %m%n | ||
| + | ||
| + | ||
| +############################################################################### | ||
| +# file logging | ||
| +############################################################################### | ||
| +log4j.appender.file=org.apache.log4j.FileAppender | ||
| +log4j.appender.file.File=lsq.log | ||
| +log4j.appender.file.layout=org.apache.log4j.EnhancedPatternLayout | ||
| +log4j.appender.file.layout.ConversionPattern=%d [%t] %-5p %c{1.}: %m%n | ||
| + | ||
| +#log4j.appender.file.layout=org.apache.log4j.PatternLayout | ||
| +#log4j.appender.file.layout.ConversionPattern=%d [%t] %-5p %c: %m%n | ||
| +#log4j.appender.file.layout.ConversionPattern=%d %-5p %c: %m%n | ||
| + | ||
| + | ||
| +############################################################################### | ||
| +# Log levels | ||
| +############################################################################### | ||
| +### | ||
| +# syntax: log4j.logger.<your-class>=log-level, [appenders] | ||
| +# appenders are the output-targets defined above | ||
| +# loglevels: trace, debug, info, warn, error, fatal | ||
| +# | ||
| +log4j.rootLogger=debug, stderr | ||
| + | ||
| +#log4j.logger.org.aksw.jena_sparql_api.compare.QueryExecutionCompare = on | ||
| +#log4j.logger.Jena = off | ||
| +# | ||
| +#log4j.logger.org.apache.http = off | ||
| +#log4j.logger.org.apache.jena = off |
| @@ -0,0 +1,37 @@ | ||
| +package org.aksw.linkedgeodata.core.init; | ||
| + | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.State; | ||
| +import org.aksw.linkedgeodata.osm.replication.dao.StateImpl; | ||
| +import org.apache.jena.enhanced.BuiltinPersonalities; | ||
| +import org.apache.jena.rdf.model.Resource; | ||
| +import org.apache.jena.rdf.model.ResourceFactory; | ||
| +import org.apache.jena.system.JenaSubsystemLifecycle; | ||
| +import org.slf4j.Logger; | ||
| +import org.slf4j.LoggerFactory; | ||
| +import org.topbraid.spin.util.SimpleImplementation; | ||
| + | ||
| +public class InitJenaLinkedGeoData | ||
| + implements JenaSubsystemLifecycle | ||
| +{ | ||
| + private static final Logger logger = LoggerFactory.getLogger(InitJenaLinkedGeoData.class); | ||
| + | ||
| + public void start() { | ||
| + logger.debug("LinkedGeoData Jena initialization"); | ||
| + init(); | ||
| + } | ||
| + | ||
| + @Override | ||
| + public void stop() { | ||
| + } | ||
| + | ||
| + | ||
| + public static final Resource State = ResourceFactory.createResource("http://example.org/osm/State"); | ||
| + | ||
| + public static void init() { | ||
| + | ||
| + BuiltinPersonalities.model | ||
| + .add(State.class, new SimpleImplementation(State.asNode(), StateImpl.class)); | ||
| + } | ||
| + | ||
| + | ||
| +} |
| @@ -1,18 +0,0 @@ | ||
| -package org.aksw.linkedgeodata.osm.replication.dao; | ||
| - | ||
| -import org.apache.jena.enhanced.BuiltinPersonalities; | ||
| -import org.apache.jena.rdf.model.Resource; | ||
| -import org.apache.jena.rdf.model.ResourceFactory; | ||
| -import org.topbraid.spin.util.SimpleImplementation; | ||
| - | ||
| -public class LgdPersonality { | ||
| - public static final Resource State = ResourceFactory.createResource("http://example.org/osm/State"); | ||
| - | ||
| - public static void init() { | ||
| - | ||
| - BuiltinPersonalities.model | ||
| - .add(State.class, new SimpleImplementation(State.asNode(), StateImpl.class)); | ||
| - } | ||
| - | ||
| - | ||
| -} |
| @@ -0,0 +1 @@ | ||
| +org.aksw.linkedgeodata.core.init.InitJenaLinkedGeoData |
Oops, something went wrong.
0 comments on commit
2c07ebc