Class BundleManager

java.lang.Object
gov.nasa.pds.tools.validate.BundleManager

public class BundleManager
extends Object
Provide ways to get latest version of bundle/collection files, or build list of files to ignore and make exception of when a bundle is not applicable for target as a file.
  • Field Details

  • Constructor Details

    • BundleManager

      public BundleManager()
  • Method Details

    • getLocation

      public static String getLocation()
      Returns the modified location.
    • getLatestBundle

      public static Target getLatestBundle()
      Returns the target containing the latest bundle (one with the largest version).
    • getIgnoreList

      public static ArrayList<Target> getIgnoreList()
      Returns the list of files to ignore when crawling.
    • findAllBundleFiles

      public static List<Target> findAllBundleFiles​(URL url)
      Find all bundle files.
      Parameters:
      url - the url of where to start looking for bundle files from.
      Returns:
      a list of all bundle files.
    • findAllCollectionFiles

      public static List<Target> findAllCollectionFiles​(URL url)
      Find all collection files.
      Parameters:
      url - the url of where to start looking for collection files from.
      Returns:
      a list of all collection files.
    • findBundleWithLatestVersion

      public static List<Target> findBundleWithLatestVersion​(URL url)
      Find bundle(s) with the latest version.
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files with latest version.
    • findCollectionWithLatestVersion

      public static List<Target> findCollectionWithLatestVersion​(URL url)
      Find collection(s) with the latest version.
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files with latest version.
    • findCollectionWithMatchingReference

      public static List<Target> findCollectionWithMatchingReference​(URL url, URL bundleUrl)
      Find collection(s) with matching reference.
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files with matching reference.
    • buildBundleIgnoreList

      public static ArrayList<Target> buildBundleIgnoreList​(URL url)
      Build a list of bundle files to ignore.
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files that are other than the given url.
    • buildCollectionIgnoreList

      public static ArrayList<Target> buildCollectionIgnoreList​(URL url, URL bundleUrl)
      Build a list of collection files to ignore.
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files that are other than the given url.
    • findOtherBundleFiles

      public static ArrayList<Target> findOtherBundleFiles​(URL url)
      Find other bundle file(s).
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files that are other than the given url.
    • findOtherCollectionFiles

      public static ArrayList<Target> findOtherCollectionFiles​(URL url)
      Find other collection file(s).
      Parameters:
      url - the url of where to start looking for files from.
      Returns:
      a list of files that are other than the given url.
    • makeException

      public static void makeException​(URL url, String location)
      Make an exception for bundle that is not applicable.
      Parameters:
      url - the url of where to start looking for files from.
      location - the location of where to start looking for files from.