|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.geotools.AbstractStyledLayer<FeatureCollection>
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 Map<Integer,AttributeMetaData> |
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(FeatureCollection fc,
String id,
String title,
String desc,
String keywords,
StyledLayerStyle<Map<Integer,AttributeMetaData>> style,
ImageIcon icon)
Creates a styled FeatureCollection with non-translated
informations. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
String title,
String desc,
String keywords,
Style style,
Map<Integer,AttributeMetaData> attrMetaData,
ImageIcon icon)
Creates a styled FeatureCollection with non-translated
informations. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
String title,
Style style)
Creates a styled FeatureCollection with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
String title,
StyledLayerStyle<Map<Integer,AttributeMetaData>> style)
Creates a styled FeatureCollection with a non-translated title,
no long description, no keywords, default attribute meta data and no
icon. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
Translation title,
Style style)
Creates a styled FeatureCollection with a language-specific
title, no long description, no keywords, default attribute meta data and
no icon. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
Translation title,
Translation desc,
Translation keywords,
StyledLayerStyle<Map<Integer,AttributeMetaData>> style,
ImageIcon icon)
Creates a styled FeatureCollection with language-specific
informations. |
|
StyledFeatureCollection(FeatureCollection fc,
String id,
Translation title,
Translation desc,
Translation keywords,
Style style,
Map<Integer,AttributeMetaData> attrMetaData,
ImageIcon icon)
Creates a styled FeatureCollection with language-specific
informations. |
Method Summary | |
---|---|
static Map<Integer,AttributeMetaData> |
createDefaultAttributeMetaDataMap(FeatureCollection fc)
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 . |
Map<Integer,AttributeMetaData> |
getAttributeMetaDataMap()
Returns the meta data needed for displaying a legend. |
FeatureCollection |
getFeatureCollection()
Same as AbstractStyledLayer.getGeoObject() method, but complies to the StyledFeaturesInterface |
FeatureSource |
getFeatureSource()
Returns a virtual FeatureSource to access the
FeatureCollection . |
URL |
getInfoURL()
Returns the URL to a (HTML) file that provides more information
about this layer. |
boolean |
isDisposed()
Tests whether the geo object is disposed. |
void |
setAttributeMetaData(Map<Integer,AttributeMetaData> attrMetaData)
Sets the meta data needed for displaying a legend. |
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.StyledLayerInterface |
---|
getCrs, getCRSString, getDesc, getEnvelope, getGeoObject, getId, getImageIcon, getKeywords, getStyle, getTitle, setDesc, setImageIcon, setKeywords, setStyle, setTitle |
Field Detail |
---|
protected Map<Integer,AttributeMetaData> attrMetaData
Constructor Detail |
---|
public StyledFeatureCollection(FeatureCollection fc, String id, Translation title, Translation desc, Translation keywords, Style style, Map<Integer,AttributeMetaData> 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(FeatureCollection fc, String id, Translation title, Translation desc, Translation keywords, StyledLayerStyle<Map<Integer,AttributeMetaData>> 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(FeatureCollection 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 objectcreateDefaultAttributeMetaDataMap(FeatureCollection)
public StyledFeatureCollection(FeatureCollection fc, String id, String title, String desc, String keywords, Style style, Map<Integer,AttributeMetaData> 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(FeatureCollection fc, String id, String title, String desc, String keywords, StyledLayerStyle<Map<Integer,AttributeMetaData>> 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(FeatureCollection 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 objectcreateDefaultAttributeMetaDataMap(FeatureCollection)
public StyledFeatureCollection(FeatureCollection fc, String id, String title, StyledLayerStyle<Map<Integer,AttributeMetaData>> 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 objectcreateDefaultAttributeMetaDataMap(FeatureCollection)
Method Detail |
---|
protected Style createDefaultStyle()
FeatureCollection
.
createDefaultStyle
in class AbstractStyledLayer<FeatureCollection>
FeatureUtil.createDefaultStyle(FeatureCollection)
public Map<Integer,AttributeMetaData> getAttributeMetaDataMap()
getAttributeMetaDataMap
in interface StyledFeaturesInterface<FeatureCollection>
public void setAttributeMetaData(Map<Integer,AttributeMetaData> attrMetaData)
legendData
is null
an empty map is set, so
getAttributeMetaDataMap()
never returns null
.
attrMetaData
- map of attribute meta datapublic static Map<Integer,AttributeMetaData> createDefaultAttributeMetaDataMap(FeatureCollection 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<FeatureCollection>
public boolean isDisposed()
isDisposed
in interface StyledLayerInterface<FeatureCollection>
public void uncache()
AbstractStyledLayer
bases on existing
objects (in memory) which can not be uncached and reloaded.
uncache
in interface StyledLayerInterface<FeatureCollection>
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<FeatureCollection>
URL
public FeatureCollection getFeatureCollection()
AbstractStyledLayer.getGeoObject()
method, but complies to the StyledFeaturesInterface
getFeatureCollection
in interface StyledFeaturesInterface<FeatureCollection>
FeatureCollection
.StyledFeaturesInterface}
public FeatureSource getFeatureSource()
FeatureSource
to access the
FeatureCollection
. Once created, it will be reused until
uncache()
is called.
getFeatureSource
in interface StyledFeaturesInterface<FeatureCollection>
FeatureSource
.StyledFeaturesInterface}
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |