public String getChildElementXML() { StringBuilder buf = new StringBuilder(); if (this.getType().equals(IQ.Type.SET)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\" "); if (getSessionID() != null) { buf.append("id=\"").append(getSessionID()).append("\" "); } if (getMimeType() != null) { buf.append("mime-type=\"").append(getMimeType()).append("\" "); } buf .append("profile=\"http://jabber.org/protocol/si/profile/file-transfer\">"); // Add the file section if there is one. String fileXML = file.toXML(); if (fileXML != null) { buf.append(fileXML); } } else if (this.getType().equals(IQ.Type.RESULT)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\">"); } else { throw new IllegalArgumentException("IQ Type not understood"); } if (featureNegotiation != null) { buf.append(featureNegotiation.toXML()); } buf.append("</si>"); return buf.toString(); }
public String getChildElementXML() { StringBuffer buf = new StringBuffer(); if (this.getType().equals(IQ.Type.SET)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\" "); if (getSessionID() != null) { buf.append("id=\"").append(getSessionID()).append("\" "); } if (getMimeType() != null) { buf.append("mime-type=\"").append(getMimeType()).append("\" "); } buf .append("profile=\"http://jabber.org/protocol/si/profile/file-transfer\">"); // Add the file section if there is one. String fileXML = file.toXML(); if (fileXML != null) { buf.append(fileXML); } } else if (this.getType().equals(IQ.Type.RESULT)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\">"); } else { throw new IllegalArgumentException("IQ Type not understood"); } if (featureNegotiation != null) { buf.append(featureNegotiation.toXML()); } buf.append("</si>"); return buf.toString(); }
public String getChildElementXML() { StringBuilder buf = new StringBuilder(); if (this.getType().equals(IQ.Type.SET)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\" "); if (getSessionID() != null) { buf.append("id=\"").append(getSessionID()).append("\" "); } if (getMimeType() != null) { buf.append("mime-type=\"").append(getMimeType()).append("\" "); } buf .append("profile=\"http://jabber.org/protocol/si/profile/file-transfer\">"); // Add the file section if there is one. String fileXML = file.toXML(); if (fileXML != null) { buf.append(fileXML); } } else if (this.getType().equals(IQ.Type.RESULT)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\">"); } else { throw new IllegalArgumentException("IQ Type not understood"); } if (featureNegotiation != null) { buf.append(featureNegotiation.toXML()); } buf.append("</si>"); return buf.toString(); }
public String getChildElementXML() { StringBuilder buf = new StringBuilder(); if (this.getType().equals(Type.SET)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\" "); if (getSessionID() != null) { buf.append("id=\"").append(getSessionID()).append("\" "); } if (getMimeType() != null) { buf.append("mime-type=\"").append(getMimeType()).append("\" "); } buf .append("profile=\"http://jabber.org/protocol/si/profile/file-transfer\">"); // Add the file section if there is one. String fileXML = file.toXML(); if (fileXML != null) { buf.append(fileXML); } } else if (this.getType().equals(Type.RESULT)) { buf.append("<si xmlns=\"http://jabber.org/protocol/si\">"); } else { throw new IllegalArgumentException("IQ Type not understood"); } if (featureNegotiation != null) { buf.append(featureNegotiation.toXML()); } buf.append("</si>"); return buf.toString(); }