@Test public void toXML() { assertEquals(xml, builder.build().toXML().toString()); }
public CharSequence toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); if (getMediaType() != null && !getMediaType().isEmpty()) { xml.openElement(ELEMENT_MEDIA_TYPE); xml.append(getMediaType()); xml.closeElement(ELEMENT_MEDIA_TYPE); } if (getName() != null && !getName().isEmpty()) { xml.openElement(ELEMENT_NAME); xml.append(getName()); xml.closeElement(ELEMENT_NAME); } if (getHeight() > 0) { xml.openElement(ELEMENT_HEIGHT); xml.append(String.valueOf(getHeight())); xml.closeElement(ELEMENT_HEIGHT); } if (getWidth() > 0) { xml.openElement(ELEMENT_WIDTH); xml.append(String.valueOf(getWidth())); xml.closeElement(ELEMENT_WIDTH); } if (getSize() > 0) { xml.openElement(ELEMENT_SIZE); xml.append(String.valueOf(getSize())); xml.closeElement(ELEMENT_SIZE); } if (getDesc() != null && !getDesc().isEmpty()) { xml.openElement(ELEMENT_DESC); xml.append(getDesc()); xml.closeElement(ELEMENT_DESC); } if (getDuration() > 0) { xml.openElement(ELEMENT_DURATION); xml.append(String.valueOf(getDuration())); xml.closeElement(ELEMENT_DURATION); } xml.closeElement(ELEMENT); return xml; }
RefFile { public CharSequence toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); if (getMediaType() != null && !getMediaType().isEmpty()) { xml.openElement(ELEMENT_MEDIA_TYPE); xml.append(getMediaType()); xml.closeElement(ELEMENT_MEDIA_TYPE); } if (getName() != null && !getName().isEmpty()) { xml.openElement(ELEMENT_NAME); xml.append(getName()); xml.closeElement(ELEMENT_NAME); } if (getHeight() > 0) { xml.openElement(ELEMENT_HEIGHT); xml.append(String.valueOf(getHeight())); xml.closeElement(ELEMENT_HEIGHT); } if (getWidth() > 0) { xml.openElement(ELEMENT_WIDTH); xml.append(String.valueOf(getWidth())); xml.closeElement(ELEMENT_WIDTH); } if (getSize() > 0) { xml.openElement(ELEMENT_SIZE); xml.append(String.valueOf(getSize())); xml.closeElement(ELEMENT_SIZE); } if (getDesc() != null && !getDesc().isEmpty()) { xml.openElement(ELEMENT_DESC); xml.append(getDesc()); xml.closeElement(ELEMENT_DESC); } if (getDuration() > 0) { xml.openElement(ELEMENT_DURATION); xml.append(String.valueOf(getDuration())); xml.closeElement(ELEMENT_DURATION); } xml.closeElement(ELEMENT); return xml; } }
RefFile { public CharSequence toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); if (getMediaType() != null && !getMediaType().isEmpty()) { xml.openElement(ELEMENT_MEDIA_TYPE); xml.append(getMediaType()); xml.closeElement(ELEMENT_MEDIA_TYPE); } if (getName() != null && !getName().isEmpty()) { xml.openElement(ELEMENT_NAME); xml.append(getName()); xml.closeElement(ELEMENT_NAME); } if (getHeight() > 0) { xml.openElement(ELEMENT_HEIGHT); xml.append(String.valueOf(getHeight())); xml.closeElement(ELEMENT_HEIGHT); } if (getWidth() > 0) { xml.openElement(ELEMENT_WIDTH); xml.append(String.valueOf(getWidth())); xml.closeElement(ELEMENT_WIDTH); } if (getSize() > 0) { xml.openElement(ELEMENT_SIZE); xml.append(String.valueOf(getSize())); xml.closeElement(ELEMENT_SIZE); } if (getDesc() != null && !getDesc().isEmpty()) { xml.openElement(ELEMENT_DESC); xml.append(getDesc()); xml.closeElement(ELEMENT_DESC); } if (getDuration() > 0) { xml.openElement(ELEMENT_DURATION); xml.append(String.valueOf(getDuration())); xml.closeElement(ELEMENT_DURATION); } xml.closeElement(ELEMENT); return xml; }  }
RefFile { public CharSequence toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); if (getMediaType() != null && !getMediaType().isEmpty()) { xml.openElement(ELEMENT_MEDIA_TYPE); xml.append(getMediaType()); xml.closeElement(ELEMENT_MEDIA_TYPE); } if (getName() != null && !getName().isEmpty()) { xml.openElement(ELEMENT_NAME); xml.append(getName()); xml.closeElement(ELEMENT_NAME); } if (getHeight() > 0) { xml.openElement(ELEMENT_HEIGHT); xml.append(String.valueOf(getHeight())); xml.closeElement(ELEMENT_HEIGHT); } if (getWidth() > 0) { xml.openElement(ELEMENT_WIDTH); xml.append(String.valueOf(getWidth())); xml.closeElement(ELEMENT_WIDTH); } if (getSize() > 0) { xml.openElement(ELEMENT_SIZE); xml.append(String.valueOf(getSize())); xml.closeElement(ELEMENT_SIZE); } if (getDesc() != null && !getDesc().isEmpty()) { xml.openElement(ELEMENT_DESC); xml.append(getDesc()); xml.closeElement(ELEMENT_DESC); } if (getDuration() > 0) { xml.openElement(ELEMENT_DURATION); xml.append(String.valueOf(getDuration())); xml.closeElement(ELEMENT_DURATION); } xml.closeElement(ELEMENT); return xml; }  String getMediaType(); String getName(); String getDesc(); int getHeight(); int getWidth(); long getSize(); long getDuration(); CharSequence toXML(); static Builder newBuilder(); }
RefFile { public CharSequence toXML() { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); if (getMediaType() != null && !getMediaType().isEmpty()) { xml.openElement(ELEMENT_MEDIA_TYPE); xml.append(getMediaType()); xml.closeElement(ELEMENT_MEDIA_TYPE); } if (getName() != null && !getName().isEmpty()) { xml.openElement(ELEMENT_NAME); xml.append(getName()); xml.closeElement(ELEMENT_NAME); } if (getHeight() > 0) { xml.openElement(ELEMENT_HEIGHT); xml.append(String.valueOf(getHeight())); xml.closeElement(ELEMENT_HEIGHT); } if (getWidth() > 0) { xml.openElement(ELEMENT_WIDTH); xml.append(String.valueOf(getWidth())); xml.closeElement(ELEMENT_WIDTH); } if (getSize() > 0) { xml.openElement(ELEMENT_SIZE); xml.append(String.valueOf(getSize())); xml.closeElement(ELEMENT_SIZE); } if (getDesc() != null && !getDesc().isEmpty()) { xml.openElement(ELEMENT_DESC); xml.append(getDesc()); xml.closeElement(ELEMENT_DESC); } if (getDuration() > 0) { xml.openElement(ELEMENT_DURATION); xml.append(String.valueOf(getDuration())); xml.closeElement(ELEMENT_DURATION); } xml.closeElement(ELEMENT); return xml; }  String getMediaType(); String getName(); String getDesc(); int getHeight(); int getWidth(); long getSize(); long getDuration(); CharSequence toXML(); static Builder newBuilder(); static final String ELEMENT; static final String ELEMENT_MEDIA_TYPE; static final String ELEMENT_NAME; static final String ELEMENT_DESC; static final String ELEMENT_HEIGHT; static final String ELEMENT_WIDTH; static final String ELEMENT_SIZE; static final String ELEMENT_DURATION; }