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 java.lang.Object

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

Version:
$Revision: 24672 $, $Date: 2010-06-01 19:15:22 +0200 (Di, 01. Jun 2010) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Field Summary
protected static org.deegree.geometry.GeometryFactory geomFac
          The geometry factory to be used
 
Constructor Summary
Dataset()
           
 
Method Summary
protected  boolean addConstraint(java.lang.String name, CO datasourceObject, org.deegree.geometry.Envelope bbt)
          Add a constrained to the given name of a dataset.
protected  java.lang.Double clarifyMaxPixelError(java.lang.Double parentMaxPixelError, java.lang.Double maxPixelError)
           
 java.util.Set<java.lang.String> datasetTitles()
           
abstract  org.deegree.geometry.Envelope fillFromDatasetDefinitions(org.deegree.geometry.Envelope sceneEnvelope, double[] translationToLocalCRS, org.deegree.commons.xml.XMLAdapter configAdapter, DatasetDefinitions dsd)
          Fill the wrapper with the values from the given dataset definition.
 java.util.List<CO> getAllDatasourceObjects()
          Iterates over all configured datasets and add them to the list
 java.util.List<CO> getMatchingDatasourceObjects(java.util.Collection<java.lang.String> requestedDatasets, org.deegree.rendering.r3d.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(java.lang.String name)
           
protected  java.net.URL resolve(org.deegree.commons.xml.XMLAdapter configAdapter, java.lang.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 org.deegree.geometry.GeometryFactory geomFac
The geometry factory to be used

Constructor Detail

Dataset

public Dataset()
Method Detail

fillFromDatasetDefinitions

public abstract org.deegree.geometry.Envelope fillFromDatasetDefinitions(org.deegree.geometry.Envelope sceneEnvelope,
                                                                         double[] translationToLocalCRS,
                                                                         org.deegree.commons.xml.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 java.lang.Double clarifyMaxPixelError(java.lang.Double parentMaxPixelError,
                                                java.lang.Double maxPixelError)
Parameters:
parentMaxPixelError -
maxPixelError -
Returns:
the parent or the max pixel error if not null.

isUnAmbiguous

protected boolean isUnAmbiguous(java.lang.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(java.lang.String name,
                                CO datasourceObject,
                                org.deegree.geometry.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 java.util.List<CO> getAllDatasourceObjects()
Iterates over all configured datasets and add them to the list

Returns:
the list of matching objects, never null

getMatchingDatasourceObjects

public java.util.List<CO> getMatchingDatasourceObjects(java.util.Collection<java.lang.String> requestedDatasets,
                                                       org.deegree.rendering.r3d.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 java.util.Set<java.lang.String> datasetTitles()
Returns:
all configured and requestable titles known to this dataset type.

resolve

protected java.net.URL resolve(org.deegree.commons.xml.XMLAdapter configAdapter,
                               java.lang.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.