thredds.catalog
Class InvDatasetFeatureCollection

java.lang.Object
  extended by thredds.catalog.InvDataset
      extended by thredds.catalog.InvDatasetImpl
          extended by thredds.catalog.InvCatalogRef
              extended by thredds.catalog.InvDatasetFeatureCollection
All Implemented Interfaces:
DatasetCollectionManager.TriggerListener
Direct Known Subclasses:
InvDatasetFcFmrc, InvDatasetFcPoint

@ThreadSafe
public abstract class InvDatasetFeatureCollection
extends InvCatalogRef
implements DatasetCollectionManager.TriggerListener

Feature Collection Dataset. This is a InvCatalogRef subclass. So the reference is placed in the parent, but the catalog itself isnt constructed until the following call from DataRootHandler.makeDynamicCatalog(): match.dataRoot.featCollection.makeCatalog(match.remaining, path, baseURI); Generate anew each call; use object caching if needed to improve efficiency

Since:
Mar 3, 2010
Author:
caron

Nested Class Summary
static class InvDatasetFeatureCollection.ScanFilter
           
protected  class InvDatasetFeatureCollection.State
           
 
Field Summary
protected  InvService cdmrService
           
protected  FeatureCollectionConfig config
           
protected  DatasetCollectionManager dcm
           
protected  FeatureType featureType
           
protected static String FILES
           
protected  Pattern filter
           
protected  Object lock
           
protected  String path
           
protected  InvDatasetFeatureCollection.State state
           
protected  String topDirectory
           
protected static String Virtual_Services
           
 
Fields inherited from class thredds.catalog.InvDatasetImpl
log, mark, ncmlElement, tm, tmi, tmi6
 
Fields inherited from class thredds.catalog.InvDataset
access, authorityName, catalog, collectionType, contributors, creators, dataFormatType, datasets, dataType, dates, defaultService, docs, gc, harvest, id, keywords, metadata, name, parent, projects, properties, publishers, restrictAccess, services, tc, variables
 
Constructor Summary
protected InvDatasetFeatureCollection(InvDatasetImpl parent, String name, String path, FeatureType featureType, FeatureCollectionConfig config)
           
 
Method Summary
protected abstract  InvDatasetFeatureCollection.State checkState()
           
static InvDatasetFeatureCollection factory(InvDatasetImpl parent, String name, String path, FeatureType featureType, FeatureCollectionConfig config)
           
protected  String getCatalogHref(String what)
           
 FeatureCollectionConfig getConfig()
           
 DatasetCollectionManager getDatasetCollectionManager()
           
 List<InvDataset> getDatasets()
          Get a list of all the nested datasets.
 FeatureDatasetPoint getFeatureDatasetPoint()
           
 File getFile(String remaining)
           
 GridDataset getGridDataset(String matchPath)
          Get the associated Grid Dataset, if any.
 NetcdfDataset getNetcdfDataset(String matchPath)
          Get the dataset named by the path.
 String getPath()
           
 InvDatasetScan getRawFileScan()
           
 String getTopDirectoryLocation()
           
 void handleCollectionEvent(DatasetCollectionManager.TriggerEvent event)
           
abstract  InvCatalogImpl makeCatalog(String match, String orgPath, URI baseURI)
          Get one one of the catalogs contained in this dataset, called by DataRootHandler.makeDynamicCatalog()
protected  InvCatalogImpl makeCatalogTop(URI baseURI, InvDatasetFeatureCollection.State localState)
          Make the containing catalog for this dataset
protected  InvService makeVirtualService(InvService org)
           
static void setCatalogServletName(String catServletName)
           
static void setCdmrFeatureServiceUrlPath(String urlPath)
           
static void setContext(String c)
           
 boolean triggerRescan()
           
abstract  void update()
           
abstract  void updateProto()
           
 
Methods inherited from class thredds.catalog.InvCatalogRef
equals, findDatasetByName, findProperty, findService, finish, getAccess, getAccess, getAlias, getAuthority, getCollectionType, getContributors, getCreators, getDataFormatType, getDataType, getDates, getDocumentation, getDocumentation, getFullName, getGeospatialCoverage, getID, getKeywords, getMark, getMetadata, getMetadata, getName, getParent, getProjects, getProperties, getProxyDataset, getPublishers, getServiceDefault, getTimeCoverage, getUniqueID, getURI, getUrlPath, getUserProperty, getVariables, getXlinkHref, hasAccess, hashCode, hasNestedDatasets, isHarvest, isRead, readAsynch, release, setXlinkHref
 
