diff --git a/examples/simple-action.xml b/examples/simple-action.xml new file mode 100644 index 0000000..fafc8f5 --- /dev/null +++ b/examples/simple-action.xml @@ -0,0 +1,21 @@ + + + + + en + de + es + fr + ja + + + short_name + website + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fb9ada4..b58bf19 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,23 @@ junit-jupiter-api 5.9.0 + + de.topobyte + osm4j-pbf + 0.1.0 + + + + topobyte + topobyte + https://mvn.topobyte.de + + + Slimjars + Slimjars + https://mvn.slimjars.com + + \ No newline at end of file diff --git a/src/main/java/org/leolo/map/osm/extract/ExtractElement.java b/src/main/java/org/leolo/map/osm/extract/ExtractElement.java index c69edd1..63e2ae0 100644 --- a/src/main/java/org/leolo/map/osm/extract/ExtractElement.java +++ b/src/main/java/org/leolo/map/osm/extract/ExtractElement.java @@ -64,7 +64,11 @@ public class ExtractElement { private Map relations = new Hashtable<>(); private Map ways = new Hashtable<>(); private Map nodes = new Hashtable<>(); - private Set strings = new HashSet<>(); + + private HashSet pendingRelations = new HashSet<>(); + private HashSet pendingWays = new HashSet<>(); + private HashSet pendingNodes = new HashSet<>(); + private CliOpt cliOpt = new CliOpt(); @@ -146,20 +150,29 @@ public class ExtractElement { System.exit(3); return; } - expandRelations(dbFile, af, af.getRelation()); - processWay(dbFile, af); - processNode(dbFile, af); + doSearch(dbFile, af); + expandRelations(dbFile); + processWay(dbFile); + processNode(dbFile); + } + + /** + * Perform search as defined in the action file, and add them to relevant pending items + * @param dbFile The database file going to be searched + * @param af The file which defines the action to be performed + */ + private void doSearch(File dbFile, ActionFile af) { } - private void processNode(File dbFile, ActionFile af) { + private void processNode(File dbFile) { } - private void processWay(File dbFile, ActionFile af) { + private void processWay(File dbFile) { } - private void expandRelations(File dbFile, ActionFile af, Collection relations) { + private void expandRelations(File dbFile) { }