Class DataDescriptor

java.lang.Object
gaiasky.util.datadesc.DataDescriptor

public class DataDescriptor
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    static DataDescriptor currentDataDescriptor  
    java.util.List<DatasetDesc> datasets
    Raw datasets list, where each dataset has a type
    int numUpdates  
    java.util.List<DatasetType> types
    View organised by types, where each time has a list of datasets
    boolean updatesAvailable  
  • Constructor Summary

    Constructors
    Constructor Description
    DataDescriptor​(java.util.List<DatasetType> types, java.util.List<DatasetDesc> datasets)  
  • Method Summary

    Modifier and Type Method Description
    boolean datasetPresent​(java.lang.String name)
    Checks whether the dataset with the given name is present in the data folder.
    DatasetDesc findDataset​(java.lang.String name)
    Finds the dataset with the given name in the dataset descriptor list.
    DatasetDesc findDatasetByDescriptor​(java.nio.file.Path descriptorFile)
    Finds the dataset with the given descriptor file in the dataset descriptor list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • currentDataDescriptor

      public static DataDescriptor currentDataDescriptor
    • types

      public java.util.List<DatasetType> types
      View organised by types, where each time has a list of datasets
    • datasets

      public java.util.List<DatasetDesc> datasets
      Raw datasets list, where each dataset has a type
    • updatesAvailable

      public boolean updatesAvailable
    • numUpdates

      public int numUpdates
  • Constructor Details

    • DataDescriptor

      public DataDescriptor​(java.util.List<DatasetType> types, java.util.List<DatasetDesc> datasets)
  • Method Details

    • findDataset

      public DatasetDesc findDataset​(java.lang.String name)
      Finds the dataset with the given name in the dataset descriptor list.
      Parameters:
      name - The name of the dataset
      Returns:
      The dataset descriptor or null if it was not found
    • datasetPresent

      public boolean datasetPresent​(java.lang.String name)
      Checks whether the dataset with the given name is present in the data folder.
      Parameters:
      name - The dataset name.
      Returns:
      True if the dataset is present, false otherwise.
    • findDatasetByDescriptor

      public DatasetDesc findDatasetByDescriptor​(java.nio.file.Path descriptorFile) throws java.io.IOException
      Finds the dataset with the given descriptor file in the dataset descriptor list.
      Parameters:
      descriptorFile - The filename of the descriptor file.
      Returns:
      The dataset descriptor or null if it was not found.
      Throws:
      java.io.IOException