Class DatasetConfig
- java.lang.Object
-
- uk.ac.rdg.resc.edal.catalogue.jaxb.DatasetConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DatasetConfig.DatasetState
The state of a Dataset.
-
Constructor Summary
Constructors Constructor Description DatasetConfig()
DatasetConfig(VariableConfig[] variables)
-
Method Summary
-
-
-
Constructor Detail
-
DatasetConfig
public DatasetConfig()
-
DatasetConfig
public DatasetConfig(VariableConfig[] variables)
-
-
Method Detail
-
refresh
public void refresh(CatalogueConfig.DatasetStorage datasetStorage)
Refreshes the dataset if required.- Parameters:
datasetStorage
- TheCatalogueConfig.DatasetStorage
object to sendDataset
s andEnhancedVariableMetadata
back to once a refresh is completed
-
createDataset
public void createDataset(CatalogueConfig.DatasetStorage datasetStorage, boolean forceRefresh) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException, EdalException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
-
needsRefresh
public boolean needsRefresh()
-
forceRefresh
public void forceRefresh()
Forces this dataset to be refreshed the next time it has an opportunity
-
getLocation
public String getLocation()
- Returns:
- The location (on disk/network/internet) of the
Dataset
being configured
-
getTitle
public String getTitle()
-
isQueryable
public boolean isQueryable()
- Returns:
- Whether the
Dataset
being configured may have its values queried
-
isDownloadable
public boolean isDownloadable()
- Returns:
- Whether the
Dataset
being configured may have its values downloaded
-
isDisabled
public boolean isDisabled()
- Returns:
- Whether the
Dataset
being configured is enabled
-
getUpdateInterval
public int getUpdateInterval()
- Returns:
- How often, in minutes the
Dataset
should be updated (i.e. have metadata re-read in case of changes)
-
getDataReaderClass
public String getDataReaderClass()
- Returns:
- The class used to convert the location given in
getLocation()
to aDataset
-
getCopyrightStatement
public String getCopyrightStatement()
- Returns:
- A copyright statement associated with this
Dataset
-
getMoreInfo
public String getMoreInfo()
- Returns:
- Arbitrary additional information associated with this
Dataset
-
getMetadataUrl
public String getMetadataUrl()
- Returns:
- A URL containing further metadata associated with this
Dataset
-
getMetadataDesc
public String getMetadataDesc()
- Returns:
- A description of further metadata associated with this
Dataset
-
getMetadataMimetype
public String getMetadataMimetype()
- Returns:
- The mimetype of further metadata associated with this
Dataset
-
getVariables
public VariableConfig[] getVariables()
- Returns:
- An array of
VariableConfig
objects representing the available variables in the representedDataset
-
getVariableById
public VariableConfig getVariableById(String variableId)
- Returns:
- The
VariableConfig
objects representing the variables with the given ID in the representedDataset
, ornull
if the specified variable ID doesn't exist
-
getState
public DatasetConfig.DatasetState getState()
- Returns:
- The
DatasetConfig.DatasetState
which theDataset
being configured is in
-
isReady
public boolean isReady()
- Returns:
true
if this dataset is ready for use
-
isLoading
public boolean isLoading()
- Returns:
true
if this dataset is not ready because it is being loaded
-
hasError
public boolean hasError()
- Returns:
- If there has been an error whilst loaded the associated
Dataset
-
getException
public Throwable getException()
-
setId
public void setId(String id)
-
setTitle
public void setTitle(String title)
-
setLocation
public void setLocation(String location)
-
setQueryable
public void setQueryable(boolean queryable)
-
setDownloadable
public void setDownloadable(boolean downloadable)
-
setDataReaderClass
public void setDataReaderClass(String dataReaderClass)
-
setCopyrightStatement
public void setCopyrightStatement(String copyrightStatement)
-
setMoreInfo
public void setMoreInfo(String moreInfo)
-
setDisabled
public void setDisabled(boolean disabled)
-
setUpdateInterval
public void setUpdateInterval(int updateInterval)
-
setMetadataUrl
public void setMetadataUrl(String metadataUrl)
-
setMetadataDesc
public void setMetadataDesc(String metadataDesc)
-
setMetadataMimetype
public void setMetadataMimetype(String metadataMimetype)
-
setState
public void setState(DatasetConfig.DatasetState state)
-
setErr
public void setErr(Exception err)
-
setNumErrorsInARow
public void setNumErrorsInARow(int numErrorsInARow)
-
getLastUpdateTime
public org.joda.time.DateTime getLastUpdateTime()
-
setLastSuccessfulUpdateTime
public void setLastSuccessfulUpdateTime(org.joda.time.DateTime lastSuccessfulUpdateTime)
-
setLastFailedUpdateTime
public void setLastFailedUpdateTime(org.joda.time.DateTime lastFailedUpdateTime)
-
-