public class DefaultEditingProviderServices extends AbstractProviderServices implements EditingProviderServices
| Modifier and Type | Field and Description |
|---|---|
protected GeometryManager |
geomManager |
| Constructor and Description |
|---|
DefaultEditingProviderServices() |
| Modifier and Type | Method and Description |
|---|---|
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(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.
|
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.
|
Point |
createPoint(double x,
double y,
int subtype)
Creates point with x and y values.
|
Spline |
createSpline(List<Point> points,
int subtype) |
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 |
getFeatureCopyWithoutPK(FeatureStore featureStore,
Feature feature)
Returns a copy of a feature without primary keys data
|
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.
|
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(Double m,
Double b,
Point perp,
int subtype)
Gets perpendicular of line formed by slope and y-intercept received as
parameters.
|
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.
|
String |
makeConsoleMessage(String preText,
Map<String,String> options)
Makes a console message.
|
void |
updateFeatureInFeatureStore(Feature feature,
FeatureStore featureStore)
Updates the feature received as parameter in feature store.
|
getParameters, getService, setServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameters, getServiceprotected GeometryManager geomManager
public void insertFeatureIntoFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServicesinsertFeatureIntoFeatureStore in interface EditingProviderServicesfeature - to be insertfeatureStore - where feature will be insertpublic void insertGeometryIntoFeatureStore(Geometry geometry, FeatureStore featureStore)
EditingProviderServicesinsertGeometryIntoFeatureStore in interface EditingProviderServicesgeometry - to be insertfeatureStore - where geometry will be insertpublic void deleteFeatureFromFeatureSet(Feature feature, FeatureStore featureStore, FeatureSet set)
EditingProviderServicesdeleteFeatureFromFeatureSet in interface EditingProviderServicespublic void deleteFeatureFromFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServicesdeleteFeatureFromFeatureStore in interface EditingProviderServicespublic void updateFeatureInFeatureStore(Feature feature, FeatureStore featureStore)
EditingProviderServicesupdateFeatureInFeatureStore in interface EditingProviderServicesfeature - to be updatedfeatureStore - where feature will be updatedpublic Circle createCircle(Point center, double radius, int subtype) throws CreateGeometryException
EditingProviderServicescreateCircle in interface EditingProviderServicescenter - of new circleradius - of new circlesubtype - subtype of circle. See Geometry.SUBTYPESCreateGeometryExceptionpublic Circle createCircle(Point firstPoint, Point secondPoint, Point thridPoint, int subtype) throws CreateGeometryException
EditingProviderServicescreateCircle in interface EditingProviderServicesfirstPoint - of circlesecondPoint - of circlethridPoint - of circlesubtype - subtype of circle. See Geometry.SUBTYPESCreateGeometryExceptionpublic Arc createArc(Point center, double radius, double startAngle, double angleExt, int subtype) throws CreateGeometryException
EditingProviderServicescreateArc in interface EditingProviderServicescenter - center of arc.radius - of arc.startAngle - of arc in radiansangleExt - of arc in radianssubtype - subtype of arc. See Geometry.SUBTYPESCreateGeometryExceptionpublic Ellipse createFilledEllipse(Point firstPointAxisA, Point secondPointAxisA, double halfLengthAxisB, int subtype) throws CreateGeometryException
EditingProviderServicescreateFilledEllipse in interface EditingProviderServicesfirstPointAxisA - first point of A axissecondPointAxisA - second point of B axishalfLengthAxisB - half length of B axissubtype - of ellipse See Geometry.SUBTYPESCreateGeometryExceptionpublic Arc createArc(Point start, Point middle, Point end, int subtype) throws BaseException
EditingProviderServicescreateArc in interface EditingProviderServicesstart - point of arcmiddle - point of arc. It can be any point of arc.end - point of arcsubtype - of arc. See Geometry.SUBTYPESBaseExceptionpublic Point createPoint(double x, double y, int subtype) throws CreateGeometryException
EditingProviderServicescreatePoint in interface EditingProviderServicesx - The X coordinatey - The y coordinatesubtype - of point. See Geometry.SUBTYPESCreateGeometryExceptionpublic Line createLine(double x1, double y1, double x2, double y2, int subtype) throws CreateGeometryException
EditingProviderServicescreateLine in interface EditingProviderServicesx1 - The X1 coordinatey1 - The y1 coordinatex2 - The X2 coordinatey2 - The y2 coordinatesubtype - of line. See Geometry.SUBTYPESCreateGeometryExceptionpublic int getSubType(FeatureStore featureStore) throws DataException
EditingProviderServicesGeometry.SUBTYPES of the feature store received as parameter.getSubType in interface EditingProviderServicesDataException - if there some problem getting subtype.public GeometryType getGeomType(FeatureStore featureStore) throws DataException
EditingProviderServicesGeometryType of the feature store received as parameter.getGeomType in interface EditingProviderServicesDataException - if there some problem getting subtype.public EditableFeature getFeatureCopyWithoutPK(FeatureStore featureStore, Feature feature) throws DataException
EditingProviderServicesgetFeatureCopyWithoutPK in interface EditingProviderServicesDataException - if there some problem getting subtype.public Point getCenter(Point a, Point b, Point c, int subtype) throws CreateGeometryException
EditingProviderServicesgetCenter in interface EditingProviderServicesa - Point oneb - Point twoc - Point threesubtype - of point created. See Geometry.SUBTYPESCreateGeometryExceptionpublic Point getMidPoint(Point a, Point b, int subtype) throws CreateGeometryException
EditingProviderServicesgetMidPoint in interface EditingProviderServicesa - Point oneb - Point twosubtype - of point created. See Geometry.SUBTYPESCreateGeometryExceptionpublic Double[] getLineParams(Point point, Point nextPoint)
EditingProviderServicesgetLineParams in interface EditingProviderServicespoint - of linenextPoint - of linepublic Point[] getPerpendicular(Double m, Double b, Point perp, int subtype) throws CreateGeometryException
EditingProviderServicesgetPerpendicular in interface EditingProviderServicesm - slope of lineb - y-intercep of lineperp - Point crossed by perpendicularsubtype - of perpendicular points. See Geometry.SUBTYPESCreateGeometryExceptionpublic Point getIntersection(Point[] lineA, Point[] lineB, int subtype) throws CreateGeometryException
EditingProviderServicesgetIntersection in interface EditingProviderServicessubtype - of intersection point. See Geometry.SUBTYPESCreateGeometryExceptionpublic double getAngle(Point start, Point end) throws GeometryOperationNotSupportedException, GeometryOperationException
EditingProviderServicesgetAngle in interface EditingProviderServicesGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic double angleDistance(double angle1,
double angle2)
EditingProviderServicesangleDistance in interface EditingProviderServicespublic Line createLine(Point p1, Point p2, int subtype) throws CreateGeometryException
EditingProviderServicescreateLine in interface EditingProviderServicesp1 - First pointp2 - Second pointsubtype - of line. See Geometry.SUBTYPESCreateGeometryExceptionpublic Spline createSpline(List<Point> points, int subtype) throws CreateGeometryException
createSpline in interface EditingProviderServicesCreateGeometryExceptionpublic String makeConsoleMessage(String preText, Map<String,String> options)
EditingProviderServicesmakeConsoleMessage in interface EditingProviderServicespreText - 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 Arc createEllipse(Point firstPointAxisA, Point secondPointAxisA, double halfLengthAxisB, int subtype) throws CreateGeometryException
EditingProviderServicescreateEllipse in interface EditingProviderServicesfirstPointAxisA - first point of A axissecondPointAxisA - second point of B axishalfLengthAxisB - half length of B axissubtype - of ellipse See Geometry.SUBTYPESCreateGeometryException