Class DatasetUtils

java.lang.Object
com.apgar.common.lib.utils.DatasetUtils

public class DatasetUtils extends Object
Utility class for handling datasets

This class provides methods for retrieving datasets, tables, table paths, and field paths.

Author:
APGAR Consulting
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<com.orchestranetworks.schema.Path>
    getAllFieldsOfTable(com.onwbp.adaptation.Adaptation adaptation, com.orchestranetworks.schema.Path pathTable, boolean includeChildren)
    Retrieves a list of field paths from the specified table within the dataset.
    static List<com.orchestranetworks.schema.Path>
    getAllFieldsOfTable(com.onwbp.adaptation.Adaptation adaptation, com.orchestranetworks.schema.Path pathTable, boolean includeChildren, boolean includeComplex)
    Retrieves a list of field paths from the specified table within the dataset.
    static List<com.orchestranetworks.schema.Path>
    getAllFieldsOfTable(com.orchestranetworks.instance.Repository repository, String homeKey, com.orchestranetworks.schema.Path pathTable, String datasetId, boolean includeChildren, boolean includeComplex)
    Retrieves a list of field paths from the specified table within the dataset.
    static List<com.orchestranetworks.schema.Path>
    getAllFieldsOfTable(com.orchestranetworks.schema.SchemaNode[] nodeTable, boolean includeChildren, boolean includeComplex)
    Retrieves a list of field paths from the specified table and optionally includes paths of child fields.
    static List<com.orchestranetworks.schema.Path>
    getAllFieldsOfTable(com.orchestranetworks.schema.SchemaNode rootNode, com.orchestranetworks.schema.Path pathTable, boolean includeChildren, boolean includeComplex)
    Retrieves a list of field paths from the specified table within the schema node.
    static List<com.onwbp.adaptation.AdaptationTable>
    getAllTablesFromAdaptation(com.onwbp.adaptation.Adaptation adaptation)
    Returns the list of tables located under the specified dataset
    static List<com.orchestranetworks.schema.Path>
    getAllTablesFromNode(com.orchestranetworks.schema.SchemaNode node)
    Retrieves all table paths located under the specified schema node.
    static List<com.onwbp.adaptation.Adaptation>
    getDatasetList(com.onwbp.adaptation.AdaptationHome dataspace)
    Retrieves a list of datasets from the specified dataspace.
    static List<com.orchestranetworks.schema.Path>
    getDatasetTableList(com.onwbp.adaptation.Adaptation adaptation)
    Retrieves a list of table paths from a dataset.
    static List<com.orchestranetworks.schema.Path>
    getDatasetTableList(com.onwbp.adaptation.AdaptationHome dataspace, String datasetId)
    Retrieves a list of table paths for a dataset within a specified dataspace.
    static List<com.orchestranetworks.schema.Path>
    getDatasetTableList(com.orchestranetworks.instance.Repository repository, String dataspaceId, String datasetId)
    Retrieves a list of table paths for a dataset within a specified dataspace.

    Methods inherited from class java.lang.Object

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

    • DatasetUtils

      public DatasetUtils()
  • Method Details

    • getDatasetList

      public static List<com.onwbp.adaptation.Adaptation> getDatasetList(com.onwbp.adaptation.AdaptationHome dataspace)
      Retrieves a list of datasets from the specified dataspace.
      Parameters:
      dataspace - the dataspace from which to retrieve the datasets.
      Returns:
      a list of datasets contained within the specified dataspace.
    • getDatasetTableList

      public static List<com.orchestranetworks.schema.Path> getDatasetTableList(com.orchestranetworks.instance.Repository repository, String dataspaceId, String datasetId)
      Retrieves a list of table paths for a dataset within a specified dataspace.
      Parameters:
      repository - the repository containing the dataspace.
      dataspaceId - the ID of the dataspace containing the dataset.
      datasetId - the ID of the dataset for which to retrieve table paths.
      Returns:
      a list of table paths for the specified dataset.
    • getDatasetTableList

      public static List<com.orchestranetworks.schema.Path> getDatasetTableList(com.onwbp.adaptation.AdaptationHome dataspace, String datasetId)
      Retrieves a list of table paths for a dataset within a specified dataspace.
      Parameters:
      dataspace - the dataspace containing the dataset.
      datasetId - the ID of the dataset for which to retrieve table paths.
      Returns:
      a list of table paths for the specified dataset.
    • getDatasetTableList

      public static List<com.orchestranetworks.schema.Path> getDatasetTableList(com.onwbp.adaptation.Adaptation adaptation)
      Retrieves a list of table paths from a dataset.
      Parameters:
      adaptation - the dataset from which to retrieve table paths.
      Returns:
      a list of table paths contained within the specified dataset.
    • getAllTablesFromAdaptation

      public static List<com.onwbp.adaptation.AdaptationTable> getAllTablesFromAdaptation(com.onwbp.adaptation.Adaptation adaptation)
      Returns the list of tables located under the specified dataset
      Parameters:
      adaptation - the dataset from which to retrieve the tables
      Returns:
      a list of tables from the specified dataset (adaptation)
    • getAllTablesFromNode

      public static List<com.orchestranetworks.schema.Path> getAllTablesFromNode(com.orchestranetworks.schema.SchemaNode node)
      Retrieves all table paths located under the specified schema node.
      Parameters:
      node - the schema node from which to retrieve table paths.
      Returns:
      a list of table paths located under the specified node.
    • getAllFieldsOfTable

      public static List<com.orchestranetworks.schema.Path> getAllFieldsOfTable(com.onwbp.adaptation.Adaptation adaptation, com.orchestranetworks.schema.Path pathTable, boolean includeChildren)
      Retrieves a list of field paths from the specified table within the dataset.
      Parameters:
      adaptation - the dataset containing the table.
      pathTable - the path of the table within the dataset.
      includeChildren - if true, includes the paths of child fields of complex fields (but not the complex field itself).
      Returns:
      a list of field paths within the specified table.
    • getAllFieldsOfTable

      public static List<com.orchestranetworks.schema.Path> getAllFieldsOfTable(com.onwbp.adaptation.Adaptation adaptation, com.orchestranetworks.schema.Path pathTable, boolean includeChildren, boolean includeComplex)
      Retrieves a list of field paths from the specified table within the dataset.
      Parameters:
      adaptation - the dataset containing the table.
      pathTable - the path of the table within the dataset.
      includeChildren - if true, includes the paths of child fields of complex fields (but not the complex field itself).
      includeComplex - if true, includes the paths of complex fields in addition to their child fields.
      Returns:
      a list of field paths within the specified table.
    • getAllFieldsOfTable

      public static List<com.orchestranetworks.schema.Path> getAllFieldsOfTable(com.orchestranetworks.schema.SchemaNode rootNode, com.orchestranetworks.schema.Path pathTable, boolean includeChildren, boolean includeComplex)
      Retrieves a list of field paths from the specified table within the schema node.
      Parameters:
      rootNode - the root schema node.
      pathTable - the path of the table within the schema.
      includeChildren - if true, includes the paths of child fields of complex fields.
      includeComplex - if true, includes the paths of complex fields in addition to their child fields.
      Returns:
      a list of field paths within the specified table.
    • getAllFieldsOfTable

      public static List<com.orchestranetworks.schema.Path> getAllFieldsOfTable(com.orchestranetworks.instance.Repository repository, String homeKey, com.orchestranetworks.schema.Path pathTable, String datasetId, boolean includeChildren, boolean includeComplex)
      Retrieves a list of field paths from the specified table within the dataset.
      Parameters:
      repository - the repository containing the dataspace.
      homeKey - the key of the dataspace containing the dataset.
      pathTable - the path of the table within the dataset.
      datasetId - the ID of the dataset.
      includeChildren - if true, includes the paths of child fields of complex fields.
      includeComplex - if true, includes the paths of complex fields in addition to their child fields.
      Returns:
      a list of field paths within the specified table.
    • getAllFieldsOfTable

      public static List<com.orchestranetworks.schema.Path> getAllFieldsOfTable(com.orchestranetworks.schema.SchemaNode[] nodeTable, boolean includeChildren, boolean includeComplex)
      Retrieves a list of field paths from the specified table and optionally includes paths of child fields.
      Parameters:
      nodeTable - an array of schema nodes corresponding to the fields of the table.
      includeChildren - if true, includes the paths of child fields of complex fields.
      includeComplex - if true, includes the paths of complex fields in addition to their child fields.
      Returns:
      a list of field paths within the specified table.