Class SampleNameFilter

    • Method Detail

      • stringToList

        public static List<StringstringToList​(String s)
        Helper method to deserialize a delimiter-separated list of Strings into a List<String>.

        delimiter is one of , ; \t \n.

        This is implemented here so that exporters can provide a consistent configuration format for lists of allowed names.

      • restrictToNamesEqualTo

        public static Predicate<StringrestrictToNamesEqualTo​(Predicate<String> filter,
                                                               Collection<String> allowedNames)
        Helper method to compose a filter such that Sample names must
        • match the existing filter
        • and be in the list of allowedNames
        This should be used to implement the names[] query parameter in HTTP exporters.
        Parameters:
        filter - may be null, indicating that the resulting filter should just filter by allowedNames.
        allowedNames - may be null or empty, indicating that filter is returned unmodified.
        Returns:
        a filter combining the exising filter and the allowedNames, or null if both parameters were null.