source: josm/trunk/scripts/TagInfoExtract.java@ 16325

Last change on this file since 16325 was 16325, checked in by simon04, 4 years ago

Checkstyle

File size: 26.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2
3import java.awt.Graphics2D;
4import java.awt.image.BufferedImage;
5import java.io.BufferedReader;
6import java.io.IOException;
7import java.io.OutputStream;
8import java.io.StringWriter;
9import java.io.UncheckedIOException;
10import java.io.Writer;
11import java.nio.file.Files;
12import java.nio.file.Path;
13import java.nio.file.Paths;
14import java.time.Instant;
15import java.time.ZoneId;
16import java.time.format.DateTimeFormatter;
17import java.util.ArrayList;
18import java.util.Arrays;
19import java.util.Collection;
20import java.util.Collections;
21import java.util.EnumSet;
22import java.util.LinkedHashMap;
23import java.util.List;
24import java.util.Locale;
25import java.util.Map;
26import java.util.Optional;
27import java.util.Set;
28import java.util.regex.Matcher;
29import java.util.regex.Pattern;
30import java.util.stream.Collectors;
31import java.util.stream.Stream;
32
33import javax.imageio.ImageIO;
34import javax.json.Json;
35import javax.json.JsonArrayBuilder;
36import javax.json.JsonObjectBuilder;
37import javax.json.JsonWriter;
38import javax.json.stream.JsonGenerator;
39
40import org.openstreetmap.josm.actions.DeleteAction;
41import org.openstreetmap.josm.command.DeleteCommand;
42import org.openstreetmap.josm.data.Preferences;
43import org.openstreetmap.josm.data.Version;
44import org.openstreetmap.josm.data.coor.LatLon;
45import org.openstreetmap.josm.data.osm.Node;
46import org.openstreetmap.josm.data.osm.OsmPrimitive;
47import org.openstreetmap.josm.data.osm.Tag;
48import org.openstreetmap.josm.data.osm.Way;
49import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
50import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
51import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
52import org.openstreetmap.josm.data.preferences.JosmUrls;
53import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
54import org.openstreetmap.josm.data.preferences.sources.SourceEntry;
55import org.openstreetmap.josm.data.projection.ProjectionRegistry;
56import org.openstreetmap.josm.data.projection.Projections;
57import org.openstreetmap.josm.gui.NavigatableComponent;
58import org.openstreetmap.josm.gui.mappaint.Cascade;
59import org.openstreetmap.josm.gui.mappaint.Environment;
60import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
61import org.openstreetmap.josm.gui.mappaint.MultiCascade;
62import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory;
63import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
64import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
65import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser;
66import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
67import org.openstreetmap.josm.gui.mappaint.styleelement.AreaElement;
68import org.openstreetmap.josm.gui.mappaint.styleelement.LineElement;
69import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
70import org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreference;
71import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
72import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
73import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetType;
74import org.openstreetmap.josm.gui.tagging.presets.items.CheckGroup;
75import org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem;
76import org.openstreetmap.josm.io.CachedFile;
77import org.openstreetmap.josm.io.OsmTransferException;
78import org.openstreetmap.josm.spi.preferences.Config;
79import org.openstreetmap.josm.tools.Http1Client;
80import org.openstreetmap.josm.tools.HttpClient;
81import org.openstreetmap.josm.tools.Logging;
82import org.openstreetmap.josm.tools.OptionParser;
83import org.openstreetmap.josm.tools.Territories;
84import org.openstreetmap.josm.tools.Utils;
85import org.xml.sax.SAXException;
86
87/**
88 * Extracts tag information for the taginfo project.
89 * <p>
90 * Run from the base directory of a JOSM checkout:
91 * <p>
92 * java -cp dist/josm-custom.jar TagInfoExtract --type mappaint
93 * java -cp dist/josm-custom.jar TagInfoExtract --type presets
94 * java -cp dist/josm-custom.jar TagInfoExtract --type external_presets
95 */
96public class TagInfoExtract {
97
98 /**
99 * Main method.
100 * @param args Main program arguments
101 * @throws Exception if any error occurs
102 */
103 public static void main(String[] args) throws Exception {
104 HttpClient.setFactory(Http1Client::new);
105 TagInfoExtract script = new TagInfoExtract();
106 script.parseCommandLineArguments(args);
107 script.init();
108 switch (script.options.mode) {
109 case MAPPAINT:
110 script.new StyleSheet().run();
111 break;
112 case PRESETS:
113 script.new Presets().run();
114 break;
115 case EXTERNAL_PRESETS:
116 script.new ExternalPresets().run();
117 break;
118 default:
119 throw new IllegalStateException("Invalid type " + script.options.mode);
120 }
121 if (!script.options.noexit) {
122 System.exit(0);
123 }
124 }
125
126 enum Mode {
127 MAPPAINT, PRESETS, EXTERNAL_PRESETS
128 }
129
130 private final Options options = new Options();
131
132 /**
133 * Parse command line arguments.
134 * @param args command line arguments
135 */
136 private void parseCommandLineArguments(String[] args) {
137 if (args.length == 1 && "--help".equals(args[0])) {
138 this.usage();
139 }
140 final OptionParser parser = new OptionParser(getClass().getName());
141 parser.addArgumentParameter("type", OptionParser.OptionCount.REQUIRED, options::setMode);
142 parser.addArgumentParameter("input", OptionParser.OptionCount.OPTIONAL, options::setInputFile);
143 parser.addArgumentParameter("output", OptionParser.OptionCount.OPTIONAL, options::setOutputFile);
144 parser.addArgumentParameter("imgdir", OptionParser.OptionCount.OPTIONAL, options::setImageDir);
145 parser.addArgumentParameter("imgurlprefix", OptionParser.OptionCount.OPTIONAL, options::setImageUrlPrefix);
146 parser.addFlagParameter("noexit", options::setNoExit);
147 parser.addFlagParameter("help", this::usage);
148 parser.parseOptionsOrExit(Arrays.asList(args));
149 }
150
151 private void usage() {
152 System.out.println("java " + getClass().getName());
153 System.out.println(" --type TYPE\tthe project type to be generated: " + Arrays.toString(Mode.values()));
154 System.out.println(" --input FILE\tthe input file to use (overrides defaults for types mappaint, presets)");
155 System.out.println(" --output FILE\tthe output file to use (defaults to STDOUT)");
156 System.out.println(" --imgdir DIRECTORY\tthe directory to put the generated images in (default: " + options.imageDir + ")");
157 System.out.println(" --imgurlprefix STRING\timage URLs prefix for generated image files (public path on webserver)");
158 System.out.println(" --noexit\tdo not call System.exit(), for use from Ant script");
159 System.out.println(" --help\tshow this help");
160 System.exit(0);
161 }
162
163 private static class Options {
164 Mode mode;
165 int josmSvnRevision = Version.getInstance().getVersion();
166 Path baseDir = Paths.get("");
167 Path imageDir = Paths.get("taginfo-img");
168 String imageUrlPrefix;
169 CachedFile inputFile;
170 Path outputFile;
171 boolean noexit;
172
173 void setMode(String value) {
174 mode = Mode.valueOf(value.toUpperCase(Locale.ENGLISH));
175 switch (mode) {
176 case MAPPAINT:
177 inputFile = new CachedFile("resource://styles/standard/elemstyles.mapcss");
178 break;
179 case PRESETS:
180 inputFile = new CachedFile("resource://data/defaultpresets.xml");
181 break;
182 default:
183 inputFile = null;
184 }
185 }
186
187 void setInputFile(String value) {
188 inputFile = new CachedFile(value);
189 }
190
191 void setOutputFile(String value) {
192 outputFile = Paths.get(value);
193 }
194
195 void setImageDir(String value) {
196 imageDir = Paths.get(value);
197 }
198
199 void setImageUrlPrefix(String value) {
200 imageUrlPrefix = value;
201 }
202
203 void setNoExit() {
204 noexit = true;
205 }
206
207 /**
208 * Determine full image url (can refer to JOSM or OSM repository).
209 * @param path the image path
210 * @return full image url
211 */
212 private String findImageUrl(String path) {
213 final Path f = baseDir.resolve("resources").resolve("images").resolve(path);
214 if (Files.exists(f)) {
215 return "https://josm.openstreetmap.de/export/" + josmSvnRevision + "/josm/trunk/resources/images/" + path;
216 }
217 throw new IllegalStateException("Cannot find image url for " + path);
218 }
219 }
220
221 private abstract class Extractor {
222 abstract void run() throws Exception;
223
224 void writeJson(String name, String description, Iterable<TagInfoTag> tags) throws IOException {
225 try (Writer writer = options.outputFile != null ? Files.newBufferedWriter(options.outputFile) : new StringWriter();
226 JsonWriter json = Json
227 .createWriterFactory(Collections.singletonMap(JsonGenerator.PRETTY_PRINTING, true))
228 .createWriter(writer)) {
229 JsonObjectBuilder project = Json.createObjectBuilder()
230 .add("name", name)
231 .add("description", description)
232 .add("project_url", JosmUrls.getInstance().getJOSMWebsite())
233 .add("icon_url", options.findImageUrl("logo_16x16x8.png"))
234 .add("contact_name", "JOSM developer team")
235 .add("contact_email", "josm-dev@openstreetmap.org");
236 final JsonArrayBuilder jsonTags = Json.createArrayBuilder();
237 for (TagInfoTag t : tags) {
238 jsonTags.add(t.toJson());
239 }
240 json.writeObject(Json.createObjectBuilder()
241 .add("data_format", 1)
242 .add("data_updated", DateTimeFormatter.ofPattern("yyyyMMdd'T'hhmmss'Z'").withZone(ZoneId.of("Z")).format(Instant.now()))
243 .add("project", project)
244 .add("tags", jsonTags)
245 .build());
246 if (options.outputFile == null) {
247 System.out.println(writer.toString());
248 }
249 }
250 }
251
252 }
253
254 private class Presets extends Extractor {
255
256 @Override
257 void run() throws IOException, OsmTransferException, SAXException {
258 try (BufferedReader reader = options.inputFile.getContentReader()) {
259 Collection<TaggingPreset> presets = TaggingPresetReader.readAll(reader, true);
260 List<TagInfoTag> tags = convertPresets(presets, "", true);
261 Logging.info("Converting {0} internal presets", tags.size());
262 writeJson("JOSM main presets", "Tags supported by the default presets in the OSM editor JOSM", tags);
263 }
264 }
265
266 List<TagInfoTag> convertPresets(Iterable<TaggingPreset> presets, String descriptionPrefix, boolean addImages) {
267 final List<TagInfoTag> tags = new ArrayList<>();
268 final Map<Tag, TagInfoTag> optionalTags = new LinkedHashMap<>();
269 for (TaggingPreset preset : presets) {
270 preset.data.stream()
271 .flatMap(item -> item instanceof KeyedItem
272 ? Stream.of(((KeyedItem) item))
273 : item instanceof CheckGroup
274 ? ((CheckGroup) item).checks.stream()
275 : Stream.empty())
276 .forEach(item -> {
277 for (String value : item.getValues()) {
278 Set<TagInfoTag.Type> types = TagInfoTag.Type.forPresetTypes(preset.types);
279 if (item.isKeyRequired()) {
280 tags.add(new TagInfoTag(descriptionPrefix + preset.getName(), item.key, value, types,
281 addImages && preset.iconName != null ? options.findImageUrl(preset.iconName) : null));
282 } else {
283 optionalTags.compute(new Tag(item.key, value), (osmTag, tagInfoTag) -> {
284 if (tagInfoTag == null) {
285 String description = descriptionPrefix + "Optional for: " + preset.getName();
286 return new TagInfoTag(description, item.key, value, types, null);
287 } else {
288 tagInfoTag.descriptions.add(preset.getName());
289 tagInfoTag.objectTypes.addAll(types);
290 return tagInfoTag;
291 }
292 });
293 }
294 }
295 });
296 }
297 tags.addAll(optionalTags.values());
298 return tags;
299 }
300
301 }
302
303 private class ExternalPresets extends Presets {
304
305 @Override
306 void run() throws IOException, OsmTransferException, SAXException {
307 TaggingPresetReader.setLoadIcons(false);
308 final Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor().loadAndGetAvailableSources();
309 final List<TagInfoTag> tags = new ArrayList<>();
310 for (SourceEntry source : sources) {
311 if (source.url.startsWith("resource")) {
312 // default presets
313 continue;
314 }
315 try {
316 Logging.info("Loading {0}", source.url);
317 Collection<TaggingPreset> presets = TaggingPresetReader.readAll(source.url, false);
318 final List<TagInfoTag> t = convertPresets(presets, source.title + " ", false);
319 Logging.info("Converting {0} presets of {1}", t.size(), source.title);
320 tags.addAll(t);
321 } catch (Exception ex) {
322 Logging.warn("Skipping {0} due to error", source.url);
323 Logging.warn(ex);
324 }
325
326 }
327 writeJson("JOSM user presets", "Tags supported by the user contributed presets in the OSM editor JOSM", tags);
328 }
329 }
330
331 private class StyleSheet extends Extractor {
332 private MapCSSStyleSource styleSource;
333
334 @Override
335 void run() throws IOException, ParseException {
336 init();
337 parseStyleSheet();
338 final List<TagInfoTag> tags = convertStyleSheet();
339 writeJson("JOSM main mappaint style", "Tags supported by the main mappaint style in the OSM editor JOSM", tags);
340 }
341
342 /**
343 * Read the style sheet file and parse the MapCSS code.
344 * @throws IOException if any I/O error occurs
345 * @throws ParseException in case of parsing error
346 */
347 private void parseStyleSheet() throws IOException, ParseException {
348 try (BufferedReader reader = options.inputFile.getContentReader()) {
349 MapCSSParser parser = new MapCSSParser(reader, MapCSSParser.LexicalState.DEFAULT);
350 styleSource = new MapCSSStyleSource("");
351 styleSource.url = "";
352 parser.sheet(styleSource);
353 }
354 }
355
356 /**
357 * Collect all the tag from the style sheet.
358 * @return list of taginfo tags
359 */
360 private List<TagInfoTag> convertStyleSheet() {
361 return styleSource.rules.stream()
362 .flatMap(rule -> rule.selectors.stream())
363 .flatMap(selector -> selector.getConditions().stream())
364 .filter(ConditionFactory.SimpleKeyValueCondition.class::isInstance)
365 .map(ConditionFactory.SimpleKeyValueCondition.class::cast)
366 .map(condition -> condition.asTag(null))
367 .distinct()
368 .map(tag -> {
369 String iconUrl = null;
370 final EnumSet<TagInfoTag.Type> types = EnumSet.noneOf(TagInfoTag.Type.class);
371 Optional<String> nodeUrl = new NodeChecker(tag).findUrl(true);
372 if (nodeUrl.isPresent()) {
373 iconUrl = nodeUrl.get();
374 types.add(TagInfoTag.Type.NODE);
375 }
376 Optional<String> wayUrl = new WayChecker(tag).findUrl(iconUrl == null);
377 if (wayUrl.isPresent()) {
378 if (iconUrl == null) {
379 iconUrl = wayUrl.get();
380 }
381 types.add(TagInfoTag.Type.WAY);
382 }
383 Optional<String> areaUrl = new AreaChecker(tag).findUrl(iconUrl == null);
384 if (areaUrl.isPresent()) {
385 if (iconUrl == null) {
386 iconUrl = areaUrl.get();
387 }
388 types.add(TagInfoTag.Type.AREA);
389 }
390 return new TagInfoTag(null, tag.getKey(), tag.getValue(), types, iconUrl);
391 })
392 .collect(Collectors.toList());
393 }
394
395 /**
396 * Check if a certain tag is supported by the style as node / way / area.
397 */
398 private abstract class Checker {
399 private final Pattern reservedChars = Pattern.compile("[<>:\"|\\?\\*]");
400
401 Checker(Tag tag) {
402 this.tag = tag;
403 }
404
405 Environment applyStylesheet(OsmPrimitive osm) {
406 osm.put(tag);
407 MultiCascade mc = new MultiCascade();
408
409 Environment env = new Environment(osm, mc, null, styleSource);
410 for (MapCSSRule r : styleSource.rules) {
411 env.clearSelectorMatchingInformation();
412 if (r.matches(env)) {
413 // ignore selector range
414 if (env.layer == null) {
415 env.layer = "default";
416 }
417 r.execute(env);
418 }
419 }
420 env.layer = "default";
421 return env;
422 }
423
424 /**
425 * Create image file from StyleElement.
426 * @param element style element
427 * @param type object type
428 * @param nc navigatable component
429 *
430 * @return the URL
431 */
432 String createImage(StyleElement element, final String type, NavigatableComponent nc) {
433 BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
434 Graphics2D g = img.createGraphics();
435 g.setClip(0, 0, 16, 16);
436 StyledMapRenderer renderer = new StyledMapRenderer(g, nc, false);
437 renderer.getSettings(false);
438 element.paintPrimitive(osm, MapPaintSettings.INSTANCE, renderer, false, false, false);
439 final String imageName = type + "_" + normalize(tag.toString()) + ".png";
440 try (OutputStream out = Files.newOutputStream(options.imageDir.resolve(imageName))) {
441 ImageIO.write(img, "png", out);
442 } catch (IOException e) {
443 throw new UncheckedIOException(e);
444 }
445 final String baseUrl = options.imageUrlPrefix != null ? options.imageUrlPrefix : options.imageDir.toString();
446 return baseUrl + "/" + imageName;
447 }
448
449 /**
450 * Normalizes tag so that it can used as a filename on all platforms, including Windows.
451 * @param tag OSM tag, that can contain illegal path characters
452 * @return OSM tag with all illegal path characters replaced by underscore ('_')
453 */
454 String normalize(String tag) {
455 Matcher m = reservedChars.matcher(tag);
456 return m.find() ? m.replaceAll("_") : tag;
457 }
458
459 /**
460 * Checks, if tag is supported and find URL for image icon in this case.
461 *
462 * @param generateImage if true, create or find a suitable image icon and return URL,
463 * if false, just check if tag is supported and return true or false
464 * @return URL for image icon if tag is supported
465 */
466 abstract Optional<String> findUrl(boolean generateImage);
467
468 protected Tag tag;
469 protected OsmPrimitive osm;
470 }
471
472 private class NodeChecker extends Checker {
473 NodeChecker(Tag tag) {
474 super(tag);
475 }
476
477 @Override
478 Optional<String> findUrl(boolean generateImage) {
479 this.osm = new Node(LatLon.ZERO);
480 Environment env = applyStylesheet(osm);
481 Cascade c = env.mc.getCascade("default");
482 Object image = c.get("icon-image");
483 if (image instanceof MapPaintStyles.IconReference && !((MapPaintStyles.IconReference) image).isDeprecatedIcon()) {
484 return Optional.of(options.findImageUrl(((MapPaintStyles.IconReference) image).iconName));
485 }
486 return Optional.empty();
487 }
488
489 }
490
491 private class WayChecker extends Checker {
492 WayChecker(Tag tag) {
493 super(tag);
494 }
495
496 @Override
497 Optional<String> findUrl(boolean generateImage) {
498 this.osm = new Way();
499 NavigatableComponent nc = new NavigatableComponent();
500 Node n1 = new Node(nc.getLatLon(2, 8));
501 Node n2 = new Node(nc.getLatLon(14, 8));
502 ((Way) osm).addNode(n1);
503 ((Way) osm).addNode(n2);
504 Environment env = applyStylesheet(osm);
505 LineElement les = LineElement.createLine(env);
506 if (les != null) {
507 if (!generateImage) return Optional.of("");
508 return Optional.of(createImage(les, "way", nc));
509 }
510 return Optional.empty();
511 }
512
513 }
514
515 private class AreaChecker extends Checker {
516 AreaChecker(Tag tag) {
517 super(tag);
518 }
519
520 @Override
521 Optional<String> findUrl(boolean generateImage) {
522 this.osm = new Way();
523 NavigatableComponent nc = new NavigatableComponent();
524 Node n1 = new Node(nc.getLatLon(2, 2));
525 Node n2 = new Node(nc.getLatLon(14, 2));
526 Node n3 = new Node(nc.getLatLon(14, 14));
527 Node n4 = new Node(nc.getLatLon(2, 14));
528 ((Way) osm).addNode(n1);
529 ((Way) osm).addNode(n2);
530 ((Way) osm).addNode(n3);
531 ((Way) osm).addNode(n4);
532 ((Way) osm).addNode(n1);
533 Environment env = applyStylesheet(osm);
534 AreaElement aes = AreaElement.create(env);
535 if (aes != null) {
536 if (!generateImage) return Optional.of("");
537 return Optional.of(createImage(aes, "area", nc));
538 }
539 return Optional.empty();
540 }
541 }
542 }
543
544 /**
545 * POJO representing a <a href="https://wiki.openstreetmap.org/wiki/Taginfo/Projects">Taginfo tag</a>.
546 */
547 private static class TagInfoTag {
548 final Collection<String> descriptions = new ArrayList<>();
549 final String key;
550 final String value;
551 final Set<Type> objectTypes;
552 final String iconURL;
553
554 TagInfoTag(String description, String key, String value, Set<Type> objectTypes, String iconURL) {
555 if (description != null) {
556 this.descriptions.add(description);
557 }
558 this.key = key;
559 this.value = value;
560 this.objectTypes = objectTypes;
561 this.iconURL = iconURL;
562 }
563
564 JsonObjectBuilder toJson() {
565 final JsonObjectBuilder object = Json.createObjectBuilder();
566 if (!descriptions.isEmpty()) {
567 object.add("description", String.join(", ", Utils.limit(descriptions, 8, "...")));
568 }
569 object.add("key", key);
570 object.add("value", value);
571 if ((!objectTypes.isEmpty())) {
572 final JsonArrayBuilder types = Json.createArrayBuilder();
573 objectTypes.stream().map(Enum::name).map(String::toLowerCase).forEach(types::add);
574 object.add("object_types", types);
575 }
576 if (iconURL != null) {
577 object.add("icon_url", iconURL);
578 }
579 return object;
580 }
581
582 enum Type {
583 NODE, WAY, AREA, RELATION;
584
585 static TagInfoTag.Type forPresetType(TaggingPresetType type) {
586 switch (type) {
587 case CLOSEDWAY:
588 return AREA;
589 case MULTIPOLYGON:
590 return RELATION;
591 default:
592 return valueOf(type.toString());
593 }
594 }
595
596 static Set<TagInfoTag.Type> forPresetTypes(Set<TaggingPresetType> types) {
597 if (types == null) {
598 return Collections.emptySet();
599 }
600 return types.stream()
601 .map(Type::forPresetType)
602 .collect(Collectors.toCollection(() -> EnumSet.noneOf(Type.class)));
603 }
604 }
605 }
606
607 /**
608 * Initialize the script.
609 * @throws IOException if any I/O error occurs
610 */
611 private void init() throws IOException {
612 Logging.setLogLevel(Logging.LEVEL_INFO);
613 Preferences.main().enableSaveOnPut(false);
614 Config.setPreferencesInstance(Preferences.main());
615 Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance());
616 Config.setUrlsProvider(JosmUrls.getInstance());
617 ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857"));
618 Path tmpdir = Files.createTempDirectory(options.baseDir, "pref");
619 tmpdir.toFile().deleteOnExit();
620 System.setProperty("josm.home", tmpdir.toString());
621 DeleteCommand.setDeletionCallback(DeleteAction.defaultDeletionCallback);
622 Territories.initializeInternalData();
623 Files.createDirectories(options.imageDir);
624 }
625}
Note: See TracBrowser for help on using the repository browser.