|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JIDType
public class JIDType
a jid-type is similar to a mime-type. It contains a category and then a subtype in the form of "category/subtype" (ie. text/html). This is the way that jabber uses to identify types when browsing. You need to work with this class to retrieve information returned from a browse result.
A list of JID Types are available online at
http://docs.jabber.org/draft-proto/html/browsing.html
This object is not reusable once instantiated. It is basically immutable.
Constructor Summary | |
---|---|
JIDType(java.lang.String type)
the constructor takes a category/subtype pair string and will parse it into its distinctive parts. |
|
JIDType(java.lang.String category,
java.lang.String subtype)
|
Method Summary | |
---|---|
void |
addChild(JIDType child)
adds a child to the type. |
void |
addNS(Namespace ns)
adds a namespace that the JID type recognizes on how to process. |
java.lang.String |
getCategory()
|
java.util.List |
getChildren()
retrieves the children that are contained inside this JID. |
Element |
getDOM()
Creates a DOM structure that represents all the data contained within this type |
JID |
getJID()
|
java.lang.String |
getJIDType()
retrieves the entire JID type in the form of "category/subtype" |
java.lang.String |
getName()
|
java.util.List |
getNSList()
retrieves the namespaces that the type supports. |
java.lang.String |
getSubtype()
|
void |
parse(Element browse)
parses the incoming message for the data. |
void |
setCategory(java.lang.String category)
sets the category for the type. |
void |
setJID(JID jid)
sets the JID of the type. |
void |
setName(java.lang.String name)
sets the common name for the JID type for easier recognition. |
void |
setSubtype(java.lang.String subtype)
sets the subtype for the type. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JIDType(java.lang.String type) throws ParseException
ParseException
- if the parsing of the category/subtype erroredpublic JIDType(java.lang.String category, java.lang.String subtype)
Method Detail |
---|
public java.lang.String getJIDType()
public java.lang.String getCategory()
public void setCategory(java.lang.String category)
public java.lang.String getSubtype()
public void setSubtype(java.lang.String subtype)
public JID getJID()
public void setJID(JID jid)
public java.lang.String getName()
public void setName(java.lang.String name)
public void addChild(JIDType child)
public void addNS(Namespace ns)
public java.util.List getChildren()
public java.util.List getNSList()
public void parse(Element browse) throws ParseException
ParseException
public Element getDOM() throws ParseException
ParseException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |