|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.datasource.IlvMapDataSource
ilog.views.maps.datasource.IlvHierarchicalDataSource
ilog.views.maps.format.IlvDefaultTilableDataSource
ilog.views.maps.format.wms.IlvWMSDataSource
public class IlvWMSDataSource
A data source for reading a URL that points to an OpenGIS-compliant map server.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource |
|---|
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter |
| Field Summary |
|---|
| Fields inherited from class ilog.views.maps.format.IlvDefaultTilableDataSource |
|---|
GeometryClassInformation |
| Fields inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource |
|---|
featureIterator, filename, nameMap, styleMap |
| Fields inherited from class ilog.views.maps.datasource.IlvMapDataSource |
|---|
renderer, usingGeodeticComputation |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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 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. |
double[] |
getBBox()
Retrieves the bounding box set by the setBBox method. |
IlvMapReusableFeatureIterator |
getFeatureIterator()
Retrieves the feature iterator used by this data source. |
String |
getImageFormat()
Retrieves the image format to be used in the the request to the WMS. |
float |
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...). 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. |
String |
makeLayerName(String name,
IlvGeometryClassFilter d)
Creates a layer name from a feature name and a geometry class. |
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(float 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. |
| Methods inherited from class ilog.views.maps.format.IlvDefaultTilableDataSource |
|---|
addLayer, createGenericTiles, createTiledLayers, getColumnCount, getFeatureFilterPropertyName, getFeatureName, getGeometryClassFilters, getGeometryClassInformation, getLatMax, getLatMin, getLayerOrder, getLonMax, getLonMin, getMonitoringData, getRowCount, getURL, isMultiThreaded, isUsingTiling, readInfo, reset, setAcceptedCodeList, setAreaOfinterest, setLayerOrder, setMonitoringData, setMultiThreaded, setTilingParameters, setupLayer, setupTiledLoaders, setURL |
| Methods inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource |
|---|
addCriterionFilter, createFeatureRenderer, createInsertionLayer, getCriterionFilters, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvVMAPDataSource to an
IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvDefaultTilableDataSourcestream - 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 IlvDefaultTilableDataSourceurl - file parameter.
public IlvMapReusableFeatureIterator getFeatureIterator()
getFeatureIterator in class IlvHierarchicalDataSourcepublic IlvWMSReader getReader()
IlvWMSReader .
IlvWMSReader used by this data source.public IlvMapLayer getInsertionLayer()
getInsertionLayer in class IlvMapDataSourcepublic boolean isPackingLayers()
true, if layers are packed, otherwise false.public void setPackingLayers(boolean p)
p - Set to true to pack layers, otherwise false.
public void start()
throws Exception
start in class IlvDefaultTilableDataSourceException
protected IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureValue,
IlvGeometryClassFilter geometryClass)
createTiledIterator in class IlvDefaultTilableDataSourcefeatureValue - 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 IlvDefaultTilableDataSourceIlvDefaultTilableDataSource.createDefaultFilter()public boolean acceptsCode(Object codeValue)
acceptsCode in class IlvDefaultTilableDataSourceprotected 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 IlvDefaultTilableDataSourcefileName - 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(float imageSize)
imageSize - Sets the image size.public float getImageSize()
public String makeLayerName(String name,
IlvGeometryClassFilter d)
makeLayerName in class IlvDefaultTilableDataSourcename - feature name.d - 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 IlvDefaultTilableDataSourcetrue, 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 double[] getBBox()
setBBox method.
setBBox method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||