public class InvDatasetScan extends InvCatalogRef
Used by the THREDDS Data Server (TDS) to automatically generate catalogs.
Typically built from the information given by a datasetScan element in a TDS config catalog.
Usage notes:
Should be thread safe except that the above two usage notes are not enforced.
mark, ncmlElement, tm, tmi
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, variableMapLink, variables
Constructor and Description |
---|
InvDatasetScan(InvCatalogImpl catalog,
InvDatasetImpl parent,
java.lang.String name,
java.lang.String path,
java.lang.String scanLocation,
CrawlableDatasetFilter filter,
boolean addDatasetSize,
java.lang.String addLatest,
boolean sortOrderIncreasing,
java.lang.String datasetNameMatchPattern,
java.lang.String startTimeSubstitutionPattern,
java.lang.String duration)
Constructor.
|
InvDatasetScan(InvCatalogImpl catalog,
InvDatasetImpl parent,
java.lang.String name,
java.lang.String path,
java.lang.String scanLocation,
java.lang.String filter,
boolean addDatasetSize,
java.lang.String addLatest,
boolean sortOrderIncreasing,
java.lang.String datasetNameMatchPattern,
java.lang.String startTimeSubstitutionPattern,
java.lang.String duration)
Constructor.
|
InvDatasetScan(InvDatasetImpl parent,
java.lang.String name,
java.lang.String path,
java.lang.String scanLocation,
java.lang.String id,
InvDatasetScan from) |
InvDatasetScan(InvDatasetImpl parent,
java.lang.String name,
java.lang.String path,
java.lang.String scanLocation,
java.lang.String configClassName,
java.lang.Object configObj,
CrawlableDatasetFilter filter,
CrawlableDatasetLabeler identifier,
CrawlableDatasetLabeler namer,
boolean addDatasetSize,
CrawlableDatasetSorter sorter,
java.util.Map<java.lang.String,ProxyDatasetHandler> proxyDatasetHandlers,
java.util.List<DatasetEnhancer> childEnhancerList,
CatalogRefExpander catalogRefExpander) |
Modifier and Type | Method and Description |
---|---|
boolean |
getAddDatasetSize() |
CatalogRefExpander |
getCatalogRefExpander() |
java.util.List<DatasetEnhancer> |
getChildEnhancerList() |
java.lang.String |
getCrDsClassName() |
java.lang.Object |
getCrDsConfigObj() |
CrawlableDatasetFilter |
getFilter() |
CrawlableDatasetLabeler |
getIdentifier() |
java.lang.String |
getInvalidMessage() |
CrawlableDatasetLabeler |
getNamer() |
java.lang.String |
getPath() |
java.util.Map<java.lang.String,ProxyDatasetHandler> |
getProxyDatasetHandlers() |
java.lang.String |
getScanLocation() |
CrawlableDatasetSorter |
getSorter() |
boolean |
isRead() |
boolean |
isValid() |
InvCatalogImpl |
makeCatalogForDirectory(java.lang.String orgPath,
java.net.URI catURI)
Try to build a catalog for the given path by scanning the location
associated with this InvDatasetScan.
|
InvCatalog |
makeLatestCatalogForDirectory(java.lang.String orgPath,
java.net.URI baseURI)
Deprecated.
Instead use
makeProxyDsResolver() which provides more general proxy dataset handling. |
InvCatalogImpl |
makeProxyDsResolverCatalog(java.lang.String path,
java.net.URI baseURI)
Try to build a catalog for the given resolver path by scanning the
location associated with this InvDatasetScan.
|
CrawlableDataset |
requestCrawlableDataset(java.lang.String path)
Return the CrawlableDataset for the given path, null if this InvDatasetScan
does not allow (filters out) the requested CrawlableDataset.
|
static void |
setCatalogServletName(java.lang.String catServletName) |
static void |
setContext(java.lang.String c) |
void |
setScanLocation(java.lang.String scanLocation)
Resets the location being scanned (DO NOT USE THIS METHOD, "public by accident").
|
java.lang.String |
translatePathToLocation(java.lang.String dsPath)
Return the CrawlableDataset path/location that corresponds to the
given dataset path.
|
equals, findDatasetByName, findProperty, findService, finish, getAccess, getAccess, getAlias, getAuthority, getCalendarDateCoverage, getCollectionType, getContributors, getCreators, getDataFormatType, getDatasets, getDataType, getDates, getDocumentation, getDocumentation, getFullName, getGeospatialCoverage, getID, getKeywords, getMark, getMetadata, getMetadata, getName, getParent, getProjects, getProperties, getProxyDataset, getPublishers, getServiceDefault, getUniqueID, getURI, getUrlPath, getUserProperty, getVariableMapLink, getVariables, getXlinkHref, hasAccess, hashCode, hasNestedDatasets, isHarvest, readAsynch, release, setXlinkHref, useRemoteCatalogService
addAccess, addAccess, addDataset, addDataset, addDocumentation, addProperty, addService, canonicalize, dump, getAccessLocal, getDataSize, getLastModifiedDate, getLocalMetadata, getLocalMetadataInheritable, getNcmlElement, getParentReal, getServiceName, getServicesLocal, 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, setTimeCoverage, setUrlPath, setUserProperty, toString, transferMetadata, writeHtmlDescription, writeHtmlDescription
findAccess, getCatalogUrl, getHistory, getParentCatalog, getProcessing, getRestrictAccess, getRights, getSubsetUrl, getSummary, getTimeCoverage, getVariables
public InvDatasetScan(InvDatasetImpl parent, java.lang.String name, java.lang.String path, java.lang.String scanLocation, java.lang.String id, InvDatasetScan from)
public InvDatasetScan(InvCatalogImpl catalog, InvDatasetImpl parent, java.lang.String name, java.lang.String path, java.lang.String scanLocation, java.lang.String filter, boolean addDatasetSize, java.lang.String addLatest, boolean sortOrderIncreasing, java.lang.String datasetNameMatchPattern, java.lang.String startTimeSubstitutionPattern, java.lang.String duration)
catalog
- parent catalogparent
- parent datasetname
- dataset namepath
- url pathscanLocation
- scan this directoryfilter
- RegExp match on nameaddDatasetSize
- add a size elementaddLatest
- add a latest elementsortOrderIncreasing
- sortdatasetNameMatchPattern
- dataset namingstartTimeSubstitutionPattern
- time range using the file nameduration
- time range using the file namepublic InvDatasetScan(InvCatalogImpl catalog, InvDatasetImpl parent, java.lang.String name, java.lang.String path, java.lang.String scanLocation, CrawlableDatasetFilter filter, boolean addDatasetSize, java.lang.String addLatest, boolean sortOrderIncreasing, java.lang.String datasetNameMatchPattern, java.lang.String startTimeSubstitutionPattern, java.lang.String duration)
catalog
- parent catalogparent
- parent datasetname
- dataset namepath
- url pathscanLocation
- scan this directoryfilter
- CrawlableDatasetFilter, may be nulladdDatasetSize
- add a size elementaddLatest
- add a latest elementsortOrderIncreasing
- sortdatasetNameMatchPattern
- dataset namingstartTimeSubstitutionPattern
- time range using the file nameduration
- time range using the file namepublic InvDatasetScan(InvDatasetImpl parent, java.lang.String name, java.lang.String path, java.lang.String scanLocation, java.lang.String configClassName, java.lang.Object configObj, CrawlableDatasetFilter filter, CrawlableDatasetLabeler identifier, CrawlableDatasetLabeler namer, boolean addDatasetSize, CrawlableDatasetSorter sorter, java.util.Map<java.lang.String,ProxyDatasetHandler> proxyDatasetHandlers, java.util.List<DatasetEnhancer> childEnhancerList, CatalogRefExpander catalogRefExpander)
public static void setContext(java.lang.String c)
public static void setCatalogServletName(java.lang.String catServletName)
public java.lang.String getPath()
public java.lang.String getScanLocation()
public void setScanLocation(java.lang.String scanLocation)
Used by DataRootHandler to allow scanning an aliased directory ("content").
scanLocation
- the scan location.public java.lang.String getCrDsClassName()
public java.lang.Object getCrDsConfigObj()
public CrawlableDatasetFilter getFilter()
public CrawlableDatasetLabeler getIdentifier()
public CrawlableDatasetLabeler getNamer()
public CrawlableDatasetSorter getSorter()
public java.util.Map<java.lang.String,ProxyDatasetHandler> getProxyDatasetHandlers()
public boolean getAddDatasetSize()
public java.util.List<DatasetEnhancer> getChildEnhancerList()
public CatalogRefExpander getCatalogRefExpander()
public boolean isValid()
public java.lang.String getInvalidMessage()
public java.lang.String translatePathToLocation(java.lang.String dsPath)
dsPath
- a datasetScan dsPath thatpublic CrawlableDataset requestCrawlableDataset(java.lang.String path) throws java.io.IOException
This method can handle requests for regular datasets and proxy datasets.
path
- the path of the requested CrawlableDatasetjava.io.IOException
- if an I/O error occurs while locating the children datasets.java.lang.IllegalArgumentException
- if the given path is not a descendant of (or the same as) this InvDatasetScan collection level.public InvCatalogImpl makeCatalogForDirectory(java.lang.String orgPath, java.net.URI catURI)
orgPath
- the part of the baseURI that is the pathcatURI
- the base URL for the catalog, used to resolve relative URLs.public InvCatalogImpl makeProxyDsResolverCatalog(java.lang.String path, java.net.URI baseURI)
path
- the part of the baseURI that is the pathbaseURI
- the base URL for the catalog, used to resolve relative URLs.public InvCatalog makeLatestCatalogForDirectory(java.lang.String orgPath, java.net.URI baseURI)
makeProxyDsResolver()
which provides more general proxy dataset handling.orgPath
- the part of the baseURI that is the pathbaseURI
- the base URL for the catalog, used to resolve relative URLs.public boolean isRead()
isRead
in class InvCatalogRef