com.esri.aims.mtier.model.axl.map
Class LayersElementFactory

java.lang.Object
  |
  +--com.esri.aims.mtier.model.axl.map.LayersElementFactory

public class LayersElementFactory
extends Object

The LayersElementFactory class contains methods for writing all ArcXML elements that pertain to layers.


Constructor Summary
LayersElementFactory()
          Constructs an instance of a LayersElementFactory object.
 
Method Summary
 com.esri.w3c.dom.Element createCoordsysElement(String id, String string, String datumtransformid, String datumtransformstring)
          Created the ArcXML COORDSYS Element.
 com.esri.w3c.dom.Element createDatasetElement(String name, String type, String workspace, String fromlayer)
          Creates the ArcXML DATASET Element.
 com.esri.w3c.dom.Element createDensifyElement(String tolerance)
          Creates the ArcXML DENSIFY Element.
 com.esri.w3c.dom.Element createImagePropertiesElement(String transcolor, String transparency)
          Creates the ArcXML IMAGEPROPERTIES Element.
 com.esri.w3c.dom.Element createImageWorkspaceElement(String directory, String name)
          Creates the ArcXML IMAGEWORKSPACE Element.
 com.esri.w3c.dom.Element createLayerDefElement(String id, String name, String visible)
          Creates the ArcXML LAYERDEF Element.
 com.esri.w3c.dom.Element createLayerElement(String id, String type, String name, String maxscale, String minscale, String visible)
          Creates the ArcXML LAYER Element.
 com.esri.w3c.dom.Element createLayerListElement(String dynamicfirst, String nodefault, String order)
          Creates the ArcXML LAYERLIST Element.
 com.esri.w3c.dom.Element createLayersElement()
          Creates the ArcXML LAYERS element.
 com.esri.w3c.dom.Element createSDEWorkspaceElement(String instance, String name, String password, String server, String user, String database, String encrypted, String geoindexdir)
          Creates the SDEWORKSPACE Element.
 com.esri.w3c.dom.Element createShapeWorkspaceElement(String directory, String name, String codepage, String geoindexdir, String shared)
          Creates the ArcXML SHAPEWORKSPACE Element.
 com.esri.w3c.dom.Element createWorkspacesElement()
          Creates the ArcXML WORKSPACE Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayersElementFactory

public LayersElementFactory()
Constructs an instance of a LayersElementFactory object.

Method Detail

createDatasetElement

public com.esri.w3c.dom.Element createDatasetElement(String name,
                                                     String type,
                                                     String workspace,
                                                     String fromlayer)
Creates the ArcXML DATASET Element.

Parameters:
name - the dataset name.
type - the layer source type
workspace - references the workspace name where the data resides.
fromlayer - references an existing layer in a map configuration file. Use the layer ID, not name.
Returns:
Element.

createImageWorkspaceElement

public com.esri.w3c.dom.Element createImageWorkspaceElement(String directory,
                                                            String name)
Creates the ArcXML IMAGEWORKSPACE Element.

Parameters:
directory - Directory containing image files.
name - workspace name. Must be unique among all data sources.
Returns:
Element.

createLayerDefElement

public com.esri.w3c.dom.Element createLayerDefElement(String id,
                                                      String name,
                                                      String visible)
Creates the ArcXML LAYERDEF Element.

Parameters:
id - the reference to unique layer id as defined in a map configuration file or in a dynamic layer in the request.
name - the reference to layer name as defined in map configuration file or in a dynamic layer in the request.
visible - sets the layer visibility on or off.
Returns:
Element

createLayerElement

public com.esri.w3c.dom.Element createLayerElement(String id,
                                                   String type,
                                                   String name,
                                                   String maxscale,
                                                   String minscale,
                                                   String visible)
Creates the ArcXML LAYER Element.

Parameters:
id - the unique id for a layer.
type - the layer type. Use "featureclass" for shapefiles and ArcSDE vector layers. Use "image" for raster image files, GRIDs, and ArcSDE raster layers. Use "acetate" for adding graphics on top of the map.
name - the layer name. Can be an alias.
maxscale - the maximum scale to display layer using a relative scale.
minscale - the minimum scale to display layer using a relative scale.
visible - specifies the layer visibility.
Returns:
Element.

createLayerListElement

public com.esri.w3c.dom.Element createLayerListElement(String dynamicfirst,
                                                       String nodefault,
                                                       String order)
Creates the ArcXML LAYERLIST Element.

Parameters:
dynamicfirst - when set to true, draws all dynamic layers before any layers defined in the mapservice.
nodefault - when set to true, only mapservice and dynamic layers in the layerlist are displayed on the map.
order - when set to true, draws layers in the order listed in the LAYERDEF elements.
Returns:
Element

createLayersElement

public com.esri.w3c.dom.Element createLayersElement()
Creates the ArcXML LAYERS element.

Returns:
Element.

createSDEWorkspaceElement

public com.esri.w3c.dom.Element createSDEWorkspaceElement(String instance,
                                                          String name,
                                                          String password,
                                                          String server,
                                                          String user,
                                                          String database,
                                                          String encrypted,
                                                          String geoindexdir)
Creates the SDEWORKSPACE Element.

Parameters:
instance - port number of ArcSDE instance.
name - workspace name, must be unique among all data sources.
password - the password to access the ArcSDE server.
server - the ArcSDE server.
user - the username to access the ArcSDE server.
database - the ArcSDE database.
encrypted - when set to true, the password for the ArcSDE instance is encrypted.
geoindexdir - the directory where the geocoding index is built.
Returns:
Element.

createShapeWorkspaceElement

public com.esri.w3c.dom.Element createShapeWorkspaceElement(String directory,
                                                            String name,
                                                            String codepage,
                                                            String geoindexdir,
                                                            String shared)
Creates the ArcXML SHAPEWORKSPACE Element.

Parameters:
directory - the directory containing shapefiles.
name - the workspace name. Must be unique among all data sources.
codepage - sets ID of codepage used for all DBF tables from this workspace.
geoindexdir - the directory where geocoding index is built.
shared - when set to true, the ArcIMS Spatial Server checks if a shapefile has been modified outside of ArcIMS.
Returns:
Element

createWorkspacesElement

public com.esri.w3c.dom.Element createWorkspacesElement()
Creates the ArcXML WORKSPACE Element.

Returns:
Element

createCoordsysElement

public com.esri.w3c.dom.Element createCoordsysElement(String id,
                                                      String string,
                                                      String datumtransformid,
                                                      String datumtransformstring)
Created the ArcXML COORDSYS Element.

Parameters:
id - Projected or geographic coordinate system ID.
string - Projected or geographic coordinate system definition string.
datumtransformid - Datum transformation ID.
datumtransformstring - Datum transformation definition string.
Returns:
Element.

createDensifyElement

public com.esri.w3c.dom.Element createDensifyElement(String tolerance)
Creates the ArcXML DENSIFY Element.

Parameters:
tolerance - defines distance between points and is applied on geometry before projecting takes place.
Returns:
Element.

createImagePropertiesElement

public com.esri.w3c.dom.Element createImagePropertiesElement(String transcolor,
                                                             String transparency)
Creates the ArcXML IMAGEPROPERTIES Element.

Parameters:
transcolor - the transparency color using RGB values.
transparency - the value to set percentage of transparency to.
Returns:
Element.