Package gov.nasa.pds.tools.validate
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 Summary
Fields Modifier and Type Field Description static String
BUNDLE_NAME_TOKEN
static String
COLLECTION_NAME_TOKEN
static String
LABEL_EXTENSION
static String[]
LABEL_EXTENSIONS_LIST
-
Constructor Summary
Constructors Constructor Description BundleManager()
-
Method Summary
Modifier and Type Method Description static ArrayList<Target>
buildBundleIgnoreList(URL url)
Build a list of bundle files to ignore.static ArrayList<Target>
buildCollectionIgnoreList(URL url, URL bundleUrl)
Build a list of collection files to ignore.static List<Target>
findAllBundleFiles(URL url)
Find all bundle files.static List<Target>
findAllCollectionFiles(URL url)
Find all collection files.static List<Target>
findBundleWithLatestVersion(URL url)
Find bundle(s) with the latest version.static List<Target>
findCollectionWithLatestVersion(URL url)
Find collection(s) with the latest version.static List<Target>
findCollectionWithMatchingReference(URL url, URL bundleUrl)
Find collection(s) with matching reference.static ArrayList<Target>
findOtherBundleFiles(URL url)
Find other bundle file(s).static ArrayList<Target>
findOtherCollectionFiles(URL url)
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)
Make an exception for bundle that is not applicable.
-
Field Details
-
COLLECTION_NAME_TOKEN
- See Also:
- Constant Field Values
-
BUNDLE_NAME_TOKEN
- See Also:
- Constant Field Values
-
LABEL_EXTENSION
- See Also:
- Constant Field Values
-
LABEL_EXTENSIONS_LIST
-
-
Constructor Details
-
BundleManager
public BundleManager()
-
-
Method Details
-
getLocation
Returns the modified location. -
getLatestBundle
Returns the target containing the latest bundle (one with the largest version). -
getIgnoreList
Returns the list of files to ignore when crawling. -
findAllBundleFiles
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
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
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
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
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
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
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
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
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
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.
-