com.echomine.jabber.msg
Class ServiceIdentity

java.lang.Object
  extended by com.echomine.jabber.msg.ServiceIdentity

public class ServiceIdentity
extends java.lang.Object

Supporting class to work with Service Discovery protocol. This objects contains data for one identity entry

Since:
0.8a4
See Also:
ServiceInfoIQMessage

Constructor Summary
ServiceIdentity(Element identElem)
          parses out the data for the identity out of the element
ServiceIdentity(java.lang.String category, java.lang.String name)
          constructor to work with the required fields
ServiceIdentity(java.lang.String category, java.lang.String name, java.lang.String type)
          constructor to work with the data
 
Method Summary
 Element encode()
          encodes the data into an identity element and returns it for inclusion into another dom tree
 java.lang.String getCategory()
           
 java.lang.String getName()
           
 java.lang.String getType()
           
 void parse(Element identElem)
          parses the element for the required data
 void setCategory(java.lang.String category)
          sets the category name of the identity.
 void setName(java.lang.String name)
          sets the name/description of the identity.
 void setType(java.lang.String type)
          sets the identity type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceIdentity

public ServiceIdentity(java.lang.String category,
                       java.lang.String name)
constructor to work with the required fields

Parameters:
category - the category name
name - the name/description of the category

ServiceIdentity

public ServiceIdentity(java.lang.String category,
                       java.lang.String name,
                       java.lang.String type)
constructor to work with the data

Parameters:
category - the category name
name - the name/description of the category
type - optional type, can be null

ServiceIdentity

public ServiceIdentity(Element identElem)
                throws ParseException
parses out the data for the identity out of the element

Throws:
ParseException
Method Detail

getCategory

public java.lang.String getCategory()
Returns:
the category name of the identity

setCategory

public void setCategory(java.lang.String category)
sets the category name of the identity. Cannot be null.


getName

public java.lang.String getName()
Returns:
the name/description of the identity

setName

public void setName(java.lang.String name)
sets the name/description of the identity. Cannot be null.


getType

public java.lang.String getType()
Returns:
the identity type, or null if no type exists

setType

public void setType(java.lang.String type)
sets the identity type. can be null.


parse

public void parse(Element identElem)
           throws ParseException
parses the element for the required data

Throws:
ParseException

encode

public Element encode()
encodes the data into an identity element and returns it for inclusion into another dom tree



Copyright © 2001-2005 Echomine. All Rights Reserved.