List of usage examples for org.dom4j QName get
public static QName get(String qualifiedName, String uri)
From source file:org.xmpp.packet.Packet.java
License:Open Source License
/** * Deletes the first element whose element name and namespace matches the specified * element name and namespace.<p>//from w w w .j a v a 2s . c o m * * Notice that this method may remove any child element that matches the specified * element name and namespace even if that element was not added to the Packet using a * {@link PacketExtension}. * * * @param name the child element name. * @param namespace the child element namespace. * @return true if a child element was removed. */ public boolean deleteExtension(String name, String namespace) { List extensions = element.elements(QName.get(name, namespace)); if (!extensions.isEmpty()) { element.remove((Element) extensions.get(0)); return true; } return false; }
From source file:org.xmpp.packet.PacketExtension.java
License:Open Source License
/** * Returns the extension class to use for the specified element name and namespace. For * instance, the DataForm class should be used for the element "x" and * namespace "jabber:x:data".//from w ww . j a va2s .c om * * @param name the child element name. * @param namespace the child element namespace. * @return the extension class to use for the specified element name and namespace. */ public static Class getExtensionClass(String name, String namespace) { return registeredExtensions.get(QName.get(name, namespace)); }
From source file:qflag.ucstar.plugin.hanlde.IQXStandardAllAuthHandler.java
License:Open Source License
/** * Clients are not authenticated when accessing this handler. *//*www . j a v a 2 s . c o m*/ public IQXStandardAllAuthHandler() { super("XMPP Authentication handler"); info = new IQHandlerInfo("query", "jabber:iq:auth"); probeResponse = DocumentHelper.createElement(QName.get("query", "jabber:iq:auth")); probeResponse.addElement("username"); if (AuthFactory.isPlainSupported()) { probeResponse.addElement("password"); } if (AuthFactory.isDigestSupported()) { probeResponse.addElement("digest"); } probeResponse.addElement("resource"); anonymousAllowed = "true".equals(JiveGlobals.getProperty("xmpp.auth.anonymous")); }
From source file:tk.barrydegraaff.accounthistory.accountHistoryService.java
License:Open Source License
public void registerHandlers(DocumentDispatcher dispatcher) { dispatcher.registerHandler(QName.get("accountHistory", namespace), new accountHistory()); }
From source file:tk.barrydegraaff.AccountHistoryAdmin.AccountHistoryAdminService.java
License:Open Source License
public void registerHandlers(DocumentDispatcher dispatcher) { dispatcher.registerHandler(QName.get("AccountHistoryAdmin", namespace), new AccountHistoryAdminSoapHandler()); }
From source file:tk.barrydegraaff.announcements.AnnoucementsService.java
License:Open Source License
public void registerHandlers(DocumentDispatcher dispatcher) { dispatcher.registerHandler(QName.get("Announcements", namespace), new Announcements()); }
From source file:tk.barrydegraaff.ocs.OCSService.java
License:Open Source License
public void registerHandlers(DocumentDispatcher dispatcher) { dispatcher.registerHandler(QName.get("OCS", namespace), new OCS()); }
From source file:tk.barrydegraaff.toolkit.ShareToolkitService.java
License:Open Source License
public void registerHandlers(DocumentDispatcher dispatcher) { dispatcher.registerHandler(QName.get("ShareToolkit", namespace), new ShareToolkitSoapHandler()); }
From source file:z.pn.xmpp.handler.IQRegisterHandler.java
License:Open Source License
/** * Constructor./* ww w . j a v a 2s. c o m*/ */ public IQRegisterHandler() { userService = ((ServiceLocator) SpringUtil.getbean("serviceLocator")).getUserService(); probeResponse = DocumentHelper.createElement(QName.get("query", NAMESPACE)); probeResponse.addElement("username"); probeResponse.addElement("password"); probeResponse.addElement("email"); probeResponse.addElement("name"); }