Methods inherited from class thredds.catalog.InvDatasetImpl
addAccess, addAccess, addDataset, addDataset, addDocumentation, addProperty, addService, canonicalize, dump, getAccessLocal, getDataSize, getLastModifiedDate, getLocalMetadata, getLocalMetadataInheritable, getNcmlElement, getParentReal, getServiceName, getServicesLocal, main, removeDataset, removeLocalMetadata, removeService, replaceDataset, resolve, setAlias, setAuthority, setCatalog, setCollectionType, setContributors, setDataFormatType, setDataSize, setDataType, setGeospatialCoverage, setHarvest, setID, setKeywords, setLastModifiedDate, setLastModifiedDate, setLocalMetadata, setMark, setName, setNcmlElement, setParent, setProjects, setPublishers, setResourceControl, setServiceName, setServicesLocal, setTimeCoverage, setUrlPath, setUserProperty, toString, transferMetadata, writeHtmlDescription, writeHtmlDescription
 
Methods inherited from class thredds.catalog.InvDataset
findAccess, getCatalogUrl, getHistory, getParentCatalog, getProcessing, getRestrictAccess, getRights, getSubsetUrl, getSummary, getVariables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FILES

protected static final String FILES
See Also:
Constant Field Values

Virtual_Services

protected static final String Virtual_Services
See Also:
Constant Field Values

path

protected final String path

featureType

protected final FeatureType featureType

config

protected final FeatureCollectionConfig config

cdmrService

protected InvService cdmrService

dcm

protected final DatasetCollectionManager dcm

topDirectory

protected final String topDirectory

filter

protected final Pattern filter

state

protected InvDatasetFeatureCollection.State state

lock

protected final Object lock
Constructor Detail

InvDatasetFeatureCollection

protected InvDatasetFeatureCollection(InvDatasetImpl parent,
                                      String name,
                                      String path,
                                      FeatureType featureType,
                                      FeatureCollectionConfig config)
Method Detail

setContext

public static void setContext(String c)

setCatalogServletName

public static void setCatalogServletName(String catServletName)

setCdmrFeatureServiceUrlPath

public static void setCdmrFeatureServiceUrlPath(String urlPath)

getCatalogHref

protected String getCatalogHref(String what)

factory

public static InvDatasetFeatureCollection factory(InvDatasetImpl parent,
                                                  String name,
                                                  String path,
                                                  FeatureType featureType,
                                                  FeatureCollectionConfig config)

handleCollectionEvent

public void handleCollectionEvent(DatasetCollectionManager.TriggerEvent event)
Specified by:
handleCollectionEvent in interface DatasetCollectionManager.TriggerListener

triggerRescan

public boolean triggerRescan()

update

public abstract void update()

updateProto

public abstract void updateProto()

checkState

protected abstract InvDatasetFeatureCollection.State checkState()
                                                         throws IOException
Throws:
IOException

getPath

public String getPath()

getTopDirectoryLocation

public String getTopDirectoryLocation()

getConfig

public FeatureCollectionConfig getConfig()

getDatasetCollectionManager

public DatasetCollectionManager getDatasetCollectionManager()

getRawFileScan

public InvDatasetScan getRawFileScan()

getDatasets

public List<InvDataset> getDatasets()
Description copied from class: InvCatalogRef
Get a list of all the nested datasets.

Overrides:
getDatasets in class InvCatalogRef
Returns:
Datasets. This triggers a read of the referenced catalog the first time its called.

makeVirtualService

protected InvService makeVirtualService(InvService org)

makeCatalog

public abstract InvCatalogImpl makeCatalog(String match,
                                           String orgPath,
                                           URI baseURI)
Get one one of the catalogs contained in this dataset, called by DataRootHandler.makeDynamicCatalog()

Parameters:
match - match.remaining
orgPath - the path for the request.
baseURI - the base URI for the catalog, used to resolve relative URLs.
Returns:
containing catalog

makeCatalogTop

protected InvCatalogImpl makeCatalogTop(URI baseURI,
                                        InvDatasetFeatureCollection.State localState)
                                 throws IOException,
                                        URISyntaxException
Make the containing catalog for this dataset

Parameters:
baseURI - base URI of the request
localState - current state to use
Returns:
the top FMRC catalog
Throws:
IOException - on I/O error
URISyntaxException - if path is misformed

getGridDataset

public GridDataset getGridDataset(String matchPath)
                           throws IOException
Get the associated Grid Dataset, if any. called by DatasetHandler.openGridDataset()

Parameters:
matchPath - match.remaining
Returns:
Grid Dataset, or null if n/a
Throws:
IOException - on error

getFeatureDatasetPoint

public FeatureDatasetPoint getFeatureDatasetPoint()

getNetcdfDataset

public NetcdfDataset getNetcdfDataset(String matchPath)
                               throws IOException
Get the dataset named by the path. called by DatasetHandler.getNetcdfFile() called by DatasetHandler.getNetcdfFile()

Parameters:
matchPath - remaining path from match
Returns:
requested dataset
Throws:
IOException - if read error

getFile

public File getFile(String remaining)


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.