FilterStreamType implements Comparable<FilterStreamType> { public String serialize() { StringBuilder builder = new StringBuilder(); builder.append(getType().serialize()); if (getDataFormat() != null) { builder.append('+'); builder.append(getDataFormat()); } if (getVersion() != null) { builder.append('/'); builder.append(getVersion()); } return builder.toString(); } FilterStreamType(SystemType type, String dataFormat);  FilterStreamType(SystemType type, String dataFormat, String version); SystemType getType(); String getDataFormat(); String getVersion(); String serialize(); static FilterStreamType unserialize(String str); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(FilterStreamType o); static final String DATA_XML; static final String DATA_XAR; static final String DATA_TEXT; static final FilterStreamType FILTER_XML; static final FilterStreamType XWIKI_XAR_11; static final FilterStreamType XWIKI_XAR_12; static final FilterStreamType XWIKI_XAR_13; static final FilterStreamType XWIKI_XAR_CURRENT; static final FilterStreamType XWIKI_INSTANCE; static final FilterStreamType CONFLUENCE_XML; static final FilterStreamType MEDIAWIKI_XML; static final FilterStreamType DOKUWIKI_TEXT; }
@Test void testSerializeWithDataAndVersion() { FilterStreamType type = new FilterStreamType(new SystemType("type"), "data", "version"); assertEquals("type+data/version", type.serialize()); }