test_class.declarator: logger = LoggerFactory.getLogger(GraphNameTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(GraphNameTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: rcljava/src/test/java/org/ros2/rcljava/namespace/GraphNameTest.java
test_class.identifier: GraphNameTest
test_class.superclass: extends AbstractRosTest
test_case.body: @Test
      public final void testIsTopicName() {
          // @see http://design.ros2.org/articles/topic_and_service_names.html
          logger.debug(new Object(){}.getClass().getEnclosingMethod().getName());
  
          // must not be empty
          Assert.assertFalse("Topic must not be null.", GraphName.isValidTopic(null));
          Assert.assertFalse("Topic must not be empty.", GraphName.isValidTopic(""));
  
          // may contain alphanumeric characters ([0-9|a-z|A-Z]), underscores (_), or forward slashes (/)
  //        Assert.assertFalse("Topic can be contains valid charactere.", GraphName.isValidTopic("&é'(-èçà)=#[|\^@]^$ù*,;:!£%µ?.§"));
          Assert.assertTrue("Topic may contains valid charactere.", GraphName.isValidTopic("~/_foo"));
          Assert.assertTrue("Topic may contains valid charactere.", GraphName.isValidTopic("azertyuiopqsdfghjklmwxcvbn1234567890"));
  
          // may use balanced curly braces ({}) for substitutions
          Assert.assertTrue("Topic may use balanced curly braces.", GraphName.isValidTopic("{bar}"));
  
          // may start with a tilde (~), the private namespace substitution character
          Assert.assertTrue("Topic may start with a tilde (~)", GraphName.isValidTopic("~/foo"));
          Assert.assertFalse("Topic may start with a tilde (~).", GraphName.isValidTopic("foo~"));
  
          // must not start with a numeric character ([0-9])
          Assert.assertFalse("Topic must not start with a numeric character ([0-9]).", GraphName.isValidTopic("8foo"));
  
          // must not contain any number of repeated underscores (_)
          Assert.assertFalse("Topic must not contain any number of repeated underscores (_).", GraphName.isValidTopic("foo__bar"));
  
          // must not end with an underscore (_)
          Assert.assertFalse("Topic must not end with an underscore (_).", GraphName.isValidTopic("foo_"));
  
          // must not have an underscore (_) followed by a forward slash (/), i.e. _/
          Assert.assertFalse("Topic must not have an underscore (_) followed by a forward slash.", GraphName.isValidTopic("foo_/bar"));
  
          // must not end with a forward slash (/)
          Assert.assertFalse("Topic must not end with a forward slash (/).", GraphName.isValidTopic("foo/bar/"));
  
          // must not contain any number of repeated forward slashes (/)
          Assert.assertFalse("Topic must not contain any number of repeated forward slashes (/).", GraphName.isValidTopic("foo//bar"));
  
          // must separate a tilde (~) from the rest of the name with a forward slash (/), i.e. ~/foo not ~foo
          Assert.assertFalse("Topic must separate a tilde (~) from the rest of the name with a forward slash (/).", GraphName.isValidTopic("~foo"));
  
          // must have balanced curly braces ({}) when used, i.e. {sub}/foo but not {sub/foo nor /foo}
          Assert.assertTrue("Topic must have balanced curly braces ({}) when used.", GraphName.isValidTopic("~/foo"));
  
          // Test case Valid
          Assert.assertTrue(GraphName.isValidTopic("foo"));
          Assert.assertTrue(GraphName.isValidTopic("abc123"));
          Assert.assertTrue(GraphName.isValidTopic("_foo"));
          Assert.assertTrue(GraphName.isValidTopic("Foo"));
          Assert.assertTrue(GraphName.isValidTopic("BAR"));
          Assert.assertTrue(GraphName.isValidTopic("~"));
          Assert.assertTrue(GraphName.isValidTopic("foo/bar"));
          Assert.assertTrue(GraphName.isValidTopic("~/foo"));
          Assert.assertTrue(GraphName.isValidTopic("{foo}_bar"));
          Assert.assertTrue(GraphName.isValidTopic("foo/{ping}/bar"));
          Assert.assertTrue(GraphName.isValidTopic(Topics.SCHEME + "/foo"));
          Assert.assertTrue(GraphName.isValidTopic(Topics.SCHEME + "foo/bar"));
  
          // Test case not valid
          Assert.assertFalse(GraphName.isValidTopic("123abc"));
          Assert.assertFalse(GraphName.isValidTopic("123"));
          Assert.assertFalse(GraphName.isValidTopic("__foo"));
          Assert.assertFalse(GraphName.isValidTopic("foo__bar"));
          Assert.assertFalse(GraphName.isValidTopic("foo bar"));
          Assert.assertFalse(GraphName.isValidTopic("foo__"));
          Assert.assertFalse(GraphName.isValidTopic(" "));
          Assert.assertFalse(GraphName.isValidTopic("foo_"));
          Assert.assertFalse(GraphName.isValidTopic("foo//bar"));
          Assert.assertFalse(GraphName.isValidTopic("foo/"));
          Assert.assertFalse(GraphName.isValidTopic("foo_/bar	"));
          Assert.assertFalse(GraphName.isValidTopic("~foo"));
          Assert.assertFalse(GraphName.isValidTopic("foo~"));
          Assert.assertFalse(GraphName.isValidTopic("foo~/bar"));
          Assert.assertFalse(GraphName.isValidTopic("foo/~bar"));
          Assert.assertFalse(GraphName.isValidTopic("/_/bar"));
          Assert.assertFalse(GraphName.isValidTopic("_"));
          Assert.assertFalse(GraphName.isValidTopic("_/_bar"));
          Assert.assertFalse(GraphName.isValidTopic("/~"));
          Assert.assertFalse(GraphName.isValidTopic("foo/~/bar"));
      }
test_case.class_method_signature: GraphNameTest.testIsTopicName()
test_case.full_signature: @Test public final void testIsTopicName()
test_case.identifier: testIsTopicName
test_case.invocations: debug getName getEnclosingMethod getClass assertFalse isValidTopic assertFalse isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertTrue isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic assertFalse isValidTopic
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsTopicName()
focal_class.declarator: EMPTY = ""
focal_class.modifier: private static final
focal_class.original_string: private static final String EMPTY = "";
focal_class.type: String
focal_class.var_name: EMPTY
focal_class.declarator: PRIVATE = "_"
focal_class.modifier: private static final
focal_class.original_string: private static final String PRIVATE = "_";
focal_class.type: String
focal_class.var_name: PRIVATE
focal_class.declarator: SEPARATOR = "/"
focal_class.modifier: private static final
focal_class.original_string: private static final String SEPARATOR = "/";
focal_class.type: String
focal_class.var_name: SEPARATOR
focal_class.declarator: RELATIVE = "~"
focal_class.modifier: private static final
focal_class.original_string: private static final String RELATIVE = "~";
focal_class.type: String
focal_class.var_name: RELATIVE
focal_class.declarator: PARAMETER = "{}"
focal_class.modifier: private static final
focal_class.original_string: private static final String PARAMETER = "{}";
focal_class.type: String
focal_class.var_name: PARAMETER
focal_class.declarator: RELATIVE_TOPIC = RELATIVE + SEPARATOR
focal_class.modifier: private static final
focal_class.original_string: private static final String RELATIVE_TOPIC = RELATIVE + SEPARATOR;
focal_class.type: String
focal_class.var_name: RELATIVE_TOPIC
focal_class.declarator: FORMAT_TOPIC = "%s" + SEPARATOR + "%s"
focal_class.modifier: private static final
focal_class.original_string: private static final String FORMAT_TOPIC = "%s" + SEPARATOR + "%s";
focal_class.type: String
focal_class.var_name: FORMAT_TOPIC
focal_class.declarator: nodes = new LinkedBlockingQueue<Node>()
focal_class.modifier: private static
focal_class.original_string: private static Queue<Node> nodes = new LinkedBlockingQueue<Node>();
focal_class.type: Queue<Node>
focal_class.var_name: nodes
focal_class.file: rcljava/src/main/java/org/ros2/rcljava/namespace/GraphName.java
focal_class.identifier: GraphName
focal_class.class_method_signature: GraphName.GraphName()
focal_class.full_signature: private  GraphName()
focal_class.identifier: GraphName
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  GraphName()
focal_class.class_method_signature: GraphName.addNode(final Node node)
focal_class.full_signature: public static void addNode(final Node node)
focal_class.identifier: addNode
focal_class.modifiers: public static
focal_class.parameters: (final Node node)
focal_class.return: void
focal_class.signature: void addNode(final Node node)
focal_class.class_method_signature: GraphName.removeNode(final Node node)
focal_class.full_signature: public static void removeNode(final Node node)
focal_class.identifier: removeNode
focal_class.modifiers: public static
focal_class.parameters: (final Node node)
focal_class.return: void
focal_class.signature: void removeNode(final Node node)
focal_class.class_method_signature: GraphName.dispose()
focal_class.full_signature: public static void dispose()
focal_class.identifier: dispose
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void dispose()
focal_class.class_method_signature: GraphName.removeSheme(final String url)
focal_class.full_signature: private static String removeSheme(final String url)
focal_class.identifier: removeSheme
focal_class.modifiers: private static
focal_class.parameters: (final String url)
focal_class.return: String
focal_class.signature: String removeSheme(final String url)
focal_class.class_method_signature: GraphName.getFullName(final String nameSpace, final String nodeName)
focal_class.full_signature: public static String getFullName(final String nameSpace, final String nodeName)
focal_class.identifier: getFullName
focal_class.modifiers: public static
focal_class.parameters: (final String nameSpace, final String nodeName)
focal_class.return: String
focal_class.signature: String getFullName(final String nameSpace, final String nodeName)
focal_class.class_method_signature: GraphName.getFullName(final Node node, final String name, final List<String> options)
focal_class.full_signature: public static String getFullName(final Node node, final String name, final List<String> options)
focal_class.identifier: getFullName
focal_class.modifiers: public static
focal_class.parameters: (final Node node, final String name, final List<String> options)
focal_class.return: String
focal_class.signature: String getFullName(final Node node, final String name, final List<String> options)
focal_class.class_method_signature: GraphName.isValidTopic(final String name)
focal_class.full_signature: public static boolean isValidTopic(final String name)
focal_class.identifier: isValidTopic
focal_class.modifiers: public static
focal_class.parameters: (final String name)
focal_class.return: boolean
focal_class.signature: boolean isValidTopic(final String name)
focal_class.class_method_signature: GraphName.isValidSubstitution(final String substitution)
focal_class.full_signature: public static boolean isValidSubstitution(final String substitution)
focal_class.identifier: isValidSubstitution
focal_class.modifiers: public static
focal_class.parameters: (final String substitution)
focal_class.return: boolean
focal_class.signature: boolean isValidSubstitution(final String substitution)
focal_class.class_method_signature: GraphName.isValidFQDN(final String fqn)
focal_class.full_signature: public static boolean isValidFQDN(final String fqn)
focal_class.identifier: isValidFQDN
focal_class.modifiers: public static
focal_class.parameters: (final String fqn)
focal_class.return: boolean
focal_class.signature: boolean isValidFQDN(final String fqn)
focal_method.body: public static boolean isValidTopic(final String name) {
          // Delete sample Regex : https://regex101.com/delete/7qMZiThwlEla6eAKIIee3251
          boolean result = name != null;
  
          if (result) {
              final String topicName = GraphName.removeSheme(name);
  
              result =
                      topicName != null &&
                      topicName.length() > 0 &&
                      topicName.matches("^(?!.*(//|__|_/))[~A-Za-z/_{}][_A-Za-z0-9/{}]*$") &&
                      !topicName.endsWith(PRIVATE) &&
                      !topicName.endsWith(SEPARATOR)
              ;
  
              if (result && topicName.startsWith(RELATIVE) && topicName.length() > 1) {
                  result = topicName.startsWith(RELATIVE_TOPIC);
              }
          }
  
          return result;
      }
focal_method.class_method_signature: GraphName.isValidTopic(final String name)
focal_method.full_signature: public static boolean isValidTopic(final String name)
focal_method.identifier: isValidTopic
focal_method.invocations: removeSheme length matches endsWith endsWith startsWith length startsWith
focal_method.modifiers: public static
focal_method.parameters: (final String name)
focal_method.return: boolean
focal_method.signature: boolean isValidTopic(final String name)