Class TargetExaminer

java.lang.Object
gov.nasa.pds.tools.validate.Target
gov.nasa.pds.tools.validate.TargetExaminer

public class TargetExaminer
extends Target
Class to examine if a Target maches a certain product type, either a bundle or a collection.
  • Constructor Details

    • TargetExaminer

      public TargetExaminer​(URL url, boolean isDir)
      Creates a new instance.
  • Method Details

    • isTargetBundleType

      public static boolean isTargetBundleType​(URL url)
      Check if a given url is of Bundle type.
      Parameters:
      url - the url of file to check.
      Returns:
      true if the given url is of Bundle type.
    • isTargetCollectionType

      public static boolean isTargetCollectionType​(URL url)
      Check if a given url is of Collection type.
      Parameters:
      url - the url of file to check.
      Returns:
      true if the given url is of Collection type.
    • getTargetContent

      public static ArrayList<String> getTargetContent​(URL url, String nodeCheck, String fieldCheck, String fieldCheck2)
      Return the content of the field within a node.
      Parameters:
      url - the url of file to check.
      nodeCheck - the tag of the node to check.
      fieldCheck - the tag of the field within node to check.
      fieldCheck2 - additional tag of the field within node to check.
      Returns:
      the content of the field within a node as string.