|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.ags.data.edit.util.EditUtil
public class EditUtil
A helper class for ArcObject related functions.
| Field Summary | |
|---|---|
static java.lang.String |
NOT_VERSIONED
|
| Constructor Summary | |
|---|---|
EditUtil()
|
|
| Method Summary | |
|---|---|
static com.esri.arcgis.geometry.IGeometry |
addVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.IPoint point,
com.esri.arcgis.server.IServerContext ctx)
Adds a vertex the geometry if it is in the search distance. |
static com.esri.arcgis.geodatabase.IFeature |
copyFeature(com.esri.arcgis.carto.IFeatureLayer targetLayer,
com.esri.arcgis.geometry.ILine offset,
com.esri.arcgis.geodatabase.IFeature source)
Copies the feature to the target layer and move it with the given offset. |
static com.esri.arcgis.geodatabase.IFeature |
createFeature(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgis.geometry.IGeometry geom)
Creates a geometry to a feature layer. |
static java.util.Map<java.lang.Integer,Attribute> |
getAttributes(com.esri.arcgis.carto.IFeatureLayer fLayer,
com.esri.arcgis.geodatabase.IFeature feature,
AttributeFilter filter,
java.text.DateFormat dateFormat)
Gets all the editable attributes on the feature. |
static java.util.Map<java.lang.Integer,com.esri.arcgis.carto.IFeatureLayer> |
getFeatureLayers(com.esri.arcgis.carto.IMap map,
com.esri.arcgis.server.IServerContext ctx)
Gets all feature layers from the IMap. |
static com.esri.arcgis.geodatabase.IFeatureCursor |
getFeatures(com.esri.arcgis.carto.IFeatureLayer editLayer,
int[] oids,
com.esri.arcgis.server.IServerContext ctx)
Gets the features by the given object IDs. |
static com.esri.arcgis.geodatabase.IFeatureCursor |
getSelection(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgisws.LayerDescription ldesc,
com.esri.arcgis.geometry.IGeometry geometry,
com.esri.arcgis.server.IServerContext ctx)
Gets the selected feature on the given layer intersected with the given geometry |
static com.esri.arcgis.geodatabase.IFeatureCursor |
getSelection(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgisws.LayerDescription ldesc,
com.esri.arcgis.server.IServerContext ctx)
Gets the selected feature on the given layer. |
static com.esri.arcgis.geometry.ISpatialReference |
getSpatialReference(com.esri.arcgis.carto.IFeatureLayer flayer)
Gets spatial reference from a feature layer. |
static java.util.List<java.lang.String> |
getVersions(com.esri.arcgis.carto.IMap map,
java.lang.String wsID,
com.esri.arcgis.server.IServerContext ctx)
Retrieves versions from a map's feature layers. |
static java.lang.String |
getWorkspaceID(com.esri.arcgis.carto.IFeatureLayer layer)
Creates key that uniquely distinguishes workspace connection and feature-class registration. |
static com.esri.arcgis.geodatabase.IFeature |
moveFeature(com.esri.arcgis.geometry.ILine offset,
com.esri.arcgis.geodatabase.IFeature source)
Moves the feature with the given offset. |
static com.esri.arcgis.geometry.IGeometry |
moveVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.ILine line,
com.esri.arcgis.server.IServerContext ctx)
Moves a vertex from the start point to the end point of the line. |
static com.esri.arcgis.geometry.IGeometry |
removeVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.IPoint point,
com.esri.arcgis.server.IServerContext ctx)
Removes a vertex the geometry if it is in the search distance. |
static com.esri.arcgis.geodatabase.IFeatureCursor |
search(com.esri.arcgis.geometry.IEnvelope extent,
com.esri.arcgis.carto.IFeatureLayer layer,
com.esri.arcgis.server.IServerContext ctx)
Gets all features on the layer within the given bounds. |
static com.esri.arcgis.geodatabase.IFeature |
simplifyGeometry(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IGeometry geom)
Simplifies the geometry. |
static java.util.List<com.esri.arcgis.geodatabase.IFeature> |
splitLineFeature(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IPoint pt,
double searchDistance,
com.esri.arcgis.server.IServerContext ctx)
Splits a line feature to two. |
static java.util.List<com.esri.arcgis.geodatabase.IFeature> |
splitPolygonFeature(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IPolyline polyline)
Splits a polygon feature to two. |
static double |
toDistance(int pixels,
com.esri.arcgis.geometry.IEnvelope bounds,
int imageWidth,
com.esri.arcgis.geometry.ISpatialReference refTo)
Converts the screen pixels to map distance in the spatial reference's unit. |
static com.esri.arcgis.geometry.IEnvelope |
toEnvelope(double minx,
double miny,
double maxx,
double maxy,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
Converts the WebExtent to an Envelope. |
static com.esri.arcgis.geometry.ILine |
toILine(double x1,
double y1,
double x2,
double y2,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
Creates a ILine from 2 points. |
static com.esri.arcgis.geometry.ILine |
toLine(double x1,
double y1,
double x2,
double y2,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
Creates a ILine from 2 points. |
static com.esri.arcgis.geometry.IPoint |
toPoint(double x,
double y,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
Creates a IPoint from x,y. |
static com.esri.arcgis.geodatabase.IFeature |
updateAttribute(com.esri.arcgis.geodatabase.IFeature feature,
Attribute att,
java.text.DateFormat dateFormat)
Updates an attribute value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NOT_VERSIONED
| Constructor Detail |
|---|
public EditUtil()
| Method Detail |
|---|
public static com.esri.arcgis.geodatabase.IFeature copyFeature(com.esri.arcgis.carto.IFeatureLayer targetLayer,
com.esri.arcgis.geometry.ILine offset,
com.esri.arcgis.geodatabase.IFeature source)
throws java.io.IOException,
com.esri.arcgis.interop.AutomationException
IFeature fNew = EditorUtil.copyFeature(workspace.getLayer(), offset, feature); fNew.store();
targetLayer - the layer to copy to.offset - the offset of the feature position. Set to null for no offset.source - the feature to copy.
- Returns:
- the reference of the new Feature.
- Throws:
java.io.IOException - If there are interop problems.
com.esri.arcgis.interop.AutomationException - If the ArcObject component throws an exception.
public static com.esri.arcgis.geodatabase.IFeature moveFeature(com.esri.arcgis.geometry.ILine offset,
com.esri.arcgis.geodatabase.IFeature source)
throws java.io.IOException,
com.esri.arcgis.interop.AutomationException
IFeature fNew = EditorUtil.copyFeature(workspace.getLayer(), offset, feature); fNew.store();
offset - the offset of the feature position. Set to null for no offset.source - the feature to copy.
- Returns:
- the reference of the new Feature.
- Throws:
java.io.IOException - If there are interop problems.
com.esri.arcgis.interop.AutomationException - If the ArcObject component throws an exception.
public static com.esri.arcgis.geodatabase.IFeature createFeature(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgis.geometry.IGeometry geom)
throws java.lang.Exception
editLayer - a feature layergeom - geometry
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeatureCursor getSelection(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgisws.LayerDescription ldesc,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
editLayer - the layer to search.
java.io.IOException
com.esri.arcgis.interop.AutomationException
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeatureCursor getFeatures(com.esri.arcgis.carto.IFeatureLayer editLayer,
int[] oids,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
editLayer - the layer to search.
java.lang.Exceptionpublic static java.lang.String getWorkspaceID(com.esri.arcgis.carto.IFeatureLayer layer)
layer - target feature layer.
public static java.util.Map<java.lang.Integer,com.esri.arcgis.carto.IFeatureLayer> getFeatureLayers(com.esri.arcgis.carto.IMap map,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
map - the IMap instance.ctx - server context
java.lang.Exception
public static com.esri.arcgis.geometry.IEnvelope toEnvelope(double minx,
double miny,
double maxx,
double maxy,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
ctx - set to null to use ArcObject.
java.lang.Exception
public static com.esri.arcgis.geometry.IPoint toPoint(double x,
double y,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
ctx - set to null to use ArcObject.
java.lang.Exception
public static com.esri.arcgis.geometry.ILine toLine(double x1,
double y1,
double x2,
double y2,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
ctx - set to null to use ArcObject.
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeatureCursor search(com.esri.arcgis.geometry.IEnvelope extent,
com.esri.arcgis.carto.IFeatureLayer layer,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
extent - the search boundslayer - the layer to searchctx - server context
java.lang.Exception
public static com.esri.arcgis.geometry.ILine toILine(double x1,
double y1,
double x2,
double y2,
com.esri.arcgis.geometry.ISpatialReference ref,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
java.lang.Exception
public static java.util.Map<java.lang.Integer,Attribute> getAttributes(com.esri.arcgis.carto.IFeatureLayer fLayer,
com.esri.arcgis.geodatabase.IFeature feature,
AttributeFilter filter,
java.text.DateFormat dateFormat)
throws java.lang.Exception
fLayer - the layer from which the feature retrieved.feature - the feature from which the attributes retrieved.filter - to control how to display attributes.dateFormat - to format date type attribute. Set to null to use the default date and time format.
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeature updateAttribute(com.esri.arcgis.geodatabase.IFeature feature,
Attribute att,
java.text.DateFormat dateFormat)
throws java.lang.Exception
feature - the feature to updateatt - the changed attribute.dateFormat - the parse the date string. Set to null to use the default date and time format.
java.lang.Exception
public static com.esri.arcgis.geometry.IGeometry addVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.IPoint point,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
searchDistance - the search distance in unit of geometry spatial reference.geom - the geom to hit.point - the vertex point
java.lang.Exception
public static com.esri.arcgis.geometry.ISpatialReference getSpatialReference(com.esri.arcgis.carto.IFeatureLayer flayer)
throws java.io.IOException,
com.esri.arcgis.interop.AutomationException
flayer - the layer
java.io.IOException
com.esri.arcgis.interop.AutomationException
public static double toDistance(int pixels,
com.esri.arcgis.geometry.IEnvelope bounds,
int imageWidth,
com.esri.arcgis.geometry.ISpatialReference refTo)
throws java.io.IOException,
com.esri.arcgis.interop.AutomationException
pixels - the pixel value.bounds - the map bounds.imageWidth - the map width in pixels.refTo - the spatial reference of the target layer or map.
java.io.IOException - If there are interop problems.
com.esri.arcgis.interop.AutomationException - If the ArcObject component throws an exception.
public static com.esri.arcgis.geometry.IGeometry moveVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.ILine line,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
searchDistance - the search distance in geometry's unit.geom - the target geometryline - the line to move along with.
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeature simplifyGeometry(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IGeometry geom)
throws java.lang.Exception
feature - the feature to setgeom - the geometry to simplify
java.lang.Exception
public static com.esri.arcgis.geometry.IGeometry removeVertex(double searchDistance,
com.esri.arcgis.geometry.IGeometry geom,
com.esri.arcgis.geometry.IPoint point,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
searchDistance - the search distance in unit of geometry spatial reference.geom - the geom to hit.point - the vertex point
java.lang.Exception
public static java.util.List<com.esri.arcgis.geodatabase.IFeature> splitLineFeature(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IPoint pt,
double searchDistance,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
feature - the feature to splitpt - the split pointsearchDistance - the search tolerance.
java.lang.Exception
public static java.util.List<com.esri.arcgis.geodatabase.IFeature> splitPolygonFeature(com.esri.arcgis.geodatabase.IFeature feature,
com.esri.arcgis.geometry.IPolyline polyline)
throws java.lang.Exception
feature - the feature to splitpolyline - the split line.
java.lang.Exception
public static com.esri.arcgis.geodatabase.IFeatureCursor getSelection(com.esri.arcgis.carto.IFeatureLayer editLayer,
com.esri.arcgisws.LayerDescription ldesc,
com.esri.arcgis.geometry.IGeometry geometry,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
editLayer - the layer to search.
java.io.IOException
com.esri.arcgis.interop.AutomationException
java.lang.Exception
public static java.util.List<java.lang.String> getVersions(com.esri.arcgis.carto.IMap map,
java.lang.String wsID,
com.esri.arcgis.server.IServerContext ctx)
throws java.lang.Exception
map - the source map.wsID - the optional workspace id.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||