Class AggregateManager


  • public class AggregateManager
    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 Detail

      • LABEL_EXTENSIONS_LIST

        public static final String[] LABEL_EXTENSIONS_LIST
    • Constructor Detail

      • AggregateManager

        public AggregateManager()
    • Method Detail

      • setReport

        public static void setReport​(Report report)
        Set the report object.
        Parameters:
        report - The Report object.
      • 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.
      • findBundleWithLatestVersion

        public static List<Target> findBundleWithLatestVersion​(URL url,
                                                               String labelExtension)
        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,
                                                                   String labelFileExtension)
        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,
                                                                       String labelFileExtension)
        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,
                                                              String labelFileExtension)
        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,
                                                                  String labelFileExtension,
                                                                  boolean isRootBundle)
        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,
                                                             String labelExtension)
        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​(List<Target> targetList,
                                                                 String labelFileExtension)
        Find other collection file(s).
        Parameters:
        targetList - the url List of where to start looking for files from.
        Returns:
        a list of files that are other than the given urls.
      • makeException

        public static void makeException​(URL url,
                                         String location,
                                         String labelFileExtension)
        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.