org.deegree.services.wpvs.config
Class Dataset<CO>

java.lang.Object
  extended by org.deegree.services.wpvs.config.Dataset<CO>
Type Parameters:
CO - the constraint object.
Direct Known Subclasses:
ColormapDataset, DEMDataset, DEMTextureDataset, RenderableDataset

public abstract class Dataset<CO>
extends Object

The DatasetWrapper class defines methods for the retrieval of objects which match requested datasets types and a given ViewParams.

Version:
$Revision: 28710 $, $Date: 2010-12-10 13:52:18 +0100 (Fri, 10 Dec 2010) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Field Summary
protected static GeometryFactory geomFac
          The geometry factory to be used
 
Constructor Summary
Dataset()
           
 
Method Summary
protected  boolean addConstraint(String name, CO datasourceObject, Envelope bbt)
          Add a constrained to the given name of a dataset.
protected  Double clarifyMaxPixelError(Double parentMaxPixelError, Double maxPixelError)
           
 Set<String> datasetTitles()
           
abstract  Envelope fillFromDatasetDefinitions(Envelope sceneEnvelope, double[] translationToLocalCRS, XMLAdapter configAdapter, DatasetDefinitions dsd)
          Fill the wrapper with the values from the given dataset definition.
 List<CO> getAllDatasourceObjects()
          Iterates over all configured datasets and add them to the list
 List<CO> getMatchingDatasourceObjects(Collection<String> requestedDatasets, ViewParams viewParams)
          Matches the given names to the configured datasets and tests retrieves the datasources/datasets which match the names and the viewparams.
protected  boolean isUnAmbiguous(String name)
           
protected  URL resolve(XMLAdapter configAdapter, String url)
          Resolve the given url to the config xml file.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

geomFac

protected static final GeometryFactory geomFac
The geometry factory to be used

Constructor Detail

Dataset

public Dataset()
Method Detail

fillFromDatasetDefinitions

public abstract Envelope fillFromDatasetDefinitions(Envelope sceneEnvelope,
                                                    double[] translationToLocalCRS,
                                                    XMLAdapter configAdapter,
                                                    DatasetDefinitions dsd)
Fill the wrapper with the values from the given dataset definition.

Parameters:
sceneEnvelope - whic should be enlarged for all configured datasets, it is 3D!! in real world coordinates.
translationToLocalCRS - which was configured
configAdapter - to resolve urls
dsd - containing the datasets.
Returns:
the merged scene envelope

clarifyMaxPixelError

protected Double clarifyMaxPixelError(Double parentMaxPixelError,
                                      Double maxPixelError)
Parameters:
parentMaxPixelError -
maxPixelError -
Returns:
the parent or the max pixel error if not null.

isUnAmbiguous

protected boolean isUnAmbiguous(String name)
Parameters:
name - of dataset
Returns:
true if a dataset was previously defined with the given name.

size

public int size()
Returns:
the number of configured datasets.

addConstraint

protected boolean addConstraint(String name,
                                CO datasourceObject,
                                Envelope bbt)
Add a constrained to the given name of a dataset.

Parameters:
name -
datasourceObject -
bbt - in the WPVS scene coordinate system.
Returns:
true if no previous mapping for the given name was found.

getAllDatasourceObjects

public List<CO> getAllDatasourceObjects()
Iterates over all configured datasets and add them to the list

Returns:
the list of matching objects, never null

getMatchingDatasourceObjects

public List<CO> getMatchingDatasourceObjects(Collection<String> requestedDatasets,
                                             ViewParams viewParams)
Matches the given names to the configured datasets and tests retrieves the datasources/datasets which match the names and the viewparams.

Parameters:
requestedDatasets -
viewParams -
Returns:
the list of matching objects, never null

datasetTitles

public Set<String> datasetTitles()
Returns:
all configured and requestable titles known to this dataset type.

resolve

protected URL resolve(XMLAdapter configAdapter,
                      String url)
Resolve the given url to the config xml file.

Parameters:
configAdapter -
url -
Returns:
the URL resolved to the configuration xml file.


Copyright © 2011. All Rights Reserved.