@Test public void testSimpleFilter() throws IOException, SAXException { Filter filter = createEqualsFilter("my value", "myprop"); String request = org.oskari.csw.request.GetRecords.createRequest(filter); String expected = IOHelper.readString(getClass().getResourceAsStream("GetRecords-simple.xml")); Diff xmlDiff = new Diff(request, expected); assertTrue("Should get expected simple request" + xmlDiff, xmlDiff.similar()); }
public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); static String createRequest(Filter filter); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); static String createRequest(Filter filter);  }