Class Dataset
java.lang.Object
gaiasky.util.datadesc.Dataset
- All Implemented Interfaces:
Comparable<Dataset>
Contains the metadata of a single dataset, constructed from a JSON file or object.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanFlag set to true in the base data pack.com.badlogic.gdx.files.FileHandleFile handle to thedataset.jsonfile.Path of thedataset.jsonfile for this dataset.Path of thedataset.jsonfile, as a string.Creator of the dataset.String[]Credit(s) for this dataset.Dataset type.Text description of the dataset.booleanFlag that signals whether the dataset is in the local file system.URL (possibly with @mirror-url@ wildcard) of the gzipped dataset tarball.String[]List of files or directories included in this dataset.String[]URLs to dataset images.Dataset key.String[]Link(s) to get more information about this dataset.intMinimum Gaia Sky version needed for this dataset.intLocal dataset version.Common name of the dataset.longRaw number of objects.Number of objects, as a pretty string (i.e.booleanFlag that marks the dataset as outdated:replacedByis not empty.The 'feature' that this dataset provides.String[]List of release notes for this version.Contains the key of the dataset that replaces this one, if any.String[]Keys of the datasets that this dataset replaces, if any.In case of local datasets, this links to the server description.intServer dataset version.SHA256 checksum.longDataset raw size in bytes.Dataset pretty size, as a string.Dataset status.Dataset type string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReplacesEntry(String key) Adds the key to thereplacesarray of this dataset.intcopy()booleanFilters the dataset using a given text.booleanisReplacedBy(String key) Checks if the current dataset is replaced by the dataset with the given key.booleanbooleanChecks whether the current dataset replaces the dataset with the given key.toString()static booleanverifyDatasetImage(@NotNull com.badlogic.gdx.graphics.Texture tex)
-
Field Details
-
key
Dataset key. It is a kebab-case string without whitespaces. -
name
Common name of the dataset. -
description
Text description of the dataset. -
links
Link(s) to get more information about this dataset. -
credits
Credit(s) for this dataset. These usually point to the data sources. -
replaces
Keys of the datasets that this dataset replaces, if any. -
replacedBy
Contains the key of the dataset that replaces this one, if any. If this is non-null, the current dataset is obsolete. -
provides
The 'feature' that this dataset provides. For instance, all star catalogs would provide 'starfield'. This is useful to detect possible errors in the case of several datasets providing the same feature being enabled. -
creator
Creator of the dataset. Usually "Name - email" is sufficient. -
file
URL (possibly with @mirror-url@ wildcard) of the gzipped dataset tarball. -
datasetType
Dataset type. -
type
Dataset type string. -
status
Dataset status. -
checkPath
Path of thedataset.jsonfile for this dataset. -
checkStr
Path of thedataset.jsonfile, as a string. -
catalogFile
public com.badlogic.gdx.files.FileHandle catalogFileFile handle to thedataset.jsonfile. -
sizeString
Dataset pretty size, as a string. -
sizeBytes
public long sizeBytesDataset raw size in bytes. This is the package file (filesize in server datasets, and the uncompressed disk size in installed datasets. -
nObjectsStr
Number of objects, as a pretty string (i.e. 3B). -
nObjects
public long nObjectsRaw number of objects. -
sha256
SHA256 checksum. -
exists
public boolean existsFlag that signals whether the dataset is in the local file system. -
myVersion
public int myVersionLocal dataset version. -
serverVersion
public int serverVersionServer dataset version. -
minGsVersion
public int minGsVersionMinimum Gaia Sky version needed for this dataset. -
outdated
public boolean outdatedFlag that marks the dataset as outdated:replacedByis not empty. -
baseData
public boolean baseDataFlag set to true in the base data pack. -
releaseNotes
List of release notes for this version. -
files
List of files or directories included in this dataset. -
images
URLs to dataset images. These are displayed in the dataset manager. -
server
In case of local datasets, this links to the server description.
-
-
Constructor Details
-
Dataset
public Dataset() -
Dataset
public Dataset(com.badlogic.gdx.utils.JsonReader reader, com.badlogic.gdx.utils.JsonValue source) -
Dataset
public Dataset(com.badlogic.gdx.utils.JsonReader reader, com.badlogic.gdx.utils.JsonValue source, com.badlogic.gdx.files.FileHandle localCatalogFile)
-
-
Method Details
-
verifyDatasetImage
public static boolean verifyDatasetImage(@NotNull @NotNull com.badlogic.gdx.graphics.Texture tex) -
toString
-
isReplacedBy
Checks if the current dataset is replaced by the dataset with the given key.- Parameters:
key- The key.- Returns:
- True if the current dataset is replaced by the dataset with the given key.
-
replaces
Checks whether the current dataset replaces the dataset with the given key.- Parameters:
key- The key.- Returns:
- True if the current dataset replaces the dataset with the given key.
-
addReplacesEntry
-
filter
Filters the dataset using a given text. It checks the filter against name, description, key and type.- Parameters:
filterText- The filter text.- Returns:
- True if the filter passes, false otherwise.
-
isStarDataset
public boolean isStarDataset() -
getLocalCopy
-
copy
-
compareTo
- Specified by:
compareToin interfaceComparable<Dataset>
-