test_class.declarator: NAMESPACE = "namespace"
test_class.modifier: private static final
test_class.original_string: private static final String NAMESPACE = "namespace";
test_class.type: String
test_class.var_name: NAMESPACE
test_class.declarator: ID = "id"
test_class.modifier: private static final
test_class.original_string: private static final String ID = "id";
test_class.type: String
test_class.var_name: ID
test_class.file: protocol-adapter/src/test/java/org/eclipse/ditto/protocoladapter/ProtocolFactoryTest.java
test_class.identifier: ProtocolFactoryTest
test_case.body: @Test(expected = UnknownTopicPathException.class)
      public void testMissingGroup() {
          ProtocolFactory.newTopicPath("namespace/id");
      }
test_case.class_method_signature: ProtocolFactoryTest.testMissingGroup()
test_case.full_signature: @Test(expected = UnknownTopicPathException.class) public void testMissingGroup()
test_case.identifier: testMissingGroup
test_case.invocations: newTopicPath
test_case.modifiers: @Test(expected = UnknownTopicPathException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMissingGroup()
focal_class.file: protocol-adapter/src/main/java/org/eclipse/ditto/protocoladapter/ProtocolFactory.java
focal_class.identifier: ProtocolFactory
focal_class.class_method_signature: ProtocolFactory.ProtocolFactory()
focal_class.full_signature: private  ProtocolFactory()
focal_class.identifier: ProtocolFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ProtocolFactory()
focal_class.class_method_signature: ProtocolFactory.newAdaptableBuilder(final TopicPath topicPath)
focal_class.full_signature: public static AdaptableBuilder newAdaptableBuilder(final TopicPath topicPath)
focal_class.identifier: newAdaptableBuilder
focal_class.modifiers: public static
focal_class.parameters: (final TopicPath topicPath)
focal_class.return: AdaptableBuilder
focal_class.signature: AdaptableBuilder newAdaptableBuilder(final TopicPath topicPath)
focal_class.class_method_signature: ProtocolFactory.newAdaptableBuilder(final Adaptable existingAdaptable)
focal_class.full_signature: public static AdaptableBuilder newAdaptableBuilder(final Adaptable existingAdaptable)
focal_class.identifier: newAdaptableBuilder
focal_class.modifiers: public static
focal_class.parameters: (final Adaptable existingAdaptable)
focal_class.return: AdaptableBuilder
focal_class.signature: AdaptableBuilder newAdaptableBuilder(final Adaptable existingAdaptable)
focal_class.class_method_signature: ProtocolFactory.newAdaptableBuilder(final Adaptable existingAdaptable,
              final TopicPath overwriteTopicPath)
focal_class.full_signature: @Deprecated public static AdaptableBuilder newAdaptableBuilder(final Adaptable existingAdaptable,
              final TopicPath overwriteTopicPath)
focal_class.identifier: newAdaptableBuilder
focal_class.modifiers: @Deprecated public static
focal_class.parameters: (final Adaptable existingAdaptable,
              final TopicPath overwriteTopicPath)
focal_class.return: AdaptableBuilder
focal_class.signature: AdaptableBuilder newAdaptableBuilder(final Adaptable existingAdaptable,
              final TopicPath overwriteTopicPath)
focal_class.class_method_signature: ProtocolFactory.setExtra(final Adaptable existingAdaptable, final JsonObject extra)
focal_class.full_signature: public static Adaptable setExtra(final Adaptable existingAdaptable, final JsonObject extra)
focal_class.identifier: setExtra
focal_class.modifiers: public static
focal_class.parameters: (final Adaptable existingAdaptable, final JsonObject extra)
focal_class.return: Adaptable
focal_class.signature: Adaptable setExtra(final Adaptable existingAdaptable, final JsonObject extra)
focal_class.class_method_signature: ProtocolFactory.emptyTopicPath()
focal_class.full_signature: public static TopicPath emptyTopicPath()
focal_class.identifier: emptyTopicPath
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: TopicPath
focal_class.signature: TopicPath emptyTopicPath()
focal_class.class_method_signature: ProtocolFactory.newTopicPath(final String path)
focal_class.full_signature: @SuppressWarnings({"squid:S1166"}) public static TopicPath newTopicPath(final String path)
focal_class.identifier: newTopicPath
focal_class.modifiers: @SuppressWarnings({"squid:S1166"}) public static
focal_class.parameters: (final String path)
focal_class.return: TopicPath
focal_class.signature: TopicPath newTopicPath(final String path)
focal_class.class_method_signature: ProtocolFactory.newTopicPathBuilder(final String thingId)
focal_class.full_signature: @Deprecated public static TopicPathBuilder newTopicPathBuilder(final String thingId)
focal_class.identifier: newTopicPathBuilder
focal_class.modifiers: @Deprecated public static
focal_class.parameters: (final String thingId)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder newTopicPathBuilder(final String thingId)
focal_class.class_method_signature: ProtocolFactory.newTopicPathBuilder(final ThingId thingId)
focal_class.full_signature: public static TopicPathBuilder newTopicPathBuilder(final ThingId thingId)
focal_class.identifier: newTopicPathBuilder
focal_class.modifiers: public static
focal_class.parameters: (final ThingId thingId)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder newTopicPathBuilder(final ThingId thingId)
focal_class.class_method_signature: ProtocolFactory.newTopicPathBuilder(final NamespacedEntityId entityId)
focal_class.full_signature: public static TopicPathBuilder newTopicPathBuilder(final NamespacedEntityId entityId)
focal_class.identifier: newTopicPathBuilder
focal_class.modifiers: public static
focal_class.parameters: (final NamespacedEntityId entityId)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder newTopicPathBuilder(final NamespacedEntityId entityId)
focal_class.class_method_signature: ProtocolFactory.newTopicPathBuilder(final PolicyId policyId)
focal_class.full_signature: public static TopicPathBuilder newTopicPathBuilder(final PolicyId policyId)
focal_class.identifier: newTopicPathBuilder
focal_class.modifiers: public static
focal_class.parameters: (final PolicyId policyId)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder newTopicPathBuilder(final PolicyId policyId)
focal_class.class_method_signature: ProtocolFactory.newTopicPathBuilderFromNamespace(final String namespace)
focal_class.full_signature: public static TopicPathBuilder newTopicPathBuilderFromNamespace(final String namespace)
focal_class.identifier: newTopicPathBuilderFromNamespace
focal_class.modifiers: public static
focal_class.parameters: (final String namespace)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder newTopicPathBuilderFromNamespace(final String namespace)
focal_class.class_method_signature: ProtocolFactory.newPayload(final String jsonString)
focal_class.full_signature: public static Payload newPayload(final String jsonString)
focal_class.identifier: newPayload
focal_class.modifiers: public static
focal_class.parameters: (final String jsonString)
focal_class.return: Payload
focal_class.signature: Payload newPayload(final String jsonString)
focal_class.class_method_signature: ProtocolFactory.newPayload(final JsonObject jsonObject)
focal_class.full_signature: public static Payload newPayload(final JsonObject jsonObject)
focal_class.identifier: newPayload
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: Payload
focal_class.signature: Payload newPayload(final JsonObject jsonObject)
focal_class.class_method_signature: ProtocolFactory.newPayloadBuilder()
focal_class.full_signature: public static PayloadBuilder newPayloadBuilder()
focal_class.identifier: newPayloadBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: PayloadBuilder
focal_class.signature: PayloadBuilder newPayloadBuilder()
focal_class.class_method_signature: ProtocolFactory.newPayloadBuilder(@Nullable final JsonPointer path)
focal_class.full_signature: public static PayloadBuilder newPayloadBuilder(@Nullable final JsonPointer path)
focal_class.identifier: newPayloadBuilder
focal_class.modifiers: public static
focal_class.parameters: (@Nullable final JsonPointer path)
focal_class.return: PayloadBuilder
focal_class.signature: PayloadBuilder newPayloadBuilder(@Nullable final JsonPointer path)
focal_class.class_method_signature: ProtocolFactory.emptyHeaders()
focal_class.full_signature: public static DittoHeaders emptyHeaders()
focal_class.identifier: emptyHeaders
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: DittoHeaders
focal_class.signature: DittoHeaders emptyHeaders()
focal_class.class_method_signature: ProtocolFactory.newHeadersWithDittoContentType(final Map<String, String> headers)
focal_class.full_signature: public static DittoHeaders newHeadersWithDittoContentType(final Map<String, String> headers)
focal_class.identifier: newHeadersWithDittoContentType
focal_class.modifiers: public static
focal_class.parameters: (final Map<String, String> headers)
focal_class.return: DittoHeaders
focal_class.signature: DittoHeaders newHeadersWithDittoContentType(final Map<String, String> headers)
focal_class.class_method_signature: ProtocolFactory.newHeaders(final Collection<Map.Entry<String, String>> headers)
focal_class.full_signature: public static DittoHeaders newHeaders(final Collection<Map.Entry<String, String>> headers)
focal_class.identifier: newHeaders
focal_class.modifiers: public static
focal_class.parameters: (final Collection<Map.Entry<String, String>> headers)
focal_class.return: DittoHeaders
focal_class.signature: DittoHeaders newHeaders(final Collection<Map.Entry<String, String>> headers)
focal_class.class_method_signature: ProtocolFactory.newHeaders(final JsonObject headersAsJson)
focal_class.full_signature: public static DittoHeaders newHeaders(final JsonObject headersAsJson)
focal_class.identifier: newHeaders
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject headersAsJson)
focal_class.return: DittoHeaders
focal_class.signature: DittoHeaders newHeaders(final JsonObject headersAsJson)
focal_class.class_method_signature: ProtocolFactory.wrapAsJsonifiableAdaptable(final Adaptable adaptable)
focal_class.full_signature: public static JsonifiableAdaptable wrapAsJsonifiableAdaptable(final Adaptable adaptable)
focal_class.identifier: wrapAsJsonifiableAdaptable
focal_class.modifiers: public static
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: JsonifiableAdaptable
focal_class.signature: JsonifiableAdaptable wrapAsJsonifiableAdaptable(final Adaptable adaptable)
focal_class.class_method_signature: ProtocolFactory.jsonifiableAdaptableFromJson(final JsonObject adaptableAsJson)
focal_class.full_signature: public static JsonifiableAdaptable jsonifiableAdaptableFromJson(final JsonObject adaptableAsJson)
focal_class.identifier: jsonifiableAdaptableFromJson
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject adaptableAsJson)
focal_class.return: JsonifiableAdaptable
focal_class.signature: JsonifiableAdaptable jsonifiableAdaptableFromJson(final JsonObject adaptableAsJson)
focal_method.body: @SuppressWarnings({"squid:S1166"})
      public static TopicPath newTopicPath(final String path) {
          checkNotNull(path, "path");
          final LinkedList<String> parts = new LinkedList<>(Arrays.asList(path.split(TopicPath.PATH_DELIMITER)));
  
          try {
              final String namespace = parts.pop(); // parts[0]
              final String id = parts.pop(); // parts[1]
              final TopicPath.Group group =
                      TopicPath.Group.forName(parts.pop()) // parts[2]
                              .orElseThrow(() -> UnknownTopicPathException.newBuilder(path).build());
  
              final TopicPath.Channel channel;
              switch (group) {
                  case POLICIES:
                      channel = TopicPath.Channel.NONE;
                      break;
                  case THINGS:
                      channel = TopicPath.Channel.forName(parts.pop()) // parts[3]
                              .orElseThrow(() -> UnknownTopicPathException.newBuilder(path).build());
                      break;
                  default:
                      throw UnknownTopicPathException.newBuilder(path).build();
              }
  
              final TopicPath.Criterion criterion =
                      TopicPath.Criterion.forName(parts.pop())
                              .orElseThrow(() -> UnknownTopicPathException.newBuilder(path).build());
  
              switch (criterion) {
                  case COMMANDS:
                  case EVENTS:
                      // commands and events Path always contain an ID:
                      final TopicPath.Action action =
                              TopicPath.Action.forName(parts.pop())
                                      .orElseThrow(() -> UnknownTopicPathException.newBuilder(path).build());
                      return ImmutableTopicPath.of(namespace, id, group, channel, criterion, action);
                  case SEARCH:
                      final TopicPath.SearchAction searchAction =
                              TopicPath.SearchAction.forName(parts.pop())
                                      .orElseThrow(() -> UnknownTopicPathException.newBuilder(path).build());
                      return ImmutableTopicPath.of(namespace, id, group, channel, criterion, searchAction);
                  case ERRORS:
                      // errors Path does neither contain an "action":
                      return ImmutableTopicPath.of(namespace, id, group, channel, criterion);
                  case MESSAGES:
                  case ACKS:
                      // messages should always contain a non-empty subject:
                      // ACK Paths contain a custom acknowledgement label or an empty subject for aggregated ACKs:
                      final String subject = String.join(TopicPath.PATH_DELIMITER, parts);
                      if (subject.isEmpty()) {
                          return ImmutableTopicPath.of(namespace, id, group, channel, criterion);
                      } else {
                          return ImmutableTopicPath.of(namespace, id, group, channel, criterion, subject);
                      }
                  default:
                      throw UnknownTopicPathException.newBuilder(path).build();
              }
          } catch (final NoSuchElementException e) {
              throw UnknownTopicPathException.newBuilder(path).build();
          }
      }
focal_method.class_method_signature: ProtocolFactory.newTopicPath(final String path)
focal_method.full_signature: @SuppressWarnings({"squid:S1166"}) public static TopicPath newTopicPath(final String path)
focal_method.identifier: newTopicPath
focal_method.invocations: checkNotNull asList split pop pop orElseThrow forName pop build newBuilder orElseThrow forName pop build newBuilder build newBuilder orElseThrow forName pop build newBuilder orElseThrow forName pop build newBuilder of orElseThrow forName pop build newBuilder of of join isEmpty of of build newBuilder build newBuilder
focal_method.modifiers: @SuppressWarnings({"squid:S1166"}) public static
focal_method.parameters: (final String path)
focal_method.return: TopicPath
focal_method.signature: TopicPath newTopicPath(final String path)