Class DatasetUtils
java.lang.Object
gaiasky.util.datadesc.DatasetUtils
Utility methods to construct and manage
Datasets and DatasetGroups.-
Method Summary
Modifier and TypeMethodDescriptionbuildLocalDatasets(DatasetGroup server) Constructs a list of local catalogs found in the current data location and combines them with the server data.buildServerDatasets(com.badlogic.gdx.files.FileHandle fh) Constructs a data descriptor from a server JSON file.static voidstatic booleanChecks whether the current data location contains old-version (pre-3.3.1) datasets.getMatchByKey(String key) static DatasetUtilsinstance()
-
Method Details
-
instance
-
dataLocationOldVersionDatasetsCheck
public static boolean dataLocationOldVersionDatasetsCheck()Checks whether the current data location contains old-version (pre-3.3.1) datasets.- Returns:
- True if the data location contains old datasets.
-
cleanDataLocationOldDatasets
public static void cleanDataLocationOldDatasets() -
buildServerDatasets
Constructs a data descriptor from a server JSON file. If the file is null andfhis also null, it returns null.- Parameters:
fh- The pointer to the server JSON file.- Returns:
- An instance of
DatasetGroup.
-
buildLocalDatasets
Constructs a list of local catalogs found in the current data location and combines them with the server data. Local catalogs are JSON files in the data directory that start with either 'catalog-' or 'dataset-'.- Parameters:
server- The server data descriptor, for combining with the local catalogs.- Returns:
- An instance of
DatasetGroup.
-
getMatchByKey
-