/**
   * Initialize a new IdentityManager
   *
   * @param pr
   * @param identity - can either be an identity or NULL for a generic identity manager for
   *     resolving stuff (can't calculate trust values)
   */
  public IdentityManager(PluginRespirator pr, Map<String, String> identity) {
    this.pr = pr;
    this.own_identity = identity;

    try {
      this.talker = pr.getPluginTalker(this, Frirc.WoT_NAMESPACE, "WoT");
    } catch (PluginNotFoundException e) {
      e.printStackTrace();
    }

    if (identity != null) sendFCPAllIdentities(identity);
    sendFCPOwnIdentities();
  }
  private synchronized void sendFCPAllIdentities(Map<String, String> identity) {
    PluginTalker talker;
    try {
      talker = pr.getPluginTalker(this, Frirc.WoT_NAMESPACE, "");
      SimpleFieldSet sfs = new SimpleFieldSet(true);
      sfs.putOverwrite("Message", "GetTrustees");
      sfs.putOverwrite(
          "Identity",
          identity.get("ID")
              .split(",")[
              0]); // a personal identity (associated through source) (only pass the ID, not the
      // full SSK)
      sfs.putOverwrite(
          "Context", "FrIRC"); // empty means selecting all identities no matter the context
      talker.send(sfs, null); // send message to WoT plugin

      if (Frirc.DEBUG)
        System.out.println("requested identities for identity " + identity.get("ID").split(",")[0]);
    } catch (PluginNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }