public class PolylineEditingProvider extends AbstractEditingProvider implements EditingProvider
Modifier and Type | Field and Description |
---|---|
protected EditingProviderServices |
editingProviderServices |
protected FeatureStore |
featureStore |
protected Map<String,String> |
options |
protected EditingServiceParameter |
points |
AGGREGATE, ARC, CIRCLE, CIRCUMFERENCE, COMPLEX, CURVE, ELLIPSE, ELLIPTICARC, FILLEDSPLINE, GEOMETRY, LINE, MULTICURVE, MULTILINE, MULTIPOINT, MULTIPOLYGON, MULTISOLID, MULTISURFACE, NULL, PERIELLIPSE, POINT, POLYGON, RING, SOLID, SPLINE, SURFACE
Constructor and Description |
---|
PolylineEditingProvider(ProviderServices providerServices,
DynObject parameters) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateFinalGeometry(GeometryType geometryType,
OrientablePrimitive orientablePrimitive)
Calculate the final geometry reversing the geometries of the
drawingStatus if needed.
|
protected Geometry |
closeGeometryIfNecessary(Geometry geometry) |
Geometry |
finish()
Finalizes provider.
|
void |
finishAndStore()
Finalizes provider and stores the result to
FeatureStore of this
provider. |
DrawingStatus |
getDrawingStatus(Point mousePosition)
Gets state of drawing.
|
String |
getName()
Gets provider name.
|
List<EditingServiceParameter> |
getParameters()
Gets a
List with all parameters of provider. |
EditingServiceParameter |
next()
Gets next parameter needed by provider.
|
void |
setValue(Object value)
Sets value to provider.
|
void |
start()
Starts provider.
|
void |
stop()
Stops provider.
|
getProviderServices, setProviderServices
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setProviderServices
protected EditingProviderServices editingProviderServices
protected EditingServiceParameter points
protected FeatureStore featureStore
public PolylineEditingProvider(ProviderServices providerServices, DynObject parameters)
public DrawingStatus getDrawingStatus(Point mousePosition) throws DrawServiceException
EditingProvider
DrawingStatus
. List of
geometries of drawing status object can be different from final
geometries. Use this method to get a draft status information while user
is drawing.getDrawingStatus
in interface EditingProvider
mousePosition
- Mouse position to draw geometries.DrawingStatus
object with a list of geometries and
information.DrawServiceException
- if there are some error creating geometries.public void finishAndStore() throws FinishServiceException
EditingProvider
FeatureStore
of this
provider. Use this method to store the result of this service. Make sure
that service has all required values.finishAndStore
in interface EditingProvider
FinishServiceException
- if there are some error getting values,
creating geometries or inserting/updating/removing geometries
from feature store.public Geometry finish() throws FinishServiceException
EditingProvider
FeatureStore
. Make sure that provider has all required
values.finish
in interface EditingProvider
FinishServiceException
- if there are some error getting values,
creating geometries.protected void calculateFinalGeometry(GeometryType geometryType, OrientablePrimitive orientablePrimitive) throws DataException, VectorEditingException, GeometryException, GeometryOperationNotSupportedException, GeometryOperationException
geometryType
- orientablePrimitive
- DataException
VectorEditingException
GeometryException
GeometryOperationException
GeometryOperationNotSupportedException
public String getName()
EditingProvider
getName
in interface EditingProvider
public List<EditingServiceParameter> getParameters()
EditingProvider
List
with all parameters of provider. Each parameter
has name, description and types. See EditingServiceParameter
.getParameters
in interface EditingProvider
EditingServiceParameter
objects.public EditingServiceParameter next()
EditingProvider
null
if all
parameters have values.next
in interface EditingProvider
EditingServiceParameter
object that represents the
next parameter.public void start() throws StartServiceException
EditingProvider
start
in interface EditingProvider
StartServiceException
- if there are some error starting service.public void stop()
EditingProvider
stop
in interface EditingProvider
public void setValue(Object value) throws InvalidEntryException
EditingProvider
setValue
in interface EditingProvider
value
- Object to be set to next EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.