public class ShapeFeatureFactory extends DegreeFeatureFactory<ShapeFeature,String> implements CachingFeatureFactory<ShapeFeature,String>
DegreeFeatureFactory.ParsingProgressListenerFeatureFactory.TooManyFeaturesException| Modifier and Type | Field and Description |
|---|---|
protected URI |
documentURI |
protected Vector<FeatureServiceAttribute> |
featureServiceAttributes |
protected boolean |
initialised |
protected int |
maxCachedFeatureCount |
protected org.deegree.io.shpapi.ShapeFile |
shapeFile |
featureSrid, geometryIndexDEBUG, groovyShell, ID, lastCreatedfeatureVector, lastGeom, lastQuery, layerName, layerProperties, logger, maxFeatureCount, styles| Modifier | Constructor and Description |
|---|---|
|
ShapeFeatureFactory(LayerProperties layerProperties,
URI documentURL,
int maxCachedFeatureCount,
SwingWorker workerThread,
Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
Creates a new ShapeFeatureFactory object.
|
|
ShapeFeatureFactory(LayerProperties layerProperties,
URI documentURL,
int maxCachedFeatureCount,
SwingWorker workerThread,
Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles,
String shapeCrs)
Creates a new ShapeFeatureFactory object.
|
protected |
ShapeFeatureFactory(ShapeFeatureFactory shpff)
Creates a new ShapeFeatureFactory object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup()
DOCUMENT ME!
|
ShapeFeatureFactory |
clone()
DOCUMENT ME!
|
Vector<FeatureServiceAttribute> |
createAttributes(SwingWorker workerThread)
Method that does not create FeatureServiceAttributes.
|
protected ShapeFeature |
createFeatureInstance(org.deegree.model.feature.Feature degreeFeature,
int index)
Creates an instance of the custom FeatureServiceFeature types and may perform a custom initialisation with
properties of the degree feature.
|
protected ShapeFeature |
createFeatureInstance(org.deegree.model.feature.Feature degreeFeature,
ShapeInfo shapeInfo,
int index)
DOCUMENT ME!
|
List<ShapeFeature> |
createFeatures(String query,
BoundingBox boundingBox,
SwingWorker workerThread)
Returns instances of features
FT that match the optional query and that fall into the optional
BoundingBox.Applies layerProperties (if set) on all Features (if the type of the feature implements the interface InheritsLayerProperties). |
List<ShapeFeature> |
createFeatures(String query,
BoundingBox boundingBox,
SwingWorker workerThread,
int offset,
int limit,
FeatureServiceAttribute[] orderBy)
Returns instances of features
FT that match the optional query and that fall into the optional
BoundingBox.Applies layerProperties (if set) on all Features (if the type of the feature implements the interface InheritsLayerProperties). |
FeatureServiceFeature |
createNewFeature()
This method must be implemented, if
AbstractFeatureService.isEditable(). |
void |
flush()
Flushes the internal cache and causes a re-allocate of the features upon the next
createFeatures()
request. |
URI |
getDocumentURI()
Get the value of documentURL.
|
com.vividsolutions.jts.geom.Geometry |
getEnvelope()
DOCUMENT ME!
|
int |
getFeatureCount(String query,
BoundingBox bb)
DOCUMENT ME!
|
String |
getGeometryType()
DOCUMENT ME!
|
int |
getMaxCachedFeatureCount()
is not used and not usable.
|
String |
getShapeCrs()
DOCUMENT ME!
|
org.deegree.io.shpapi.ShapeFile |
getShapeFile()
DOCUMENT ME!
|
String |
getSldDefinition()
DOCUMENT ME!
|
protected void |
initialiseFeature(ShapeFeature featureServiceFeature,
org.deegree.model.feature.Feature degreeFeature,
boolean evaluateExpressions,
int index)
Perform standard initialisation of a newly created feature.
In gereal, this operation is invokded by the processFeatureCollection operation. |
boolean |
isErrorInGeometryFound()
DOCUMENT ME!
|
protected boolean |
isGenerateIds()
Determines if the service automatically generates unique IDs for all queryable features.
|
boolean |
isLazy()
Denotes if the features are allocated and cached during initialisation or during the first invocation of
the
createFeatures() operation. |
boolean |
isNoGeometryRecognised()
DOCUMENT ME!
|
protected void |
parseShapeFile(SwingWorker workerThread)
DOCUMENT ME!
|
void |
refreshData()
DOCUMENT ME!
|
void |
setCrs(Crs crs)
DOCUMENT ME!
|
void |
setDocumentURI(URI documentURI)
Set the value of documentURL.
|
void |
setMaxCachedFeatureCount(int maxCachedFeatureCount)
Sets the maximum number of features that can be allocated and cached by this feature factory.
|
void |
setShapeCrs(String shapeCrs)
DOCUMENT ME!
|
processFeatureCollectioncheckCancelled, createFeaturesFromMemory, evaluateBeanShellExpression, evaluateExpressions, evaluateGroovyExpressions, featuresAlreadyInMemory, getLastCreatedFeatures, getLayerProperties, getMaxFeatureCount, getStyle, getStyle, reEvaluteExpressions, setInterruptedAllowed, setInterruptedNotAllowed, setLayerName, setLayerProperties, setMaxFeatureCount, setSLDStyle, sortFeatureList, updateLastCreatedFeatures, waitUntilInterruptedIsAllowedequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastCreatedFeatures, getLayerProperties, getMaxFeatureCount, setLayerName, setLayerProperties, setMaxFeatureCount, setSLDStyleprotected int maxCachedFeatureCount
protected URI documentURI
protected org.deegree.io.shpapi.ShapeFile shapeFile
protected boolean initialised
protected Vector<FeatureServiceAttribute> featureServiceAttributes
public ShapeFeatureFactory(LayerProperties layerProperties, URI documentURL, int maxCachedFeatureCount, SwingWorker workerThread, Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles) throws Exception
layerProperties - DOCUMENT ME!documentURL - DOCUMENT ME!maxCachedFeatureCount - DOCUMENT ME!workerThread - DOCUMENT ME!styles - DOCUMENT ME!Exception - DOCUMENT ME!public ShapeFeatureFactory(LayerProperties layerProperties, URI documentURL, int maxCachedFeatureCount, SwingWorker workerThread, Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles, String shapeCrs) throws Exception
layerProperties - DOCUMENT ME!documentURL - DOCUMENT ME!maxCachedFeatureCount - DOCUMENT ME!workerThread - DOCUMENT ME!styles - DOCUMENT ME!shapeCrs - DOCUMENT ME!Exception - DOCUMENT ME!protected ShapeFeatureFactory(ShapeFeatureFactory shpff)
shpff - DOCUMENT ME!protected ShapeFeature createFeatureInstance(org.deegree.model.feature.Feature degreeFeature, int index) throws Exception
DegreeFeatureFactorycreateFeatureInstance in class DegreeFeatureFactory<ShapeFeature,String>degreeFeature - the degree feature that may be used for custom initialisationindex - index of the current processing step, can be used for id generationException - DOCUMENT ME!#processFeatureCollection(javax.swing.SwingWorker, org.deegree2.model.feature.Feature[], boolean)protected ShapeFeature createFeatureInstance(org.deegree.model.feature.Feature degreeFeature, ShapeInfo shapeInfo, int index) throws Exception
degreeFeature - DOCUMENT ME!shapeInfo - DOCUMENT ME!index - DOCUMENT ME!Exception - DOCUMENT ME!protected void initialiseFeature(ShapeFeature featureServiceFeature, org.deegree.model.feature.Feature degreeFeature, boolean evaluateExpressions, int index) throws Exception
DegreeFeatureFactoryprocessFeatureCollection operation.initialiseFeature in class DegreeFeatureFactory<ShapeFeature,String>featureServiceFeature - DOCUMENT ME!degreeFeature - feature to be initialisedevaluateExpressions - DOCUMENT ME!index - DOCUMENT ME!Exception - DOCUMENT ME!#processFeatureCollection(javax.swing.SwingWorker, org.deegree2.model.feature.Feature[], boolean)protected void cleanup()
public boolean isLazy()
CachingFeatureFactorycreateFeatures() operation. If this operation returns false it is stronly advised to
instantiate this factory in a separate thread.isLazy in interface CachingFeatureFactory<ShapeFeature,String>true if the cached features a allocated upon the first request to
createFeatures()public String getSldDefinition()
protected void parseShapeFile(SwingWorker workerThread) throws Exception
workerThread - DOCUMENT ME!Exception - DOCUMENT ME!ShapeFileImportAborted - DOCUMENT ME!public org.deegree.io.shpapi.ShapeFile getShapeFile()
throws IOException
IOException - DOCUMENT ME!public void refreshData()
public void flush()
CachingFeatureFactorycreateFeatures()
request.flush in interface CachingFeatureFactory<ShapeFeature,String>public int getMaxCachedFeatureCount()
getMaxCachedFeatureCount in interface CachingFeatureFactory<ShapeFeature,String>public void setMaxCachedFeatureCount(int maxCachedFeatureCount)
CachingFeatureFactorymaxFeatureCount and is applied to all available features regardless if
they may fall into the specified BoundingBox or not.
If during allocation the maximum number is reached the factory throws a TooManyFeaturesException.
setMaxCachedFeatureCount in interface CachingFeatureFactory<ShapeFeature,String>maxCachedFeatureCount - maximum number of features that can be cachedFeatureFactory.setMaxFeatureCount(int)public URI getDocumentURI()
public void setDocumentURI(URI documentURI)
documentURI - new value of documentURLpublic List<ShapeFeature> createFeatures(String query, BoundingBox boundingBox, SwingWorker workerThread) throws FeatureFactory.TooManyFeaturesException, Exception
FeatureFactoryFT that match the optional query and that fall into the optional
BoundingBox.InheritsLayerProperties). The SwingWorker instance can be used to set the progress of the operation and
to check the worker thread was canceled. The state of the features list after a the operation was canceled is
undefined.createFeatures in interface FeatureFactory<ShapeFeature,String>query - optional query of type QT to select the features to be returnedboundingBox - optional BoundingBox to restrict the features to be returnedworkerThread - an optional worker thread that is observedFTFeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingException - if something went wrong during parsingpublic Vector<FeatureServiceAttribute> createAttributes(SwingWorker workerThread) throws FeatureFactory.TooManyFeaturesException, Exception
FeatureFactorycreateAttributes in interface FeatureFactory<ShapeFeature,String>workerThread - DOCUMENT ME!FeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingUnsupportedOperationException - if the factory does not support the creation attributesException - if something went wrong during parsingprotected boolean isGenerateIds()
AbstractFeatureFactorytrue, the id expression is not evaluated.isGenerateIds in class AbstractFeatureFactory<ShapeFeature,String>true if the service generates id}public ShapeFeatureFactory clone()
FeatureFactoryclone in interface FeatureFactory<ShapeFeature,String>clone in class AbstractFeatureFactory<ShapeFeature,String>public boolean isNoGeometryRecognised()
public boolean isErrorInGeometryFound()
public void setCrs(Crs crs)
crs - DOCUMENT ME!public com.vividsolutions.jts.geom.Geometry getEnvelope()
public int getFeatureCount(String query, BoundingBox bb)
FeatureFactorygetFeatureCount in interface FeatureFactory<ShapeFeature,String>query - DOCUMENT ME!bb - DOCUMENT ME!public List<ShapeFeature> createFeatures(String query, BoundingBox boundingBox, SwingWorker workerThread, int offset, int limit, FeatureServiceAttribute[] orderBy) throws FeatureFactory.TooManyFeaturesException, Exception
FeatureFactoryFT that match the optional query and that fall into the optional
BoundingBox.InheritsLayerProperties). The SwingWorker instance can be used to set the progress of the operation and
to check the worker thread was canceled. The state of the features list after a the operation was canceled is
undefined.createFeatures in interface FeatureFactory<ShapeFeature,String>query - optional query of type QT to select the features to be returnedboundingBox - optional BoundingBox to restrict the features to be returnedworkerThread - an optional worker thread that is observedoffset - the start indexlimit - a limitorderBy - the attributes, the features should be ordered byFTFeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingException - if something went wrong during parsingpublic FeatureServiceFeature createNewFeature()
FeatureFactoryAbstractFeatureService.isEditable().createNewFeature in interface FeatureFactory<ShapeFeature,String>createNewFeature in class AbstractFeatureFactory<ShapeFeature,String>public String getGeometryType()
public String getShapeCrs()
public void setShapeCrs(String shapeCrs)
shapeCrs - the shapeCrs to setCopyright © 2012–2026 cismet GmbH. All rights reserved.