public class IlvWMSDataSource extends IlvDefaultTilableDataSource
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
GeometryClassInformation
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvWMSDataSource(IlvInputStream stream)
Creates a new
IlvWMSDataSource . |
IlvWMSDataSource(IlvWMSReader reader)
Constructs an
IlvWMSDataSource from the specified reader. |
IlvWMSDataSource(URL url)
Constructs an
IlvWMSDataSource from the specified URL. |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsCode(Object codeValue)
Indicates if the current data source accepts the specified code value.
|
protected IlvDefaultFeatureFilter |
createDefaultFilter()
Returns a filter based on WMS layer names.
|
protected IlvMapReusableFeatureIterator |
createFeatureIterator(String fileName)
Method used in
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String) constructor to build the data source reader. |
protected IlvMapReusableFeatureIterator |
createFeatureIterator(URL url)
Method used in the
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL) constructor to build the data source reader. |
protected IlvMapRegionOfInterestIterator |
createTiledIterator(IlvFeatureClassInformation featureValue,
IlvGeometryClassFilter geometryClass)
Creates an iterator that iterates through the map features for a specific area of interest.
|
protected void |
createTiledLayers()
Creates the set of
IlvMapLayer to be used for tile management. |
double[] |
getBBox()
Retrieves the bounding box set by the
setBBox method. |
IlvMapReusableFeatureIterator |
getFeatureIterator()
Retrieves the feature iterator used by this data source.
|
protected IlvGeometryClassFilter[] |
getGeometryClassFilters()
By default, returns
IlvDefaultTilableDataSource.GeometryClassInformation |
String |
getImageFormat()
Retrieves the image format to be used in the the request to the WMS.
|
double |
getImageSize()
Retrieves the image size.
|
IlvMapLayer |
getInsertionLayer()
Retrieves the insertion layer.
|
String[] |
getLayers()
Retrieves the list of layers that are read by the data source.
|
IlvWMSReader |
getReader()
Retrieves the feature iterator as an
IlvWMSReader . |
String |
getRS()
Retrieves the reference system.
|
boolean |
getTransparency()
Indicates if the data source is generating transparent images.
|
String |
getVersion()
Retrieves the version information that is issued in the request to the WMS.
|
protected void |
initFeatureList()
Specific initialization done when data source is created.
|
boolean |
isFlatteningLayers()
Indicates if the data source produces only one
IlvMapLayer for all the requested layers
or one IlvMapLayer per requested layer. |
boolean |
isPackingLayers()
Indicates if the data source is trying to pack successive layers under
the same parent.
|
protected boolean |
isSourceDataAvailable()
Checks whether the source data this
IlvMapDataSource is
based on is available (file, database connection, url...). |
String |
makeLayerName(String name,
IlvGeometryClassFilter d)
Creates a layer name from a feature name and a geometry class.
|
void |
setAreaOfinterest(double lonMin,
double latMin,
double lonMax,
double latMax)
Sets the area outside of which data will not be fetched.
|
void |
setBBox(double[] bbox)
Sets the bounding box used by the feature iterator.
|
void |
setFlatteningLayers(boolean flatten)
Indicates to the data source if the layers should be flattened or not.
|
void |
setImageFormat(String f)
Sets the image format that is used in the request to the WMS.
|
void |
setImageSize(double imageSize)
Sets the image size (between 0 and 1).
|
void |
setLayers(String[] layers)
Sets the list of layers to be read by the data source.
|
void |
setPackingLayers(boolean p)
Indicates if the data source should try to pack the successive layers under
the same parent.
|
void |
setRS(String rs)
Sets the reference system.
|
void |
setTransparency(boolean transparency)
Indicates if this data source should generate transparent images.
|
void |
setVersion(String version)
Sets the version information to be issued in the request to the WMS.
|
void |
start()
Starts this data source.
|
void |
write(IlvOutputStream stream)
Writes this
IlvVMAPDataSource to an
IlvOutputStream . |
addLayer, createGenericTiles, getColumnCount, getFeatureFilterPropertyName, getFeatureName, getGeometryClassInformation, getLatMax, getLatMin, getLayerOrder, getLonMax, getLonMin, getMonitoringData, getRowCount, getURL, isMultiThreaded, isUsingTiling, readInfo, reset, setAcceptedCodeList, setLayerOrder, setMonitoringData, setMultiThreaded, setTilingParameters, setupLayer, setupTiledLoaders, setURL
addCriterionFilter, createFeatureRenderer, createInsertionLayer, createStyle, getCriterionFilters, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, getDescription, getManager, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isGrapherMode, isSaveBackupDataSources, isUsingBackupDataSource, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setGrapherMode, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions, toString
public IlvWMSDataSource(IlvInputStream stream) throws IlvReadFileException
IlvWMSDataSource
.stream
- The stream to read from.IlvReadFileException
public IlvWMSDataSource(IlvWMSReader reader) throws IOException
IlvWMSDataSource
from the specified reader.reader
- An IlvWMSReader
.IOException
public IlvWMSDataSource(URL url) throws IOException
IlvWMSDataSource
from the specified URL.url
- The URL of the server.IOException
public void write(IlvOutputStream stream) throws IOException
IlvVMAPDataSource
to an
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvDefaultTilableDataSource
stream
- The stream to write to.IOException
- thrown when an exception occurs during
the write operation for this object.IlvMapDataSource.write(ilog.views.io.IlvOutputStream)
protected IlvMapReusableFeatureIterator createFeatureIterator(URL url)
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL)
constructor to build the data source reader.
For example:protected void createFeatureIterator(URL urlName) { return new IlvS57Reader(urlName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
url
- The file parameter.public IlvMapReusableFeatureIterator getFeatureIterator()
getFeatureIterator
in class IlvDefaultTilableDataSource
null>/code>.
public IlvWMSReader getReader()
IlvWMSReader
.IlvWMSReader
used by this data source.public IlvMapLayer getInsertionLayer()
getInsertionLayer
in class IlvMapDataSource
public boolean isPackingLayers()
true
, if layers are packed, otherwise false
.public void setPackingLayers(boolean p)
p
- Set to true
to pack layers, otherwise false
.protected IlvGeometryClassFilter[] getGeometryClassFilters()
IlvDefaultTilableDataSource.GeometryClassInformation
getGeometryClassFilters
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.getGeometryClassFilters()
protected void createTiledLayers()
IlvMapLayer
to be used for tile management.
The default implementation creates one layer for each (selected feature code,geometry class) pair.createTiledLayers
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.setAcceptedCodeList(String[])
,
IlvDefaultTilableDataSource.getGeometryClassFilters()
public void start() throws Exception
start
in class IlvDefaultTilableDataSource
Exception
protected IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureValue, IlvGeometryClassFilter geometryClass)
createTiledIterator
in class IlvDefaultTilableDataSource
featureValue
- The feature value to filter features with.geometryClass
- The subclass of IlvMapGeometry
that prevents the mixing of different types of features in
the same layer.protected IlvDefaultFeatureFilter createDefaultFilter()
createDefaultFilter
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.createDefaultFilter()
public boolean acceptsCode(Object codeValue)
acceptsCode
in class IlvDefaultTilableDataSource
codeValue
- The code to look for.true
if the value is registered.protected void initFeatureList()
initFeatureList
in class IlvDefaultTilableDataSource
protected void initFeatureList()
{
readInfo("featureDescription.txt"); //$NON-NLS-1$
}
protected IlvMapReusableFeatureIterator createFeatureIterator(String fileName)
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String)
constructor to build the data source reader.
For example:protected void createFeatureIterator(String fileName) { return new IlvS57Reader(fileName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
fileName
- The file parameter.public void setLayers(String[] layers)
layers
- The list of layers to be read by the data source.public String[] getLayers()
public boolean isFlatteningLayers()
IlvMapLayer
for all the requested layers
or one IlvMapLayer
per requested layer.true
if only one layer is produced or false
if multilayers are produced.public void setImageFormat(String f)
f
- The image format that is used in the the request to the WMS.public String getImageFormat()
public void setFlatteningLayers(boolean flatten)
flatten
- Set to true
to flatten a layer, otherwise false
.public void setTransparency(boolean transparency)
transparency
- Set to true
to generate transparent images, otherwise false
.public boolean getTransparency()
true
if this data source generates transparent images, otherwise false
.public String getRS()
public void setRS(String rs)
rs
- The reference system.public String getVersion()
public void setVersion(String version)
version
- The version information to be issued in the request to the WMS.public void setImageSize(double imageSize)
imageSize
- Sets the image size.public double getImageSize()
public String makeLayerName(String name, IlvGeometryClassFilter d)
makeLayerName
in class IlvDefaultTilableDataSource
name
- The feature name.d
- The geometry class.protected boolean isSourceDataAvailable()
IlvMapDataSource
is
based on is available (file, database connection, url...). A
.ivl,
JViews Maps file keeps references to the original
sources the map was built from. It can happen that these sources are not available when
opening the map, for example, when the map is transferred to another machine. This method
checks that availability. In the case where these sources are not available, all operations
that need them are performed from the data embedded in the map, but there is a risk of loosing
information (when reprojecting for example).
This method should be overridden by subclasses.isSourceDataAvailable
in class IlvDefaultTilableDataSource
true
, if the original source data is available.public void setBBox(double[] bbox)
null
to allow the feature iterator to compute its bounding
box from the capabilities.bbox
- The bounding box.public void setAreaOfinterest(double lonMin, double latMin, double lonMax, double latMax)
setAreaOfinterest
in class IlvDefaultTilableDataSource
lonMin
- The minimum longitude of the area of interest.latMin
- The minimum latitude of the area of interest.lonMax
- The maximum longitude of the area of interest.latMax
- The maximum latitude of the area of interest.public double[] getBBox()
setBBox
method.setBBox
method.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.