001    // License: GPL. For details, see LICENSE file.
002    package org.openstreetmap.josm.gui;
003    
004    import org.openstreetmap.josm.data.osm.INode;
005    import org.openstreetmap.josm.data.osm.IRelation;
006    import org.openstreetmap.josm.data.osm.IWay;
007    
008    public 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        public 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        public 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        public String checkFormat(IWay node, 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        public String checkFormat(IRelation node, String defaultName);
041    }