public final class NodeMetaData extends Object
DataForm with form type http://jabber.org/protocol/pubsub#meta-data, which can be used to retrieve node meta data.
DataForm to retrieve standard data from it, use:
NodeMetaData nodeMetaData = new NodeMetaData(dataForm);
To build a form:
NodeMetaData nodeMetaData = NodeMetaData.builder()
.contacts(Collections.singleton(Jid.of("contact")))
.creationDate(date)
.creator(Jid.of("creator"))
.description("desc")
.language("de")
.numberOfSubscribers(2)
.owners(Collections.singleton(Jid.of("owner")))
.publishers(Collections.singleton(Jid.of("publisher")))
.title("title")
.payloadType("namespace")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeMetaData.Builder
A builder class to build the meta data form.
|
| Constructor and Description |
|---|
NodeMetaData(DataForm dataForm)
Creates a node meta data form.
|
| Modifier and Type | Method and Description |
|---|---|
static NodeMetaData.Builder |
builder()
Creates the builder to build a meta data form.
|
List<rocks.xmpp.addr.Jid> |
getContacts()
Gets the contacts.
|
Instant |
getCreationDate()
Gets the creation date.
|
rocks.xmpp.addr.Jid |
getCreator()
Gets the creator.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
String |
getDescription()
Gets the description.
|
Locale |
getLanguage()
Gets the language.
|
String |
getNodeTitle()
Gets the title.
|
Integer |
getNumberOfSubscribers()
Gets the number of subscribers.
|
List<rocks.xmpp.addr.Jid> |
getOwners()
Gets the owners.
|
String |
getPayloadType()
Gets the payload type of the node.
|
List<rocks.xmpp.addr.Jid> |
getPublishers()
Gets the publishers.
|
public static final String FORM_TYPE
public NodeMetaData(DataForm dataForm)
dataForm - The underlying data form.public static NodeMetaData.Builder builder()
public final DataForm getDataForm()
public final List<rocks.xmpp.addr.Jid> getContacts()
public final Instant getCreationDate()
public final rocks.xmpp.addr.Jid getCreator()
public final String getDescription()
public final Locale getLanguage()
public final Integer getNumberOfSubscribers()
public final List<rocks.xmpp.addr.Jid> getOwners()
public final List<rocks.xmpp.addr.Jid> getPublishers()
public final String getNodeTitle()
public final String getPayloadType()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.