/**
  * Remove an identity from the client. Note that the client needs at least one identity, the
  * default identity, which can not be removed.
  *
  * @param identity
  * @return true, if successful. Otherwise the default identity was given.
  */
 public boolean removeIdentity(DiscoverInfo.Identity identity) {
   if (identity.equals(this.identity)) return false;
   identities.remove(identity);
   renewEntityCapsVersion();
   return true;
 }
 /**
  * Sets the type of client that will be returned when asked for the client identity in a disco
  * request. The valid types are defined by the category client. Follow this link to learn the
  * possible types: <a
  * href="http://xmpp.org/registrar/disco-categories.html#client">Jabber::Registrar</a>.
  *
  * @param type the type of client that will be returned when asked for the client identity in a
  *     disco request.
  */
 @SuppressWarnings("deprecation")
 public void setIdentityType(String type) {
   identity.setType(type);
   renewEntityCapsVersion();
 }
 /**
  * Sets the name of the client that will be returned when asked for the client identity in a disco
  * request. The name could be any value you need to identity this client.
  *
  * @param name the name of the client that will be returned when asked for the client identity in
  *     a disco request.
  */
 public void setIdentityName(String name) {
   identity.setName(name);
   renewEntityCapsVersion();
 }
 /**
  * Returns the type of client that will be returned when asked for the client identity in a disco
  * request. The valid types are defined by the category client. Follow this link to learn the
  * possible types: <a
  * href="http://xmpp.org/registrar/disco-categories.html#client">Jabber::Registrar</a>.
  *
  * @return the type of client that will be returned when asked for the client identity in a disco
  *     request.
  */
 public String getIdentityType() {
   return identity.getType();
 }
 /**
  * Returns the name of the client that will be returned when asked for the client identity in a
  * disco request. The name could be any value you need to identity this client.
  *
  * @return the name of the client that will be returned when asked for the client identity in a
  *     disco request.
  */
 public String getIdentityName() {
   return identity.getName();
 }