public class XmlResponseSerializer extends Object implements ResponseSerializer
Constructor and Description |
---|
XmlResponseSerializer() |
Modifier and Type | Method and Description |
---|---|
String |
getSupportedMediaType()
Returns supported media type.
|
String |
serializeReadFlat(SqlResource sqlResource,
ResultSet resultSet)
Converts flat select results to an XML document.
|
String |
serializeReadHierarchical(SqlResource sqlResource,
List<Map<String,Object>> results)
Converts hierarchical select results to an XML document.
|
String |
serializeWrite(SqlResource sqlResource,
WriteResponse response)
Converts write results to an XML document.
|
static void |
setUseXmlDirective(boolean use)
Overrides configuration.
|
static void |
setUseXmlSchema(boolean use)
Overrides configuration.
|
public static void setUseXmlDirective(boolean use)
public static void setUseXmlSchema(boolean use)
public String getSupportedMediaType()
ResponseSerializer
getSupportedMediaType
in interface ResponseSerializer
public String serializeReadFlat(SqlResource sqlResource, ResultSet resultSet) throws SQLException
serializeReadFlat
in interface ResponseSerializer
sqlResource
- SQL resourceresultSet
- resultsSQLException
public String serializeReadHierarchical(SqlResource sqlResource, List<Map<String,Object>> results)
serializeReadHierarchical
in interface ResponseSerializer
sqlResource
- SQL resourceresults
- resultspublic String serializeWrite(SqlResource sqlResource, WriteResponse response)
serializeWrite
in interface ResponseSerializer
response
- responsesqlResource
- SQL resourceCopyright © 2011-2018 restSQL Project Contributors