Package gov.nasa.pds.tools.validate
Class AggregateManager
- java.lang.Object
-
- gov.nasa.pds.tools.validate.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 Summary
Fields Modifier and Type Field Description static String[]
LABEL_EXTENSIONS_LIST
-
Constructor Summary
Constructors Constructor Description AggregateManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayList<Target>
buildBundleIgnoreList(URL url, String labelFileExtension)
Build a list of bundle files to ignore.static ArrayList<Target>
buildCollectionIgnoreList(URL url, URL bundleUrl, String labelFileExtension, boolean isRootBundle)
Build a list of collection files to ignore.static List<Target>
findBundleWithLatestVersion(URL url, String labelExtension)
Find bundle(s) with the latest version.static List<Target>
findCollectionWithLatestVersion(URL url, String labelFileExtension)
Find collection(s) with the latest version.static List<Target>
findCollectionWithMatchingReference(URL url, URL bundleUrl, String labelFileExtension)
Find collection(s) with matching reference.static ArrayList<Target>
findOtherBundleFiles(URL url, String labelExtension)
Find other bundle file(s).static ArrayList<Target>
findOtherCollectionFiles(List<Target> targetList, String labelFileExtension)
Find other collection file(s).static ArrayList<Target>
getIgnoreList()
Returns the list of files to ignore when crawling.static Target
getLatestBundle()
Returns the target containing the latest bundle (one with the largest version).static String
getLocation()
Returns the modified location.static void
makeException(URL url, String location, String labelFileExtension)
Make an exception for bundle that is not applicable.static void
setReport(Report report)
Set the report object.
-
-
-
Field Detail
-
LABEL_EXTENSIONS_LIST
public static final String[] LABEL_EXTENSIONS_LIST
-
-
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.
-
-