uk.ac.starlink.table
Class JoinFixAction

java.lang.Object
  |
  +--uk.ac.starlink.table.JoinFixAction

public class JoinFixAction
extends Object

Class defining the possible actions for doctoring column names when joining tables. Joining tables can cause confusion if columns with the same names exist in some of them. An instance of this class defines how the join should behave in this case.

Since:
8 Sep 2005
See Also:
JoinStarTable

Field Summary
static JoinFixAction NO_ACTION
          Column names should be left alone.
 
Method Summary
 String getFixedName(String origName, boolean isDup)
          Returns the, possibly modified, name of a column.
static JoinFixAction makeRenameAllAction(String appendage)
          Returns an action indicating that all column names should be modified by appending a given string.
static JoinFixAction makeRenameDuplicatesAction(String appendage)
          Returns an action indicating that column names which would be duplicated elsewhere in the result table should be modified by appending a given string.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ACTION

public static final JoinFixAction NO_ACTION
Column names should be left alone.

Method Detail

makeRenameDuplicatesAction

public static JoinFixAction makeRenameDuplicatesAction(String appendage)
Returns an action indicating that column names which would be duplicated elsewhere in the result table should be modified by appending a given string.

Parameters:
appendage - string to append to duplicate columns

makeRenameAllAction

public static JoinFixAction makeRenameAllAction(String appendage)
Returns an action indicating that all column names should be modified by appending a given string.

Parameters:
appendage - string to append to columns

getFixedName

public String getFixedName(String origName,
                           boolean isDup)
Returns the, possibly modified, name of a column.

Parameters:
origName - unmodified column name
isDup - whether the column name would be duplicated in the set of unmodified names

toString

public String toString()
Overrides:
toString in class Object

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.