test_class.file: bundles/org.openhab.core.io.rest.sse/src/test/java/org/openhab/core/io/rest/sse/internal/util/SseUtilTest.java
test_class.identifier: SseUtilTest
test_case.body: @Test
      public void testEvenMoreFilterMatchers() {
          List<String> regexes = SseUtil.convertToRegex("");
  
          assertThat("openhab/test/test/test/test/test".matches(regexes.get(0)), is(true));
          assertThat("openhab/asdf/test/test/test/test".matches(regexes.get(0)), is(true));
          assertThat("openhab/asdf/ASDF/test/test/test".matches(regexes.get(0)), is(true));
  
          regexes = SseUtil.convertToRegex("*/added");
          assertThat("openhab/items/anyitem/added".matches(regexes.get(0)), is(true));
          assertThat("openhab/items/anyitem/removed".matches(regexes.get(0)), is(false));
  
          regexes = SseUtil.convertToRegex("*added");
          assertThat("openhab/items/anyitem/added".matches(regexes.get(0)), is(true));
          assertThat("openhab/items/anyitem/removed".matches(regexes.get(0)), is(false));
      }
test_case.class_method_signature: SseUtilTest.testEvenMoreFilterMatchers()
test_case.full_signature: @Test public void testEvenMoreFilterMatchers()
test_case.identifier: testEvenMoreFilterMatchers
test_case.invocations: convertToRegex assertThat matches get is assertThat matches get is assertThat matches get is convertToRegex assertThat matches get is assertThat matches get is convertToRegex assertThat matches get is assertThat matches get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEvenMoreFilterMatchers()
focal_class.declarator: TOPIC_VALIDATE_PATTERN = "(\\w*\\*?\\/?,?:?-?\\s*)*"
focal_class.modifier: static final
focal_class.original_string: static final String TOPIC_VALIDATE_PATTERN = "(\\w*\\*?\\/?,?:?-?\\s*)*";
focal_class.type: String
focal_class.var_name: TOPIC_VALIDATE_PATTERN
focal_class.file: bundles/org.openhab.core.io.rest.sse/src/main/java/org/openhab/core/io/rest/sse/internal/util/SseUtil.java
focal_class.identifier: SseUtil
focal_class.class_method_signature: SseUtil.buildDTO(final Event event)
focal_class.full_signature: public static EventDTO buildDTO(final Event event)
focal_class.identifier: buildDTO
focal_class.modifiers: public static
focal_class.parameters: (final Event event)
focal_class.return: EventDTO
focal_class.signature: EventDTO buildDTO(final Event event)
focal_class.class_method_signature: SseUtil.buildEvent(OutboundSseEvent.Builder eventBuilder, EventDTO event)
focal_class.full_signature: public static OutboundSseEvent buildEvent(OutboundSseEvent.Builder eventBuilder, EventDTO event)
focal_class.identifier: buildEvent
focal_class.modifiers: public static
focal_class.parameters: (OutboundSseEvent.Builder eventBuilder, EventDTO event)
focal_class.return: OutboundSseEvent
focal_class.signature: OutboundSseEvent buildEvent(OutboundSseEvent.Builder eventBuilder, EventDTO event)
focal_class.class_method_signature: SseUtil.isValidTopicFilter(@Nullable String topicFilter)
focal_class.full_signature: public static boolean isValidTopicFilter(@Nullable String topicFilter)
focal_class.identifier: isValidTopicFilter
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String topicFilter)
focal_class.return: boolean
focal_class.signature: boolean isValidTopicFilter(@Nullable String topicFilter)
focal_class.class_method_signature: SseUtil.convertToRegex(@Nullable String topicFilter)
focal_class.full_signature: public static List<String> convertToRegex(@Nullable String topicFilter)
focal_class.identifier: convertToRegex
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String topicFilter)
focal_class.return: List<String>
focal_class.signature: List<String> convertToRegex(@Nullable String topicFilter)
focal_method.body: public static List<String> convertToRegex(@Nullable String topicFilter) {
          List<String> filters = new ArrayList<>();
  
          if (topicFilter == null || topicFilter.isEmpty()) {
              filters.add(".*");
          } else {
              StringTokenizer tokenizer = new StringTokenizer(topicFilter, ",");
              while (tokenizer.hasMoreElements()) {
                  String regex = tokenizer.nextToken().trim().replace("*", ".*") + ".*";
                  filters.add(regex);
              }
          }
  
          return filters;
      }
focal_method.class_method_signature: SseUtil.convertToRegex(@Nullable String topicFilter)
focal_method.full_signature: public static List<String> convertToRegex(@Nullable String topicFilter)
focal_method.identifier: convertToRegex
focal_method.invocations: isEmpty add hasMoreElements replace trim nextToken add
focal_method.modifiers: public static
focal_method.parameters: (@Nullable String topicFilter)
focal_method.return: List<String>
focal_method.signature: List<String> convertToRegex(@Nullable String topicFilter)