org.jivesoftware.xiff.data.browse
class BrowseItem
Object
|
+--org.jivesoftware.xiff.data.XMLStanza
|
+--org.jivesoftware.xiff.data.browse.BrowseItem
Implemented Interfaces: ISerializableAll Known Subclasses: BrowseExtensionclass BrowseItem extends XMLStanza
Class that representes a child resource of a browsed resource.
- Author:Sean Treadway
- Since:2.0.0
Fields inherited from class org.jivesoftware.xiff.data.XMLStanza
Property Summary
[optional] One of the categories from the list above, or a non-standard category prefixed with the string "x-".
[required] The full JabberID of the entity described
[optional] A friendly name that may be used in a user interface
On top of the browsing framework, a simple form of "feature advertisement" can be built. This enables any entity to advertise which features it supports, based on the namespaces associated with those features. The element is allowed as a subelement of the item. This element contains a single namespace that the entity supports, and multiple elements can be included in any item. For a connected client this might be jabber:iq:oob , or for a service jabber:iq:search . This list of namespaces should be used to present available options for a user or to automatically locate functionality for an application. The children of a browse result may proactively contain a few elements (such as the result of the service request to the home server), which advertises the features that the particular service supports. This list may not be complete (it is only for first-pass filtering by simpler clients), and the JID should be browsed if a complete list is required.
[optional] -- One of the official types from the specified category, or a non-standard type prefixed with the string "x-".
[optional] A string containing the version of the node, equivalent to the response provided to a query in the 'jabber:iq:version' namespace. This is useful for servers, especially for lists of services (see the 'service/serverlist' category/type above).
Method Summary
Add new features that are supported if you are responding to a browse request
Called when data is retrieved from the XMLSocket, use this method to extract any state into internal state.
Called when the library need to retrieve the state of the instance. If the instance manages its own state, then the state should be copied into the XMLNode passed. If the instance also implements INodeProxy, then the parent should be verified against the parent XMLNode passed to determine if the serialization is in the same namespace.
Methods inherited from class org.jivesoftware.xiff.data.XMLStanza
Property Documentation
category
public category: String (read, write)
[optional] One of the categories from the list above, or a non-standard category prefixed with the string "x-".
- See also:http://www.jabber.org/jeps/jep-0011.html.sect-id2594870
name
public name: String (read, write)
[optional] A friendly name that may be used in a user interface
namespaces
public namespaces: Array (read-only)
On top of the browsing framework, a simple form of "feature advertisement" can be built. This enables any entity to advertise which features it supports, based on the namespaces associated with those features. The element is allowed as a subelement of the item. This element contains a single namespace that the entity supports, and multiple elements can be included in any item. For a connected client this might be jabber:iq:oob , or for a service jabber:iq:search . This list of namespaces should be used to present available options for a user or to automatically locate functionality for an application. The children of a browse result may proactively contain a few elements (such as the result of the service request to the home server), which advertises the features that the particular service supports. This list may not be complete (it is only for first-pass filtering by simpler clients), and the JID should be browsed if a complete list is required.
type
public type: String (read, write)
[optional] -- One of the official types from the specified category, or a non-standard type prefixed with the string "x-".
- See also:http://www.jabber.org/jeps/jep-0011.html.sect-id2594870
version
public version: String (read, write)
[optional] A string containing the version of the node, equivalent to the response provided to a query in the 'jabber:iq:version' namespace. This is useful for servers, especially for lists of services (see the 'service/serverlist' category/type above).
Constructor Documentation
BrowseItem
public function BrowseItem (
parent: XMLNode)
Static class variables to be overridden in subclasses;
Method Documentation
addNamespace
public function addNamespace (
ns: String): XMLNode
Add new features that are supported if you are responding to a browse request
deserialize
public function deserialize (
node: XMLNode): Boolean
Called when data is retrieved from the XMLSocket, use this method to extract any state into internal state.
- Specified by:deserialize in interface org.jivesoftware.xiff.data.ISerializable
- Parameters:
node (XMLNode) The node that should be used as the data container.
serialize
public function serialize (
parentNode: XMLNode): Boolean
Called when the library need to retrieve the state of the instance. If the instance manages its own state, then the state should be copied into the XMLNode passed. If the instance also implements INodeProxy, then the parent should be verified against the parent XMLNode passed to determine if the serialization is in the same namespace.
- Specified by:serialize in interface org.jivesoftware.xiff.data.ISerializable
- Parameters:
parentNode (XMLNode) The container of the XML.
- BrowseItem.as, Last Modified: 3/10/2005 10:09:32 PM