com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class AddJoin
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.AddJoin
- All Implemented Interfaces:
- GPTool
- public class AddJoin
- extends AbstractGPTool
The Add Join tool is contained in the Data Management Tools tool box.
Software restrictions: none
Illustration:
Usage tips:
- The input must be a feature layer; or a table view; ; it cannot be a feature class; or table;
- This tool is not limited ArcMap; it works on layers and table views in ArcCatalog and in scripts. The Make Feature Layer; tool makes a layer for a feature class, and the Make Table View; creates a table view from an input table or feature class.
- Learn more about working with layers and table views;
- The join table can be any of the following types of tables: a geodatabase table (ArcSDE, file or personal), a dBASE file, an INFO table, or an OLE DB table.
- Indexing the fields in the input layer or table view and join table on which the join will be based can improve performance. This can be done with the Add Attribute Index; tool or by right-clicking the input in ArcCatalog and using the dialog box to add an index to the desired field.
- In the resulting layer or table view, the fields from the input layer or table view will be prefixed with the input's name and a period ".", and all fields from the join table will be prefixed with the join table name plus a period. For example, joining "landuse", which has fields "A" and "B" to "lookup_tab", which has fields "C" and "D" will result in a layer or table view with the following fields: "landuse.A", "landuse.B", "lookup_tab.C", and "lookup_tab.D".
- The exceptions to the information above are coverage feature classes and INFO tables; the separator for these is a colon ":" instead of a period. For example, joining the layer "cov1_polygon", which has the Fields "COV#" and "COV-ID", to the Info table "info2.dat", which has fields "ID" and "DESC", will result in a layer with the following fields: "cov1_polygon:COV#", "cov1_polygon:COV-ID", "info2.dat:ID", and "info2.dat:DESC".
- Records from the join table can be matched to more than one record in the input layer or table view.
- If values in the join field are not unique, only the first occurrence of each value will be used.
- The join lasts only for the duration of the session. To persist the join for use in another session, save the layer to a layer file using the Save Layer To File; tool. This only applies to layers; table views cannot be saved in this manner.
- Another way to make the join permanent is to save the layer to a feature class or the input table view to a table.
- No environment settings affect this tool.
|
Constructor Summary |
AddJoin()
Creates the Add Join tool with defaults. |
AddJoin(java.lang.Object inLayerOrView,
java.lang.Object inField,
java.lang.Object joinTable,
java.lang.Object joinField)
Creates the Add Join tool with the required parameters. |
|
Method Summary |
java.lang.Object |
getInField()
Returns the Input Join Field parameter of this tool . |
java.lang.Object |
getInLayerOrView()
Returns the Layer Name or Table View parameter of this tool . |
java.lang.Object |
getJoinField()
Returns the Output Join Field parameter of this tool . |
java.lang.Object |
getJoinTable()
Returns the Join Table parameter of this tool . |
java.lang.String |
getJoinType()
Returns the Keep All parameter of this tool . |
java.lang.Object |
getOutLayerOrView()
Returns the Output Layer Name parameter of this tool (Read only). |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setInField(java.lang.Object inField)
Sets the Input Join Field parameter of this tool . |
void |
setInLayerOrView(java.lang.Object inLayerOrView)
Sets the Layer Name or Table View parameter of this tool . |
void |
setJoinField(java.lang.Object joinField)
Sets the Output Join Field parameter of this tool . |
void |
setJoinTable(java.lang.Object joinTable)
Sets the Join Table parameter of this tool . |
void |
setJoinType(java.lang.String joinType)
Sets the Keep All parameter of this tool . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AddJoin
public AddJoin()
- Creates the Add Join tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
AddJoin
public AddJoin(java.lang.Object inLayerOrView,
java.lang.Object inField,
java.lang.Object joinTable,
java.lang.Object joinField)
- Creates the Add Join tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inLayerOrView - Table View | Raster Layer, the layer or table view to which the join table will be joined.inField - Field, the field in the input layer or table view on which the join will be based.joinTable - Table View | Raster Layer, the table or table view to be joined to the input layer or table view.joinField - Field, the field in the join table that contains the values on which the join will be based.
getInLayerOrView
public java.lang.Object getInLayerOrView()
- Returns the Layer Name or Table View parameter of this tool .
This parameter is Table View | Raster Layer, the layer or table view to which the join table will be joined.
This is a required parameter.
- Returns:
- the Layer Name or Table View
setInLayerOrView
public void setInLayerOrView(java.lang.Object inLayerOrView)
- Sets the Layer Name or Table View parameter of this tool .
This parameter is Table View | Raster Layer, the layer or table view to which the join table will be joined.
This is a required parameter.
- Parameters:
inLayerOrView - Table View | Raster Layer, the layer or table view to which the join table will be joined.
getInField
public java.lang.Object getInField()
- Returns the Input Join Field parameter of this tool .
This parameter is Field, the field in the input layer or table view on which the join will be based.
This is a required parameter.
- Returns:
- the Input Join Field
setInField
public void setInField(java.lang.Object inField)
- Sets the Input Join Field parameter of this tool .
This parameter is Field, the field in the input layer or table view on which the join will be based.
This is a required parameter.
- Parameters:
inField - Field, the field in the input layer or table view on which the join will be based.
getJoinTable
public java.lang.Object getJoinTable()
- Returns the Join Table parameter of this tool .
This parameter is Table View | Raster Layer, the table or table view to be joined to the input layer or table view.
This is a required parameter.
- Returns:
- the Join Table
setJoinTable
public void setJoinTable(java.lang.Object joinTable)
- Sets the Join Table parameter of this tool .
This parameter is Table View | Raster Layer, the table or table view to be joined to the input layer or table view.
This is a required parameter.
- Parameters:
joinTable - Table View | Raster Layer, the table or table view to be joined to the input layer or table view.
getJoinField
public java.lang.Object getJoinField()
- Returns the Output Join Field parameter of this tool .
This parameter is Field, the field in the join table that contains the values on which the join will be based.
This is a required parameter.
- Returns:
- the Output Join Field
setJoinField
public void setJoinField(java.lang.Object joinField)
- Sets the Output Join Field parameter of this tool .
This parameter is Field, the field in the join table that contains the values on which the join will be based.
This is a required parameter.
- Parameters:
joinField - Field, the field in the join table that contains the values on which the join will be based.
getJoinType
public java.lang.String getJoinType()
- Returns the Keep All parameter of this tool .
This parameter is String, specifies what will be done with records in the input that match a record in the join table.
This is an optional parameter.
- Returns:
- the Keep All
setJoinType
public void setJoinType(java.lang.String joinType)
- Sets the Keep All parameter of this tool .
This parameter is String, specifies what will be done with records in the input that match a record in the join table.
This is an optional parameter.
- Parameters:
joinType - String, specifies what will be done with records in the input that match a record in the join table.-
KEEP_ALL—All records in the input layer or table view will be included in the output; also known as an outer join. This is the default.
-
KEEP_COMMON—Only those records in the input that match to a row in the join table will be present in the result; also known as an inner join.
getOutLayerOrView
public java.lang.Object getOutLayerOrView()
- Returns the Output Layer Name parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the Output Layer Name
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias