|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.geotools.AbstractStyledLayer<
> skrueger.geotools.StyledFeatureCollection
public class StyledFeatureCollection
This class provides a simple implementation of StyledLayerInterface
for FeatureCollection
. The uncache functionality is not supported,
because this class bases on an existing FeatureCollection
object in
memory.
Field Summary | |
---|---|
protected AttributeMetadataMap |
attrMetaData
Holds the meta data for displaying a legend. |
Fields inherited from class skrueger.geotools.AbstractStyledLayer |
---|
crs, desc, envelope, geoObject, icon, id, keywords, LOGGER, style, title |
Constructor Summary | |
---|---|
StyledFeatureCollection(
Creates a styled FeatureCollection with non-translated
informations. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with non-translated
informations. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with a language-specific
title, no long description, no keywords, default attribute meta data and
no icon. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with language-specific
informations. |
|
StyledFeatureCollection(
Creates a styled FeatureCollection with language-specific
informations. |
Method Summary | |
---|---|
static AttributeMetadataMap |
createDefaultAttributeMetaDataMap(
Creates non-translated default meta data for a FeatureCollection
with all attributes visible and no unit set. |
protected Style |
createDefaultStyle()
Creates a default style for the FeatureCollection . |
void |
dispose()
Simply sets the AbstractStyledLayer.geoObject , AbstractStyledLayer.crs , AbstractStyledLayer.envelope and
attrMetaData to null . |
AttributeMetadataMap |
getAttributeMetaDataMap()
Returns the meta data needed for displaying a legend. |
|
getFeatureCollection()
Same as AbstractStyledLayer.getGeoObject() method, but complies to the
StyledFeaturesInterface . |
|
getFeatureCollectionFiltered()
Same as AbstractStyledLayer.getGeoObject() method, but complies to the
StyledFeaturesInterface . |
|
getFeatureSource()
Returns a virtual FeatureSource to access the
FeatureCollection . |
Filter |
getFilter()
Returns the Filter a filter that is associated with this StyledFeaturesInterface Never shall return null , but
rather Filter.INCLUDE. |
URL |
getInfoURL()
Returns the URL to a (HTML) file that provides more information
about this layer. |
SimpleFeatureType |
getSchema()
|
boolean |
isDisposed()
Tests whether the geo object is disposed. |
void |
setAttributeMetaData(AttributeMetadataMap attrMetaData)
Sets the meta data needed for displaying a legend. |
void |
setFilter(Filter filter)
Stores Filter that is NOT automatically applied. |
void |
uncache()
Does nothing, because the AbstractStyledLayer bases on existing
objects (in memory) which can not be uncached and reloaded. |
Methods inherited from class skrueger.geotools.AbstractStyledLayer |
---|
getCrs, getCRSString, getDesc, getEnvelope, getGeoObject, getId, getImageIcon, getKeywords, getStyle, getTitle, setDesc, setDesc, setImageIcon, setKeywords, setKeywords, setStyle, setTitle, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface skrueger.geotools.StyledFeaturesInterface |
---|
getGeoObject |
Methods inherited from interface skrueger.geotools.StyledLayerInterface |
---|
getCrs, getCRSString, getDesc, getEnvelope, getId, getImageIcon, getKeywords, getStyle, getTitle, setDesc, setImageIcon, setKeywords, setStyle, setTitle |
Field Detail |
---|
protected AttributeMetadataMap attrMetaData
Constructor Detail |
---|
public StyledFeatureCollection(fc, String id, Translation title, Translation desc, Translation keywords, Style style, AttributeMetadataMap attrMetaData, ImageIcon icon)
FeatureCollection
with language-specific
informations.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a (language-specific) short descriptiondesc
- a (language-specific) long descriptionkeywords
- (language-specific) keywords for the geo objectsstyle
- a display style (if null
, a default style is created)attrMetaData
- meta data for displaying a legendicon
- an icon for the object (can be null
)
IllegalArgumentException
- if null
is given as ID or geo objectpublic StyledFeatureCollection(fc, String id, Translation title, Translation desc, Translation keywords, StyledLayerStyle<AttributeMetadataMap> style, ImageIcon icon)
FeatureCollection
with language-specific
informations.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a (language-specific) short descriptiondesc
- a (language-specific) long descriptionkeywords
- (language-specific) keywords for the geo objectsstyle
- a display style with attribute meta data informationicon
- an icon for the object (can be null
)
IllegalArgumentException
- if null
is given as ID or geo objectpublic StyledFeatureCollection(fc, String id, Translation title, Style style)
FeatureCollection
with a language-specific
title, no long description, no keywords, default attribute meta data and
no icon.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a short descriptionstyle
- a display style (if null
, a default style is created)
IllegalArgumentException
- if null
is given as ID or geo object#createDefaultAttributeMetaDataMap(FeatureCollection)
public StyledFeatureCollection(fc, String id, String title, String desc, String keywords, Style style, AttributeMetadataMap attrMetaData, ImageIcon icon)
FeatureCollection
with non-translated
informations.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a short descriptiondesc
- a long descriptionkeywords
- keywords for the geo objectsstyle
- a display style (if null
, a default style is created)attrMetaData
- meta data for displaying a legendicon
- an icon for the object (can be null
)
IllegalArgumentException
- if null
is given as ID or geo objectpublic StyledFeatureCollection(fc, String id, String title, String desc, String keywords, StyledLayerStyle<AttributeMetadataMap> style, ImageIcon icon)
FeatureCollection
with non-translated
informations.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a short descriptiondesc
- a long descriptionkeywords
- keywords for the geo objectsstyle
- a display style with attribute meta data informationicon
- an icon for the object (can be null
)
IllegalArgumentException
- if null
is given as ID or geo objectpublic StyledFeatureCollection(fc, String id, String title, Style style)
FeatureCollection
with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a short descriptionstyle
- a display style (if null
, a default style is created)
IllegalArgumentException
- if null
is given as ID or geo object#createDefaultAttributeMetaDataMap(FeatureCollection)
public StyledFeatureCollection(fc, String id, String title, StyledLayerStyle<AttributeMetadataMap> style)
FeatureCollection
with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon.
fc
- the FeatureCollection
id
- a unique ID for the objecttitle
- a short descriptionstyle
- a display style (if null
, a default style is created)
IllegalArgumentException
- if null
is given as ID or geo object#createDefaultAttributeMetaDataMap(FeatureCollection)
Method Detail |
---|
protected Style createDefaultStyle()
FeatureCollection
.
createDefaultStyle
in class AbstractStyledLayer<>
FeatureUtil#createDefaultStyle(FeatureCollection)
public AttributeMetadataMap getAttributeMetaDataMap()
getAttributeMetaDataMap
in interface StyledFeaturesInterface<>
public void setAttributeMetaData(AttributeMetadataMap attrMetaData)
legendData
is null
an empty map is set, so
getAttributeMetaDataMap()
never returns null
.
attrMetaData
- map of attribute meta datapublic static AttributeMetadataMap createDefaultAttributeMetaDataMap(fc)
FeatureCollection
with all attributes visible and no unit set.
fc
- a FeatureCollection
public void dispose()
AbstractStyledLayer.geoObject
, AbstractStyledLayer.crs
, AbstractStyledLayer.envelope
and
attrMetaData
to null
.
dispose
in interface StyledLayerInterface<>
public boolean isDisposed()
isDisposed
in interface StyledLayerInterface<>
public void uncache()
AbstractStyledLayer
bases on existing
objects (in memory) which can not be uncached and reloaded.
uncache
in interface StyledLayerInterface<>
public URL getInfoURL()
StyledLayerInterface
URL
to a (HTML) file that provides more information
about this layer. If no HTML if associated with this
StyledLayerInterface
, then null
will be returned.
getInfoURL
in interface StyledLayerInterface<>
URL
publicgetFeatureCollection()
AbstractStyledLayer.getGeoObject()
method, but complies to the
StyledFeaturesInterface
. The associated Filter
is NOT
automatically applied.
getFeatureCollection
in interface StyledFeaturesInterface<>
FeatureCollection
. The
filter is NOT automatically applied.StyledFeaturesInterface}
,
getFeatureCollectionFiltered()
publicgetFeatureCollectionFiltered()
AbstractStyledLayer.getGeoObject()
method, but complies to the
StyledFeaturesInterface
. The associated Filter
is
automatically applied by creating a SubFeatureCollection
.
getFeatureCollectionFiltered
in interface StyledFeaturesInterface<>
FeatureCollection
. The
associated Filter is automatically applied.StyledFeaturesInterface}
,
getFeatureCollectionFiltered()
publicgetFeatureSource()
FeatureSource
to access the
FeatureCollection
. Once created, it will be reused until
uncache()
is called.
getFeatureSource
in interface StyledFeaturesInterface<>
FeatureSource
. The filter
is NOT automatically applied.StyledFeaturesInterface}
public Filter getFilter()
StyledFeaturesInterface
StyledFeaturesInterface
Never shall return null
, but
rather Filter.INCLUDE.
getFilter
in interface StyledFeaturesInterface<>
public void setFilter(Filter filter)
StyledFeaturesInterface
null
is not
allowed, use Filter.INCLUDE.
setFilter
in interface StyledFeaturesInterface<>
public SimpleFeatureType getSchema()
getSchema
in interface StyledFeaturesInterface<>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |