Class TargetExaminer


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

      • TargetExaminer

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

      • 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.
      • isTargetBundleType

        public static boolean isTargetBundleType​(URL url,
                                                 boolean ignoreErrors)
      • 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.
      • isTargetCollectionType

        public static boolean isTargetCollectionType​(URL url,
                                                     boolean ignoreErrors)
      • isTargetDocumentType

        public static boolean isTargetDocumentType​(URL url)
      • isTargetDocumentType

        public static boolean isTargetDocumentType​(URL url,
                                                   boolean ignoreErrors)
      • 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.
      • isTargetALabel

        public static boolean isTargetALabel​(URL url)
      • removeNonLabels

        public static List<Target> removeNonLabels​(List<Target> targets)
        Modifies the input array and returns it so the same call can be used as a function or as a procedure.
        Parameters:
        targets -
        Returns: