public Route(Route route) { Element elementCopy = route.element.createCopy(); docFactory.createDocument().add(elementCopy); this.element = elementCopy; // Copy cached JIDs (for performance reasons) this.toJID = route.toJID; this.fromJID = route.fromJID; }
/** * Constructs a new Route. * * @param streamID the stream ID that identifies the connection that is actually sending * the wrapped stanza. */ public Route(StreamID streamID) { this.element = docFactory.createDocument().addElement("route"); // Set the stream ID that identifies the target session element.addAttribute("streamid", streamID.getID()); }
private String getAvailablePluginsUpdateRequest() { Element xmlRequest = docFactory.createDocument().addElement("available"); // Add locale so we can get current name and description of plugins Element locale = xmlRequest.addElement("locale"); locale.addText(JiveGlobals.getLocale().toString()); return xmlRequest.asXML(); }
/** * Convert the BugCollection into a dom4j Document object. * * @return the Document representing the BugCollection as a dom4j tree */ @Override public Document toDocument() { // if (project == null) throw new NullPointerException("No project"); assert project != null; DocumentFactory docFactory = new DocumentFactory(); Document document = docFactory.createDocument(); Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput(document); try { writeXML(treeBuilder); } catch (IOException e) { // Can't happen } return document; }
Element xmlResponse = docFactory.createDocument().addElement("version"); if (serverUpdate != null) { Element component = xmlResponse.addElement("openfire");
private Element generateRevisionInfoRelationMapping() { final Document document = globalCfg.getEnversService().getXmlHelper().getDocumentFactory().createDocument(); final Element revRelMapping = document.addElement( "key-many-to-one" ); revRelMapping.addAttribute( "type", revisionPropType ); revRelMapping.addAttribute( "class", revisionInfoEntityName ); if ( revisionPropSqlType != null ) { // Putting a fake name to make Hibernate happy. It will be replaced later anyway. MetadataTools.addColumn( revRelMapping, "*", null, null, null, revisionPropSqlType, null, null, false ); } return revRelMapping; }
/** * Returns an Element with the privacy list XML representation. * * @return an Element with the privacy list XML representation. */ public Element asElement() { //Element listElement = DocumentFactory.getInstance().createDocument().addElement("list"); Element listElement = DocumentFactory.getInstance().createDocument() .addElement("list", "jabber:iq:privacy"); listElement.addAttribute("name", getName()); // Add the list items to the result for (PrivacyItem item : items) { listElement.add(item.asElement()); } return listElement; }
private String getServerUpdateRequest() { XMPPServer server = XMPPServer.getInstance(); Element xmlRequest = docFactory.createDocument().addElement("version"); // Add current openfire version Element openfire = xmlRequest.addElement("openfire"); openfire.addAttribute("current", server.getServerInfo().getVersion().getVersionString()); return xmlRequest.asXML(); }
Element xml = docFactory.createDocument().addElement("available"); for (AvailablePlugin plugin : availablePlugins.values()) { Element component = xml.addElement("plugin");
private Document createDocument(final Reflections reflections) { Store map = reflections.getStore(); Document document = DocumentFactory.getInstance().createDocument(); Element root = document.addElement("Reflections"); for (String indexName : map.keySet()) { Element indexElement = root.addElement(indexName); for (String key : map.get(indexName).keySet()) { Element entryElement = indexElement.addElement("entry"); entryElement.addElement("key").setText(key); Element valuesElement = entryElement.addElement("values"); for (String value : map.get(indexName).get(key)) { valuesElement.addElement("value").setText(value); } } } return document; } }
if ( defaultPrivacyList == null ) final Element listElement = DocumentFactory.getInstance().createDocument().addElement( "list", "jabber:iq:privacy" ); listElement.addAttribute( "name", "blocklist" );
private Document createDocument(final Reflections reflections) { Store map = reflections.getStore(); Document document = DocumentFactory.getInstance().createDocument(); Element root = document.addElement("Reflections"); for (String indexName : map.keySet()) { Element indexElement = root.addElement(indexName); for (String key : map.get(indexName).keySet()) { Element entryElement = indexElement.addElement("entry"); entryElement.addElement("key").setText(key); Element valuesElement = entryElement.addElement("values"); for (String value : map.get(indexName).get(key)) { valuesElement.addElement("value").setText(value); } } } return document; } }
Document doc = DocumentFactory.getInstance().createDocument(); generatedModel = coreModel.createCopy(); doc.add(generatedModel);
public Document createDocument(Element rootElement) { return proxy.createDocument(rootElement); }
public Document createDocument() { return proxy.createDocument(); }
public Document parseDocument() throws DocumentException, IOException, XmlPullParserException { DocumentFactory df = getDocumentFactory(); Document document = df.createDocument(); Element parent = null; XmlPullParser pp = getXPPParser();
public Document createDocument(Element rootElement) { Document answer = createDocument(); answer.setRootElement(rootElement); return answer; }
public static Document createDocument(Element rootElement) { return getDocumentFactory().createDocument(rootElement); }
public static Document createDocument() { return getDocumentFactory().createDocument(); }
private Document generateDefaultRevisionInfoXmlMapping() { final Document document = globalCfg.getEnversService().getXmlHelper().getDocumentFactory().createDocument();