001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.gui; 003 004import org.openstreetmap.josm.data.osm.INode; 005import org.openstreetmap.josm.data.osm.IRelation; 006import org.openstreetmap.josm.data.osm.IWay; 007 008public interface NameFormatterHook { 009 010 /** 011 * Check the relation type name. Return the corrected type name if needed, null otherwise. 012 * @param relation The relation. 013 * @param defaultName The default name generated by core. 014 * @return The corrected type name if needed, null otherwise. 015 */ 016 String checkRelationTypeName(IRelation relation, String defaultName); 017 018 /** 019 * Check the node format. Return the corrected format if needed, null otherwise. 020 * @param node The node. 021 * @param defaultName The default name generated by core. 022 * @return The corrected format if needed, null otherwise. 023 */ 024 String checkFormat(INode node, String defaultName); 025 026 /** 027 * Check the way format. Return the corrected format if needed, null otherwise. 028 * @param way The way. 029 * @param defaultName The default name generated by core. 030 * @return The corrected format if needed, null otherwise. 031 */ 032 String checkFormat(IWay way, String defaultName); 033 034 /** 035 * Check the relation format. Return the corrected format if needed, null otherwise. 036 * @param relation The relation. 037 * @param defaultName The default name generated by core. 038 * @return The corrected format if needed, null otherwise. 039 */ 040 String checkFormat(IRelation relation, String defaultName); 041}