1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.osm;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Hooks that allow correcting the name of a OSM primitive
|
---|
6 | * @see DefaultNameFormatter
|
---|
7 | * @since 12663 (moved from {@code gui} package)
|
---|
8 | */
|
---|
9 | public interface NameFormatterHook {
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Check the relation type name. Return the corrected type name if needed, null otherwise.
|
---|
13 | * @param relation The relation.
|
---|
14 | * @param defaultName The default name generated by core.
|
---|
15 | * @return The corrected type name if needed, null otherwise.
|
---|
16 | */
|
---|
17 | String checkRelationTypeName(IRelation relation, String defaultName);
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Check the node format. Return the corrected format if needed, null otherwise.
|
---|
21 | * @param node The node.
|
---|
22 | * @param defaultName The default name generated by core.
|
---|
23 | * @return The corrected format if needed, null otherwise.
|
---|
24 | */
|
---|
25 | String checkFormat(INode node, String defaultName);
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Check the way format. Return the corrected format if needed, null otherwise.
|
---|
29 | * @param way The way.
|
---|
30 | * @param defaultName The default name generated by core.
|
---|
31 | * @return The corrected format if needed, null otherwise.
|
---|
32 | */
|
---|
33 | String checkFormat(IWay way, String defaultName);
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Check the relation format. Return the corrected format if needed, null otherwise.
|
---|
37 | * @param relation The relation.
|
---|
38 | * @param defaultName The default name generated by core.
|
---|
39 | * @return The corrected format if needed, null otherwise.
|
---|
40 | */
|
---|
41 | String checkFormat(IRelation relation, String defaultName);
|
---|
42 | }
|
---|