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