|
||||||||||
| PREV CLASS Documentation homepage 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
public abstract class IlvDefaultTilableDataSource
An abstract base class for data sources capable of creating a hierarchical set of tiled layers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource |
|---|
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter |
| Field Summary | |
|---|---|
static IlvGeometryClassFilter[] |
GeometryClassInformation
List of geometries managed by tilable datasource. |
| 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 | |
|---|---|
IlvDefaultTilableDataSource(IlvInputStream stream)
Constructs a IlvDefaultTilableDataSource from the specified
IlvInputStream |
|
IlvDefaultTilableDataSource(String filename)
Constructs a IlvDefaultTilableDataSource from the specified file name. |
|
IlvDefaultTilableDataSource(URL url)
Constructs a IlvDefaultTilableDataSource from the specified url. |
|
| Method Summary | |
|---|---|
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 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() |
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 Max. |
double |
getLatMin()
Returns the latitude Min. |
protected Integer |
getLayerOrder(IlvMapLayer layer)
A utility method that retrieves the map layer order. |
double |
getLonMax()
Returns the longitude Max. |
double |
getLonMin()
Returns the longitude Min. |
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 layers 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. |
| Methods inherited from class ilog.views.maps.datasource.IlvHierarchicalDataSource |
|---|
addCriterionFilter, createFeatureRenderer, createInsertionLayer, getCriterionFilters, getFeatureIterator, 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 |
| Field Detail |
|---|
public static IlvGeometryClassFilter[] GeometryClassInformation
| Constructor Detail |
|---|
public IlvDefaultTilableDataSource(IlvInputStream stream)
throws IlvReadFileException
IlvDefaultTilableDataSource from the specified
IlvInputStream
stream - the input stream to read from
IlvReadFileException
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 URL
public IlvDefaultTilableDataSource(URL url)
throws IOException
IlvDefaultTilableDataSource from the specified url.
url - The URL to read from.
IOException| Method Detail |
|---|
public boolean acceptsCode(Object codeValue)
codeValue -
public void reset()
reset in class IlvHierarchicalDataSourceIlvMapDataSource.reset()
public void setAreaOfinterest(double lonMin,
double latMin,
double lonMax,
double latMax)
lonMin - Minimum longitude of the area of interest.latMin - Minimum latitude of the area of interest.lonMax - Maximum longitude of the area of interest.latMax - 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 - Number of rows of tiles (only when useTiling is
true);columns - Number of columns of tiles (only when useTiling is
true);
public void write(IlvOutputStream stream)
throws IOException
IlvVMAPDataSource to an
IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvHierarchicalDataSourcestream - The stream to write to.
IOException
protected void createGenericTiles(IlvTileController tileController,
IlvCoordinateTransformation tr)
tileController - the IlvTileController this data source's tiled
layertr - the coordinate transformation between source coordinate system and
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()
public void start()
throws Exception
start in class IlvHierarchicalDataSourceExceptionprotected void setupTiledLoaders()
public boolean isMultiThreaded()
public void setMultiThreaded(boolean t)
t - boolean, true if multi threaded, false if not.public IlvGeometryClassFilter getGeometryClassInformation(IlvMapFeature feature)
feature - feature to search for a geometry class.
protected IlvGeometryClassFilter[] getGeometryClassFilters()
GeometryClassInformation
public void readInfo(String info)
readInfo in class IlvHierarchicalDataSourceinfo - the description file.IlvHierarchicalDataSource.readInfo(java.lang.String)
public String makeLayerName(String name,
IlvGeometryClassFilter d)
name - feature name.d - 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.
setAcceptedCodeList(String[]),
getGeometryClassFilters()
protected void setupLayer(IlvMapLayer layer,
IlvMapFeature feature)
setupLayer in class IlvHierarchicalDataSourcelayer - The layer.feature - The feature.IlvHierarchicalDataSource.setupLayer(ilog.views.maps.beans.IlvMapLayer, ilog.views.maps.IlvMapFeature)public Object getFeatureName(Object codeValue)
codeValue - value of the feature property.
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 - information on which feature code should be filtered.geometryClass - information on which geometry class is acceptable.
protected abstract void initFeatureList()
protected void initFeatureList()
{
readInfo("featureDescription.txt"); //$NON-NLS-1$
}
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 - 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 - file parameter.
IOExceptionprotected 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 IlvMapDataSourcetrue, 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 IlvHierarchicalDataSourceparent - 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.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||