code: private static void removeEmbed(FramingContext state, String id) {
          // get existing embed
          final Map<String, EmbedNode> links = state.uniqueEmbeds;
          final EmbedNode embed = links.get(id);
          final Object parent = embed.parent;
          final String property = embed.property;
  
          // create reference to replace embed
          final Map<String, Object> node = newMap(JsonLdConsts.ID, id);
  
          // remove existing embed
          if (JsonLdUtils.isNode(parent)) {
              // replace subject with reference
              final List<Object> newvals = new ArrayList<Object>();
              final List<Object> oldvals = (List<Object>) ((Map<String, Object>) parent)
                      .get(property);
              for (final Object v : oldvals) {
                  if (v instanceof Map
                          && Obj.equals(((Map<String, Object>) v).get(JsonLdConsts.ID), id)) {
                      newvals.add(node);
                  } else {
                      newvals.add(v);
                  }
              }
              ((Map<String, Object>) parent).put(property, newvals);
          }
          // recursively remove dependent dangling embeds
          removeDependents(links, id);
      }
docs: Removes an existing embed.
  
  @param state
  the current framing state.
  @param id
  the @id of the embed to remove.