public class DefaultEditingProviderServices extends AbstractProviderServices implements EditingProviderServices
Constructor and Description |
---|
DefaultEditingProviderServices() |
Modifier and Type | Method and Description |
---|---|
void |
addAngleToDrawingStatus(DefaultDrawingStatus drawingStatus,
ISymbol textSymbol,
Point vertex,
Point ray1,
Point ray2,
int subtype)
Add angle info to drawing status
|
double |
angleDistance(double angle1,
double angle2)
Gets distance between two angles.
|
Arc |
createArc(Point center,
double radius,
double startAngle,
double angleExt,
int subtype)
Creates an arc as of center, radius, start angle and extension angle.
|
Arc |
createArc(Point start,
Point middle,
Point end,
int subtype)
Creates an arc as of three points.
|
Circle |
createCircle(EuclideanLine2D line1,
EuclideanLine2D line2,
Point point,
int subtype)
Creates a circle from two tangents and one point.
|
Circle |
createCircle(Geometry geometry1,
Geometry geometry2,
double radius,
Point firstPoint,
Point secondPoint,
int subtype)
Creates a circle from two tangent geometries and the radius.
|
Circle |
createCircle(Point center,
double radius,
int subtype)
Creates a circle as of center and radius.
|
Circle |
createCircle(Point firstPoint,
Point secondPoint,
Point thridPoint,
int subtype)
Creates a circle from three points.
|
Circle |
createCircle(Point firstPoint,
Point secondPoint,
Point thirdPoint,
Point fourthPoint,
Point fifthPoint,
int subtype)
Creates a circle from five points.The first two points are two points on
a tangent to the circle.The next two are two points on another tangent to
the circle.The last one is a point near the center of the circle.
|
Arc |
createEllipse(Point firstPointAxisA,
Point secondPointAxisA,
double halfLengthAxisB,
int subtype)
Creates an ellipse from start and end point of A axis and half length of
B axis.
|
Ellipse |
createFilledEllipse(Point firstPointAxisA,
Point secondPointAxisA,
double halfLengthAxisB,
int subtype)
Creates a filled ellipse from start and end point of A axis and half
length of B axis.
|
Line |
createLine(double x1,
double y1,
double x2,
double y2,
int subtype)
Creates line as of two point coordinates.
|
Line |
createLine(Point p1,
Point p2,
int subtype)
Creates line as of two point objects.
|
EditableFeature |
createNewFeature(FeatureStore store) |
Point |
createPoint(double x,
double y,
int subtype)
Creates point with x and y values.
|
Spline |
createSpline(java.util.List<Point> points,
int subtype)
Create Spline from point list
|
void |
deleteFeatureFromFeatureSet(Feature feature,
FeatureStore featureStore,
FeatureSet set)
Deletes the feature from feature set.
|
void |
deleteFeatureFromFeatureStore(Feature feature,
FeatureStore featureStore)
Deletes the feature from feature store.
|
double |
getAngle(Point start,
Point end)
Gets angle between two points.
|
Point |
getCenter(Point a,
Point b,
Point c,
int subtype)
Gets center point of three points.
|
EditableFeature |
getDefaultFeatureValues() |
Feature |
getFeature(Point point,
FeatureStore store,
MapContext mapContext)
Return a feature from store whose default geometry intersects with the point.
|
EditableFeature |
getFeatureCopyWithoutUniqueIndex(FeatureStore featureStore,
Feature feature)
Returns a copy of a feature without primary keys data
|
Geometry |
getGeometry(Point point,
FeatureStore store,
MapContext mapContext)
Return a geometry from store that intersects with the point.
|
Geometry |
getGeometry(Point point,
FeatureStore store,
MapContext mapContext,
java.util.List<Feature> excludeFeatures)
Return a geometry from store that intersects with the point excluding any features.
|
Geometry |
getGeometryOfVisibleLayers(Point point,
FeatureStore store,
MapContext mapContext)
Return a geometry that intersects with the point from the visible layers
if it can't be found in the feature store.
|
Geometry |
getGeometryOfVisibleLayers(Point point,
FeatureStore store,
MapContext mapContext,
java.util.List<Feature> excludeFeatures)
Return a geometry that intersects with the point from the visible layers
if it can't be found in the feature store excluding any features.
|
GeometryType |
getGeomType(FeatureStore featureStore)
Gets
GeometryType of the feature store received as parameter. |
Point |
getIntersection(Point[] lineA,
Point[] lineB,
int subtype)
Gets intersection point of two lines.If lines are parallels return null.
|
java.lang.Double[] |
getLineParams(Point point,
Point nextPoint)
Gets the slope of the line created by points received.
|
Point |
getMidPoint(Point a,
Point b,
int subtype)
Gets midpoint of two points
|
Point[] |
getPerpendicular(java.lang.Double m,
java.lang.Double b,
Point point,
int subtype)
Gets perpendicular of line formed by slope and y-intercept received as
parameters.The perpendicular cross the point received as parameter.
|
ISymbol |
getPreviewSymbol() |
ISymbol |
getPreviewSymbol(Feature feature) |
EditingService |
getService()
Returns the
Service at the API level. |
int |
getSubType(FeatureStore featureStore)
Gets
Geometry.SUBTYPES of the feature store received as parameter. |
void |
insertFeatureIntoFeatureStore(Feature feature,
FeatureStore featureStore)
Inserts the feature into feature store.
|
void |
insertGeometryIntoFeatureStore(Geometry geometry,
FeatureStore featureStore)
Inserts the geometry into feature store.
|
java.lang.String |
makeConsoleMessage(java.lang.String preText,
EditingServiceParameterOptions options) |
java.lang.String |
makeConsoleMessage(java.lang.String preText,
java.util.Map<java.lang.String,java.lang.String> options)
Makes a console message.
|
void |
setDefaultFeatureValues(EditableFeature feature) |
void |
updateFeatureInFeatureStore(Feature feature,
FeatureStore featureStore)
Updates the feature received as parameter in feature store.
|
getParameters, setService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters
public void insertFeatureIntoFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServices
insertFeatureIntoFeatureStore
in interface EditingProviderServices
feature
- to be insertfeatureStore
- where feature will be insertpublic EditableFeature createNewFeature(FeatureStore store)
createNewFeature
in interface EditingProviderServices
public void insertGeometryIntoFeatureStore(Geometry geometry, FeatureStore featureStore)
EditingProviderServices
insertGeometryIntoFeatureStore
in interface EditingProviderServices
geometry
- to be insertfeatureStore
- where geometry will be insertpublic void deleteFeatureFromFeatureSet(Feature feature, FeatureStore featureStore, FeatureSet set)
EditingProviderServices
deleteFeatureFromFeatureSet
in interface EditingProviderServices
public void deleteFeatureFromFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServices
deleteFeatureFromFeatureStore
in interface EditingProviderServices
public void updateFeatureInFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServices
updateFeatureInFeatureStore
in interface EditingProviderServices
feature
- to be updatedfeatureStore
- where feature will be updatedpublic Circle createCircle(Point center, double radius, int subtype) throws CreateGeometryException
EditingProviderServices
createCircle
in interface EditingProviderServices
center
- of new circleradius
- of new circlesubtype
- subtype of circle. See Geometry.SUBTYPES
CreateGeometryException
public Circle createCircle(Point firstPoint, Point secondPoint, Point thridPoint, int subtype) throws CreateGeometryException
EditingProviderServices
createCircle
in interface EditingProviderServices
firstPoint
- of circlesecondPoint
- of circlethridPoint
- of circlesubtype
- subtype of circle. See Geometry.SUBTYPES
CreateGeometryException
public Arc createArc(Point center, double radius, double startAngle, double angleExt, int subtype) throws CreateGeometryException
EditingProviderServices
createArc
in interface EditingProviderServices
center
- center of arc.radius
- of arc.startAngle
- of arc in radiansangleExt
- of arc in radianssubtype
- subtype of arc. See Geometry.SUBTYPES
CreateGeometryException
public Ellipse createFilledEllipse(Point firstPointAxisA, Point secondPointAxisA, double halfLengthAxisB, int subtype) throws CreateGeometryException
EditingProviderServices
createFilledEllipse
in interface EditingProviderServices
firstPointAxisA
- first point of A axissecondPointAxisA
- second point of B axishalfLengthAxisB
- half length of B axissubtype
- of ellipse See Geometry.SUBTYPES
CreateGeometryException
public Arc createArc(Point start, Point middle, Point end, int subtype) throws BaseException
EditingProviderServices
createArc
in interface EditingProviderServices
start
- point of arcmiddle
- point of arc. It can be any point of arc.end
- point of arcsubtype
- of arc. See Geometry.SUBTYPES
BaseException
public Point createPoint(double x, double y, int subtype) throws CreateGeometryException
EditingProviderServices
createPoint
in interface EditingProviderServices
x
- The X coordinatey
- The y coordinatesubtype
- of point. See Geometry.SUBTYPES
CreateGeometryException
public Line createLine(double x1, double y1, double x2, double y2, int subtype) throws CreateGeometryException
EditingProviderServices
createLine
in interface EditingProviderServices
x1
- The X1 coordinatey1
- The y1 coordinatex2
- The X2 coordinatey2
- The y2 coordinatesubtype
- of line. See Geometry.SUBTYPES
CreateGeometryException
public int getSubType(FeatureStore featureStore) throws DataException
EditingProviderServices
Geometry.SUBTYPES
of the feature store received as parameter.getSubType
in interface EditingProviderServices
DataException
- if there some problem getting subtype.public GeometryType getGeomType(FeatureStore featureStore) throws DataException
EditingProviderServices
GeometryType
of the feature store received as parameter.getGeomType
in interface EditingProviderServices
DataException
- if there some problem getting subtype.public EditableFeature getFeatureCopyWithoutUniqueIndex(FeatureStore featureStore, Feature feature) throws DataException
EditingProviderServices
getFeatureCopyWithoutUniqueIndex
in interface EditingProviderServices
DataException
- if there some problem getting subtype.public Point getCenter(Point a, Point b, Point c, int subtype) throws CreateGeometryException
EditingProviderServices
getCenter
in interface EditingProviderServices
a
- Point oneb
- Point twoc
- Point threesubtype
- of point created. See Geometry.SUBTYPES
CreateGeometryException
public Point getMidPoint(Point a, Point b, int subtype) throws CreateGeometryException
EditingProviderServices
getMidPoint
in interface EditingProviderServices
a
- Point oneb
- Point twosubtype
- of point created. See Geometry.SUBTYPES
CreateGeometryException
public java.lang.Double[] getLineParams(Point point, Point nextPoint)
EditingProviderServices
getLineParams
in interface EditingProviderServices
point
- of linenextPoint
- of linepublic Point[] getPerpendicular(java.lang.Double m, java.lang.Double b, Point point, int subtype) throws CreateGeometryException
EditingProviderServices
getPerpendicular
in interface EditingProviderServices
m
- slope of lineb
- y-intercep of linepoint
- Point crossed by perpendicularsubtype
- of perpendicular points. See Geometry.SUBTYPES
CreateGeometryException
public Point getIntersection(Point[] lineA, Point[] lineB, int subtype) throws CreateGeometryException
EditingProviderServices
getIntersection
in interface EditingProviderServices
subtype
- of intersection point. See Geometry.SUBTYPES
CreateGeometryException
public double getAngle(Point start, Point end) throws GeometryOperationNotSupportedException, GeometryOperationException
EditingProviderServices
getAngle
in interface EditingProviderServices
GeometryOperationNotSupportedException
GeometryOperationException
public double angleDistance(double angle1, double angle2)
EditingProviderServices
angleDistance
in interface EditingProviderServices
public Line createLine(Point p1, Point p2, int subtype) throws CreateGeometryException
EditingProviderServices
createLine
in interface EditingProviderServices
p1
- First pointp2
- Second pointsubtype
- of line. See Geometry.SUBTYPES
CreateGeometryException
public Spline createSpline(java.util.List<Point> points, int subtype) throws CreateGeometryException
EditingProviderServices
createSpline
in interface EditingProviderServices
CreateGeometryException
public java.lang.String makeConsoleMessage(java.lang.String preText, java.util.Map<java.lang.String,java.lang.String> options)
EditingProviderServices
makeConsoleMessage
in interface EditingProviderServices
preText
- i18n key of first part of message.options
- Map with accepted options. Keys of map should be first
letter of option and value of map should be an i18n key. For example, a
valid map could be <"A","arc_mode">, <"C","close_polyline">public java.lang.String makeConsoleMessage(java.lang.String preText, EditingServiceParameterOptions options)
makeConsoleMessage
in interface EditingProviderServices
public Arc createEllipse(Point firstPointAxisA, Point secondPointAxisA, double halfLengthAxisB, int subtype) throws CreateGeometryException
EditingProviderServices
createEllipse
in interface EditingProviderServices
firstPointAxisA
- first point of A axissecondPointAxisA
- second point of B axishalfLengthAxisB
- half length of B axissubtype
- of ellipse See Geometry.SUBTYPES
CreateGeometryException
public Circle createCircle(Point firstPoint, Point secondPoint, Point thirdPoint, Point fourthPoint, Point fifthPoint, int subtype) throws CreateGeometryException
EditingProviderServices
createCircle
in interface EditingProviderServices
subtype
- subtype of circle. See Geometry.SUBTYPES
CreateGeometryException
public Circle createCircle(EuclideanLine2D line1, EuclideanLine2D line2, Point point, int subtype) throws CreateGeometryException
EditingProviderServices
createCircle
in interface EditingProviderServices
line1
- A tangent lineline2
- Another tangent linepoint
- A point near the center of the circle.subtype
- subtype of circle. See Geometry.SUBTYPES
CreateGeometryException
public Circle createCircle(Geometry geometry1, Geometry geometry2, double radius, Point firstPoint, Point secondPoint, int subtype) throws CreateGeometryException
EditingProviderServices
createCircle
in interface EditingProviderServices
geometry1
- A tangent geometrygeometry2
- Another tangent geometryradius
- the radius of the cicle.firstPoint
- a point near tangent point of geometry1secondPoint
- a point near tangent point of geometry2subtype
- subtype of circle. See Geometry.SUBTYPES
CreateGeometryException
public Feature getFeature(Point point, FeatureStore store, MapContext mapContext)
EditingProviderServices
getFeature
in interface EditingProviderServices
public Geometry getGeometry(Point point, FeatureStore store, MapContext mapContext)
EditingProviderServices
getGeometry
in interface EditingProviderServices
public Geometry getGeometry(Point point, FeatureStore store, MapContext mapContext, java.util.List<Feature> excludeFeatures)
EditingProviderServices
getGeometry
in interface EditingProviderServices
public Geometry getGeometryOfVisibleLayers(Point point, FeatureStore store, MapContext mapContext)
EditingProviderServices
getGeometryOfVisibleLayers
in interface EditingProviderServices
public Geometry getGeometryOfVisibleLayers(Point point, FeatureStore store, MapContext mapContext, java.util.List<Feature> excludeFeatures)
EditingProviderServices
getGeometryOfVisibleLayers
in interface EditingProviderServices
public void addAngleToDrawingStatus(DefaultDrawingStatus drawingStatus, ISymbol textSymbol, Point vertex, Point ray1, Point ray2, int subtype) throws CreateGeometryException, GeometryOperationNotSupportedException, GeometryOperationException
EditingProviderServices
addAngleToDrawingStatus
in interface EditingProviderServices
CreateGeometryException
GeometryOperationNotSupportedException
GeometryOperationException
public void setDefaultFeatureValues(EditableFeature feature)
setDefaultFeatureValues
in interface EditingProviderServices
public EditableFeature getDefaultFeatureValues()
getDefaultFeatureValues
in interface EditingProviderServices
public ISymbol getPreviewSymbol()
getPreviewSymbol
in interface EditingProviderServices
public ISymbol getPreviewSymbol(Feature feature)
getPreviewSymbol
in interface EditingProviderServices
public EditingService getService()
ProviderServices
Service
at the API level.getService
in interface ProviderServices
getService
in interface EditingProviderServices
getService
in class AbstractProviderServices