public abstract class AbstractFeatureService<FT extends FeatureServiceFeature,QT> extends AbstractRetrievalService implements MapService, ServiceLayer, RetrievalServiceLayer, FeatureMapService, ConvertableToXML, Cloneable, SLDStyledLayer
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractFeatureService.FeatureRetrievalWorker
Feature Retrieval Thread started by the
retrieve() operation. |
protected class |
AbstractFeatureService.LayerInitWorker
Initialisiert den Layer.
|
| Modifier and Type | Field and Description |
|---|---|
protected BoundingBox |
bb |
static String |
DEFAULT_TYPE |
protected boolean |
enabled |
protected String |
encoding |
protected FeatureFactory |
featureFactory |
protected AbstractFeatureService.FeatureRetrievalWorker |
featureRetrievalWorker |
protected Map<String,FeatureServiceAttribute> |
featureServiceAttributes |
protected Boolean |
initialized |
protected boolean |
initializedFromElement |
protected AbstractFeatureService.LayerInitWorker |
layerInitWorker |
protected int |
layerPosition |
protected LayerProperties |
layerProperties |
protected int |
maxFeatureCount |
protected String |
name |
static String |
NONE |
protected List<String> |
orderedFeatureServiceAttributes |
protected edu.umd.cs.piccolo.PNode |
pNode |
protected List<DefaultQueryButtonAction> |
queryButtons |
static List<DefaultQueryButtonAction> |
SQL_QUERY_BUTTONS |
protected float |
translucency |
static String |
UNKNOWN |
protected boolean |
visible |
DEBUG, errorObject, listeners, progress, PROGRESS_PROPERTY, PROGRESS_REFRESH, propertyChangeSupport, refreshNeededLAYER_DISABLED_INVISIBLE, LAYER_DISABLED_VISIBLE, LAYER_ENABLED_INVISIBLE, LAYER_ENABLED_VISIBLETYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
|
AbstractFeatureService()
Creates a new uninitilaised instance of a feature service with layer properties set.
|
protected |
AbstractFeatureService(AbstractFeatureService afs)
Protected Constructor that clones (shallow) the delivered AbstractFeatureService.
|
|
AbstractFeatureService(org.jdom.Element e)
Creates a new AbstractFeatureService from a XML-element.
|
|
AbstractFeatureService(String name,
List<FeatureServiceAttribute> attributes)
Create a new uninitialised AbstractFeatureService except for the name and featureServiceAttributes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeDisabled()
This method checks either a layer can be disabled or not.
|
protected boolean |
cancel(SwingWorker workerThread)
Cancels the retrievel or the initialisation threads.
|
protected abstract FeatureFactory |
createFeatureFactory()
Creates an instance of a service specific FeatureFactory implementation.
|
protected abstract LayerProperties |
createLayerProperties()
Creates an instance of a service specific LayerProperties implementation.
|
boolean |
decorateLater()
Determines, if the attribute decoration should be hidden from the user.
|
String |
decoratePropertyName(String name)
DOCUMENT ME!
|
String |
decoratePropertyValue(String columnName,
String value)
DOCUMENT ME!
|
String |
decorateQuery(String query)
Decorates the given query.
|
BoundingBox |
getBoundingBox()
This Method is used to set the bounding box to determine which features should be retrieved.
|
String[] |
getCalculatedAttributes()
DOCUMENT ME!
|
String |
getEncoding()
DOCUMENT ME!
|
int |
getFeatureCount(BoundingBox boundingBox)
DOCUMENT ME!
|
int |
getFeatureCount(QT query,
BoundingBox boundingBox)
DOCUMENT ME!
|
FeatureFactory |
getFeatureFactory()
Get the value of featureFactory.
|
protected abstract String |
getFeatureLayerType()
DOCUMENT ME!
|
Map<String,FeatureServiceAttribute> |
getFeatureServiceAttributes()
Returns a list of all featureServiceAttributes of this featureservice.
|
String |
getGeometryType()
Determines the geometry type of the features of this service.
|
String |
getId()
DOCUMENT ME!
|
org.jdom.Element |
getInitElement()
DOCUMENT ME!
|
boolean |
getInitialisationError()
DOCUMENT ME!
|
abstract Icon |
getLayerIcon(int type)
DOCUMENT ME!
|
int |
getLayerPosition()
This method delivers the postion of the layer in the layer hierachy.
|
LayerProperties |
getLayerProperties()
DOCUMENT ME!
|
void |
getLegend(int width,
int height,
Graphics2D g2d)
DOCUMENT ME!
|
void |
getLegend(int nr,
int width,
int height,
Graphics2D g2d)
DOCUMENT ME!
|
void |
getLegends(List<org.deegree.commons.utils.Pair<Integer,Integer>> sizes,
Graphics2D[] g2d)
DOCUMENT ME!
|
org.deegree.commons.utils.Pair<Integer,Integer> |
getLegendSize()
DOCUMENT ME!
|
org.deegree.commons.utils.Pair<Integer,Integer> |
getLegendSize(int nr)
DOCUMENT ME!
|
List<org.deegree.commons.utils.Pair<Integer,Integer>> |
getLegendSizes()
DOCUMENT ME!
|
int |
getMaxFeatureCount()
DOCUMENT ME!
|
int |
getMaxFeaturesPerPage()
The number of features that should be shown on one page.
|
String |
getName()
This method delivers the name of the layer.
|
List<String> |
getOrderedFeatureServiceAttributes()
Returns a list of all featureServiceAttributes of this featureservice.
|
edu.umd.cs.piccolo.PNode |
getPNode()
DOCUMENT ME!
|
abstract QT |
getQuery()
Get the value of query.
|
List<DefaultQueryButtonAction> |
getQueryButtons()
The query buttons, which should be used by the query search.
|
Reader |
getSLDDefiniton()
DOCUMENT ME!
|
float |
getTranslucency()
Deliveres the transparency value of the Featues.
|
protected void |
init()
Initialises the FeatureService instance.
|
void |
initAndWait()
Initialises the feature service and blocks until the initialisation of the service is completed.
|
protected abstract void |
initConcreteInstance()
This operation is invoked after the default initialisation.
|
void |
initFromElement(org.jdom.Element element)
DOCUMENT ME!
|
boolean |
isEditable()
DOCUMENT ME!
|
boolean |
isEnabled()
Returns if the layer is enabled or disabled.
|
boolean |
isInitialized()
Packs the properties of the AbstractFeatureService as JDom-element.
|
boolean |
isSelectable()
DOCUMENT ME!
|
boolean |
isVisible()
DOCUMENT ME!
|
boolean |
isVisibleInBoundingBox(XBoundingBox box)
Determines if this service has any restriction that forbids the retrieval of features for the given bounding box.
|
protected Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> |
parseSLD(Reader input)
DOCUMENT ME!
|
void |
refresh()
Sets the new layer properties of the service and.
|
void |
refreshFeatures()
DOCUMENT ME!
|
void |
retrieve(boolean forced)
Creates a new LayerInitWorker or FeatureRetrievalWorker and launches the initialisation or retrieval-process
depending wheter the layer has already been initialised or the forced parameter is set to true.
|
protected List<FT> |
retrieveFeatures(AbstractFeatureService.FeatureRetrievalWorker worker)
This operation class the
createFeatures() operation of the current FeatureFactory. |
List |
retrieveFeatures(BoundingBox boundingBox,
int offset,
int limit,
String orderBy)
DOCUMENT ME!
|
void |
setBoundingBox(BoundingBox bb)
DOCUMENT ME!
|
void |
setEnabled(boolean enabled)
Enables or disables the Layer.
|
void |
setEncoding(String encoding)
DOCUMENT ME!
|
protected void |
setFeatureServiceAttributes(List<FeatureServiceAttribute> featureServiceAttributesVector)
Setter for the featureServiceAttributes of the featureservice.
|
void |
setFeatureServiceAttributes(Map<String,FeatureServiceAttribute> featureServiceAttributes)
Setter for the featureServiceAttributes of the featureservice.
|
void |
setInitElement(org.jdom.Element initElement)
DOCUMENT ME!
|
void |
setInitialisationError(boolean initialisationError)
DOCUMENT ME!
|
protected void |
setInitialized(boolean isInitialized)
DOCUMENT ME!
|
void |
setLayerPosition(int layerPosition)
Sets the layer postion.
|
void |
setLayerProperties(LayerProperties layerProperties)
DOCUMENT ME!
|
void |
setLayerProperties(LayerProperties layerProperties,
boolean refreshFeatures)
Sets the new layer properties of the service and.
|
void |
setMaxFeatureCount(int maxFeatureCount)
DOCUMENT ME!
|
void |
setName(String name)
Setter for the name of the AbstractFeatureService.
|
void |
setOrderedFeatureServiceAttributes(List<String> orderedFeatureServiceAttributes)
Setter for the featureServiceAttributes of the featureservice.
|
void |
setPNode(edu.umd.cs.piccolo.PNode pNode)
DOCUMENT ME!
|
abstract void |
setQuery(QT query)
Set the value of query.
|
void |
setSelectable(boolean selectable)
DOCUMENT ME!
|
void |
setSize(int height,
int width)
DOCUMENT ME!
|
void |
setSLDInputStream(String inputStream)
DOCUMENT ME!
|
void |
setTranslucency(float t)
Setter for the transparency value.
|
void |
setVisible(boolean visible)
DOCUMENT ME!
|
org.jdom.Element |
toElement()
DOCUMENT ME!
|
String |
toString()
DOCUMENT ME!
|
addPropertyChangeListener, addRetrievalListener, clone, cloneWithoutRetrievalListeners, fireRetrievalAborted, fireRetrievalComplete, fireRetrievalError, fireRetrievalProgress, fireRetrievalStarted, getErrorObject, getListeners, getProgress, hasErrors, isRefreshNeeded, removePropertyChangeListener, removeRetrievalListener, setErrorObject, setProgress, setRefreshNeededequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetErrorObject, hasErrors, setErrorObjectaddPropertyChangeListener, addRetrievalListener, getProgress, isRefreshNeeded, removePropertyChangeListener, removeRetrievalListener, setProgress, setRefreshNeededpublic static String UNKNOWN
public static String NONE
public static final String DEFAULT_TYPE
public static final List<DefaultQueryButtonAction> SQL_QUERY_BUTTONS
protected boolean enabled
protected BoundingBox bb
protected int layerPosition
protected String name
protected float translucency
protected String encoding
protected int maxFeatureCount
protected Map<String,FeatureServiceAttribute> featureServiceAttributes
protected edu.umd.cs.piccolo.PNode pNode
protected boolean visible
protected AbstractFeatureService.FeatureRetrievalWorker featureRetrievalWorker
protected Boolean initialized
protected AbstractFeatureService.LayerInitWorker layerInitWorker
protected LayerProperties layerProperties
protected FeatureFactory featureFactory
protected List<DefaultQueryButtonAction> queryButtons
protected boolean initializedFromElement
public AbstractFeatureService()
retrieve() operation.public AbstractFeatureService(org.jdom.Element e)
throws Exception
retrieve() operation which is rum from separate thread.e - XML-element with FeatureService-configurationException - java.lang.Exception if something went wrongClassNotFoundException - DOCUMENT ME!isInitialised()public AbstractFeatureService(String name, List<FeatureServiceAttribute> attributes)
name - the name of this FeatureServiceattributes - featureServiceAttributes vector with all FeatureServiceAttributes of the FeatureServiceprotected AbstractFeatureService(AbstractFeatureService afs)
afs - FeatureService that should be clonedprotected void init()
throws Exception
Exception - java.lang.Exception if somethin went wrongpublic void initAndWait()
throws Exception
Exception - DOCUMENT ME!protected abstract LayerProperties createLayerProperties()
protected abstract FeatureFactory createFeatureFactory() throws Exception
Exception - id the costruction failedpublic FeatureFactory getFeatureFactory()
public abstract QT getQuery()
public abstract void setQuery(QT query)
query - new value of queryprotected boolean cancel(SwingWorker workerThread)
workerThread - DOCUMENT ME!true if a running thread was found and canceledpublic void retrieve(boolean forced)
retrieve in interface RetrievalServiceretrieve in class AbstractRetrievalServiceforced - forces a re-initialisation of the layerprotected abstract void initConcreteInstance()
throws Exception
Exception - if the initialisation failsprotected abstract String getFeatureLayerType()
public abstract Icon getLayerIcon(int type)
type - DOCUMENT ME!public boolean isInitialized()
protected void setInitialized(boolean isInitialized)
isInitialized - DOCUMENT ME!public Map<String,FeatureServiceAttribute> getFeatureServiceAttributes()
public void setFeatureServiceAttributes(Map<String,FeatureServiceAttribute> featureServiceAttributes)
featureServiceAttributes - featureServiceAttributes to setpublic List<String> getOrderedFeatureServiceAttributes()
public void setOrderedFeatureServiceAttributes(List<String> orderedFeatureServiceAttributes)
orderedFeatureServiceAttributes - featureServiceAttributes to setprotected void setFeatureServiceAttributes(List<FeatureServiceAttribute> featureServiceAttributesVector)
featureServiceAttributesVector - featureServiceAttributes to setpublic BoundingBox getBoundingBox()
public void setBoundingBox(BoundingBox bb)
setBoundingBox in interface MapServicebb - DOCUMENT ME!public String getEncoding()
public void setEncoding(String encoding)
encoding - DOCUMENT ME!public int getMaxFeatureCount()
public void setMaxFeatureCount(int maxFeatureCount)
maxFeatureCount - DOCUMENT ME!public LayerProperties getLayerProperties()
public void setLayerProperties(LayerProperties layerProperties)
layerProperties - DOCUMENT ME!public void setLayerProperties(LayerProperties layerProperties, boolean refreshFeatures)
layerProperties - DOCUMENT ME!refreshFeatures - DOCUMENT ME!public void refresh()
public float getTranslucency()
getTranslucency in interface MapServicegetTranslucency in interface ServiceLayerpublic void setTranslucency(float t)
setTranslucency in interface ServiceLayert - the new transparency valuepublic void setName(String name)
setName in interface ServiceLayername - the new name that will be setpublic String getName()
getName in interface ServiceLayerpublic int getLayerPosition()
getLayerPosition in interface ServiceLayerpublic void setLayerPosition(int layerPosition)
setLayerPosition in interface ServiceLayerlayerPosition - The integer value which determines the postion in the layer hierarchypublic boolean isEnabled()
isEnabled in interface ServiceLayerpublic void setEnabled(boolean enabled)
setEnabled in interface ServiceLayerenabled - true enables the layer, false disables itpublic boolean canBeDisabled()
canBeDisabled in interface ServiceLayerpublic boolean isVisible()
isVisible in interface MapServicepublic void setVisible(boolean visible)
visible - DOCUMENT ME!public void setSize(int height,
int width)
setSize in interface MapServiceheight - DOCUMENT ME!width - DOCUMENT ME!public edu.umd.cs.piccolo.PNode getPNode()
getPNode in interface PNodeProviderpublic void setPNode(edu.umd.cs.piccolo.PNode pNode)
setPNode in interface PNodeProviderpNode - DOCUMENT ME!public String toString()
public String getId()
public org.jdom.Element toElement()
toElement in interface ConvertableToXMLpublic void initFromElement(org.jdom.Element element)
throws Exception
initFromElement in interface ConvertableToXMLelement - DOCUMENT ME!Exception - DOCUMENT ME!public void setInitialisationError(boolean initialisationError)
initialisationError - DOCUMENT ME!public boolean getInitialisationError()
public List<DefaultQueryButtonAction> getQueryButtons()
public String decoratePropertyName(String name)
name - DOCUMENT ME!public boolean decorateLater()
decoratePropertyName(String
name)public String decorateQuery(String query)
decorateLater() returns true. This method adds all attribute decorations, which should be hidden from the
user.query - the query to decoratepublic String decoratePropertyValue(String columnName, String value)
columnName - DOCUMENT ME!value - DOCUMENT ME!public List retrieveFeatures(BoundingBox boundingBox, int offset, int limit, String orderBy) throws Exception
boundingBox - DOCUMENT ME!offset - DOCUMENT ME!limit - DOCUMENT ME!orderBy - DOCUMENT ME!Exception - DOCUMENT ME!public int getFeatureCount(QT query, BoundingBox boundingBox)
query - DOCUMENT ME!boundingBox - DOCUMENT ME!public int getFeatureCount(BoundingBox boundingBox)
boundingBox - DOCUMENT ME!protected List<FT> retrieveFeatures(AbstractFeatureService.FeatureRetrievalWorker worker) throws Exception
createFeatures() operation of the current FeatureFactory. Implementation classes
may override this method to pass additional parameters to the createFeatures() operation of the specific
FeatureFactory implementation.worker - the current worker thred that is observedException - DOCUMENT ME!public org.jdom.Element getInitElement()
public void setInitElement(org.jdom.Element initElement)
initElement - the initElement to setpublic void setSelectable(boolean selectable)
selectable - DOCUMENT ME!public boolean isSelectable()
public boolean isEditable()
public Reader getSLDDefiniton()
SLDStyledLayergetSLDDefiniton in interface SLDStyledLayerpublic void setSLDInputStream(String inputStream)
SLDStyledLayersetSLDInputStream in interface SLDStyledLayerinputStream - DOCUMENT ME!protected Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> parseSLD(Reader input)
input - DOCUMENT ME!public org.deegree.commons.utils.Pair<Integer,Integer> getLegendSize(int nr)
SLDStyledLayergetLegendSize in interface SLDStyledLayernr - DOCUMENT ME!public org.deegree.commons.utils.Pair<Integer,Integer> getLegendSize()
SLDStyledLayergetLegendSize in interface SLDStyledLayerpublic List<org.deegree.commons.utils.Pair<Integer,Integer>> getLegendSizes()
SLDStyledLayergetLegendSizes in interface SLDStyledLayerpublic void getLegend(int width,
int height,
Graphics2D g2d)
SLDStyledLayergetLegend in interface SLDStyledLayerwidth - DOCUMENT ME!height - DOCUMENT ME!g2d - DOCUMENT ME!public void getLegend(int nr,
int width,
int height,
Graphics2D g2d)
SLDStyledLayergetLegend in interface SLDStyledLayernr - DOCUMENT ME!width - DOCUMENT ME!height - DOCUMENT ME!g2d - DOCUMENT ME!public void getLegends(List<org.deegree.commons.utils.Pair<Integer,Integer>> sizes, Graphics2D[] g2d)
SLDStyledLayergetLegends in interface SLDStyledLayersizes - DOCUMENT ME!g2d - DOCUMENT ME!public void refreshFeatures()
public String getGeometryType()
UNKNOWN, if the features can have different geometriespublic int getMaxFeaturesPerPage()
public String[] getCalculatedAttributes()
public boolean isVisibleInBoundingBox(XBoundingBox box)
box - DOCUMENT ME!Copyright © 2012–2025 cismet GmbH. All rights reserved.