public abstract class IlvDefaultTilableDataSource extends IlvHierarchicalDataSource
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
Modifier and Type | Field and Description |
---|---|
static IlvGeometryClassFilter[] |
GeometryClassInformation
List of geometries managed by the tilable datasource.
|
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvDefaultTilableDataSource(IlvInputStream stream)
Constructs an
IlvDefaultTilableDataSource from the specified
IlvInputStream |
IlvDefaultTilableDataSource(String filename)
Constructs a
IlvDefaultTilableDataSource from the specified file name. |
IlvDefaultTilableDataSource(URL url)
Constructs an
IlvDefaultTilableDataSource 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 void |
addLayer(IlvMapLayer parent,
IlvMapLayer layer)
Adds a specified
IlvMapLayer in the specified parent layer. |
protected IlvDefaultFeatureFilter |
createDefaultFilter()
Creates, at construction time, the filter that will be used to separate
features into layers.
|
protected abstract IlvMapReusableFeatureIterator |
createFeatureIterator(String fileName)
Method used in
IlvDefaultTilableDataSource(String) constructor to build the data source reader. |
protected abstract IlvMapReusableFeatureIterator |
createFeatureIterator(URL urlName)
Method used in the
IlvDefaultTilableDataSource(URL) constructor to build the data source reader. |
protected void |
createGenericTiles(IlvTileController tileController,
IlvCoordinateTransformation tr)
This method creates the free tiles in the tiled layer
|
protected abstract IlvMapRegionOfInterestIterator |
createTiledIterator(IlvFeatureClassInformation featureClass,
IlvGeometryClassFilter geometryClass)
Should create the specific
IlvMapRegionOfInterestIterator to be used for this data source. |
protected void |
createTiledLayers()
Creates the set of
IlvMapLayer to be used for tile management. |
int |
getColumnCount()
Returns the tile column Count.
|
protected String |
getFeatureFilterPropertyName()
Deprecated.
since JViews 8.1, this method is deprecated and should be replaced by an implementation of
createDefaultFilter() |
IlvMapReusableFeatureIterator |
getFeatureIterator()
Retrieves the feature iterator used by this data source.
|
Object |
getFeatureName(Object codeValue)
Returns the feature name for the feature code passed or null.
|
protected IlvGeometryClassFilter[] |
getGeometryClassFilters()
By default, returns
GeometryClassInformation |
IlvGeometryClassFilter |
getGeometryClassInformation(IlvMapFeature feature)
Returns the geometry class information for the selected feature.
|
double |
getLatMax()
Returns the latitude Maximum.
|
double |
getLatMin()
Returns the latitude Minimum.
|
protected Integer |
getLayerOrder(IlvMapLayer layer)
A utility method that retrieves the map layer order.
|
double |
getLonMax()
Returns the longitude Maximum.
|
double |
getLonMin()
Returns the longitude Minimum..
|
IlvThreadMonitoringData |
getMonitoringData()
Returns the monitorData.
|
int |
getRowCount()
Returns the tile row Count.
|
URL |
getURL()
Retrieves the
URL given at construction time. |
protected abstract void |
initFeatureList()
Specific initialization done when data source is created.
|
boolean |
isMultiThreaded()
Returns whether the tiled layer created by this data source uses
multithreading to load tiles
|
protected boolean |
isSourceDataAvailable()
Checks whether the source data this
IlvMapDataSource is
based on is available (file, database connection, url...). |
boolean |
isUsingTiling()
Returns whether tiling is used.
|
String |
makeLayerName(String name,
IlvGeometryClassFilter d)
Creates a layer name from a feature name and a geometry class.
|
void |
readInfo(String info)
Creates the table of attributes values from a text file description.
|
void |
reset()
Resets the data source.
|
void |
setAcceptedCodeList(String[] codes)
Sets the list of accepted object codes
|
void |
setAreaOfinterest(double lonMin,
double latMin,
double lonMax,
double latMax)
Sets the area outside of which data will not be fetched.
|
protected void |
setLayerOrder(IlvMapLayer layer,
Integer order)
A utility method that stores the map layer order.
|
void |
setMonitoringData(IlvThreadMonitoringData monitorData)
Sets the monitor data.
|
void |
setMultiThreaded(boolean t)
Indicates whether the tiled layer created by this data source will use
multithreading to load tiles.
|
void |
setTilingParameters(boolean useTiling,
int rows,
int columns)
Sets tiling parameters for this data source.
|
protected void |
setupLayer(IlvMapLayer layer,
IlvMapFeature feature)
This method has been overridden so the preferred order in the layer is also
stored.
|
protected void |
setupTiledLoaders()
Sets up tile loader for all map layer children of the insertion layer.
|
void |
setURL(URL url)
Sets the
URL . |
void |
start()
Starts this data source.
|
void |
write(IlvOutputStream stream)
Writes this
IlvVMAPDataSource to an
IlvOutputStream . |
addCriterionFilter, createFeatureRenderer, createInsertionLayer, createStyle, getCriterionFilters, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, getStyle, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, getDescription, getInsertionLayer, 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 static IlvGeometryClassFilter[] GeometryClassInformation
public IlvDefaultTilableDataSource(IlvInputStream stream) throws IlvReadFileException
IlvDefaultTilableDataSource
from the specified
IlvInputStream
stream
- The input stream to read fromIlvReadFileException
public IlvDefaultTilableDataSource(String filename) throws MalformedURLException
IlvDefaultTilableDataSource
from the specified file name.filename
- The name of the file to read.MalformedURLException
- if the path cannot be parsed as a URLpublic IlvDefaultTilableDataSource(URL url) throws IOException
IlvDefaultTilableDataSource
from the specified url.url
- The URL to read from.IOException
public IlvMapReusableFeatureIterator getFeatureIterator()
getFeatureIterator
in class IlvHierarchicalDataSource
null>/code>.
public boolean acceptsCode(Object codeValue)
codeValue
- The code to look for.true
if the value is registered.public void reset()
reset
in class IlvHierarchicalDataSource
IlvMapDataSource.reset()
public void setAreaOfinterest(double lonMin, double latMin, double lonMax, double latMax)
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 void setTilingParameters(boolean useTiling, int rows, int columns)
useTiling
- If true
, this data source will use the load-on-demand
mechanism for loading data. If false
, all
the data will be loaded when the start
method is
called.rows
- The number of rows of tiles (only when useTiling
is
true
);columns
- The number of columns of tiles (only when useTiling
is
true
);public void write(IlvOutputStream stream) throws IOException
IlvVMAPDataSource
to an
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvHierarchicalDataSource
stream
- The stream to write to.IOException
protected void createGenericTiles(IlvTileController tileController, IlvCoordinateTransformation tr)
tileController
- The IlvTileController
for the tiled layer of this data source.tr
- The coordinate transformation between the source coordinate system and
the map (destination) coordinate system.public int getColumnCount()
public double getLatMax()
public double getLatMin()
public double getLonMax()
public double getLonMin()
public int getRowCount()
public boolean isUsingTiling()
true
if tiling is used.public void start() throws Exception
start
in class IlvHierarchicalDataSource
Exception
protected void setupTiledLoaders()
public boolean isMultiThreaded()
true
if multithreading is used to load tiles.public void setMultiThreaded(boolean t)
t
- true
if multithreading will be used to load tilespublic IlvGeometryClassFilter getGeometryClassInformation(IlvMapFeature feature)
feature
- The feature used to search for a geometry class.protected IlvGeometryClassFilter[] getGeometryClassFilters()
GeometryClassInformation
public void readInfo(String info)
readInfo
in class IlvHierarchicalDataSource
info
- The description file.IlvHierarchicalDataSource.readInfo(java.lang.String)
public String makeLayerName(String name, IlvGeometryClassFilter d)
name
- The feature name.d
- The geometry class.protected void createTiledLayers()
IlvMapLayer
to be used for tile management.
The default implementation creates one layer for each (selected feature code,geometry class) pair.protected void setupLayer(IlvMapLayer layer, IlvMapFeature feature)
setupLayer
in class IlvHierarchicalDataSource
layer
- The layer.feature
- The feature.IlvHierarchicalDataSource.setupLayer(ilog.views.maps.beans.IlvMapLayer, ilog.views.maps.IlvMapFeature)
public Object getFeatureName(Object codeValue)
codeValue
- The value of the feature property.null
.public void setAcceptedCodeList(String[] codes)
codes
- An array of accepted object codes (decimal values).protected IlvDefaultFeatureFilter createDefaultFilter()
IlvDefaultFeatureFilter
instance and pass the property used to split features.protected abstract IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureClass, IlvGeometryClassFilter geometryClass)
IlvMapRegionOfInterestIterator
to be used for this data source.
For example:protected IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureValue,IlvGeometryClassFilter geometryClass) { // retrieve a default iterator IlvS57Reader initial = (IlvS57Reader) getFeatureIterator(); // and create a new one which filters the specific geomerty and feature classes. return initial.deriveReader(featureValue,geometryClass); }
featureClass
- The information on which the feature code will be filtered.geometryClass
- The information for which the geometry class is acceptable.protected abstract void initFeatureList()
protected abstract IlvMapReusableFeatureIterator createFeatureIterator(String fileName) throws IOException
IlvDefaultTilableDataSource(String)
constructor to build the data source reader.
For example:protected void createFeatureIterator(String fileName) { return new IlvS57Reader(fileName); }
fileName
- The file parameter.IOException
protected abstract IlvMapReusableFeatureIterator createFeatureIterator(URL urlName) throws IOException
IlvDefaultTilableDataSource(URL)
constructor to build the data source reader.
For example:protected void createFeatureIterator(URL urlName) { return new IlvS57Reader(urlName); }
urlName
- The file parameter.IOException
@Deprecated protected String getFeatureFilterPropertyName()
createDefaultFilter()
IlvDefaultFeatureFilter
on the data source at construction time.public IlvThreadMonitoringData getMonitoringData()
public void setMonitoringData(IlvThreadMonitoringData monitorData)
monitorData
- The monitorData to set.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 IlvMapDataSource
true
, if the original source data is available.public URL getURL()
URL
given at construction time.URL
given at construction time.public void setURL(URL url)
URL
.url
- The URL
to set.protected void addLayer(IlvMapLayer parent, IlvMapLayer layer)
IlvMapLayer
in the specified parent layer.addLayer
in class IlvHierarchicalDataSource
parent
- The parent layer.layer
- The IlvMapLayer
to add.protected void setLayerOrder(IlvMapLayer layer, Integer order)
layer
- The layer to changeorder
- The order indicator.protected Integer getLayerOrder(IlvMapLayer layer)
layer
- The map layer.null
if the order has not has been set.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.