Esri Geoportal Server
1.0

com.esri.gpt.control.rest.writer
Class JsonResultSetWriter

java.lang.Object
  extended by com.esri.gpt.control.rest.writer.ResponseWriter
      extended by com.esri.gpt.control.rest.writer.ResultSetWriter
          extended by com.esri.gpt.control.rest.writer.JsonResultSetWriter

public class JsonResultSetWriter
extends ResultSetWriter

Writes a JSON response based upon a JDBC ResultSet.


Field Summary
 
Fields inherited from class com.esri.gpt.control.rest.writer.ResponseWriter
DEFAULT_NEWLINE, DEFAULT_TAB
 
Constructor Summary
JsonResultSetWriter(Writer underlyingWriter)
          Constructs with an underlying response writer.
 
Method Summary
 void endRow(int depth)
          Ends a row.
 void endRows(int depth)
          Ends a collection of rows.
 String getContentType()
          Gets the response content type.
 void startRow(int depth)
          Starts a row.
 void startRows(int depth)
          Starts a collection of rows.
 void writeCell(String name, Object value, int depth)
          Writes a cell property value.
 
Methods inherited from class com.esri.gpt.control.rest.writer.ResultSetWriter
writeResultSet
 
Methods inherited from class com.esri.gpt.control.rest.writer.ResponseWriter
begin, close, flush, getNewline, getTab, getUnderlyingWriter, makeTabs, setNewline, setTab, setUnderlyingWriter, wasWrittenTo, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonResultSetWriter

public JsonResultSetWriter(Writer underlyingWriter)
Constructs with an underlying response writer.

Parameters:
underlyingWriter - the underlying writer
Method Detail

getContentType

public String getContentType()
Gets the response content type.

Specified by:
getContentType in class ResponseWriter
Returns:
the response content type

endRow

public void endRow(int depth)
            throws IOException
Ends a row.

Specified by:
endRow in class ResultSetWriter
Parameters:
depth - the indent depth
Throws:
IOException - if an I/O exception occurs

endRows

public void endRows(int depth)
             throws IOException
Ends a collection of rows.

Specified by:
endRows in class ResultSetWriter
Parameters:
depth - the indent depth
Throws:
IOException - if an I/O exception occurs

startRow

public void startRow(int depth)
              throws IOException
Starts a row.

Specified by:
startRow in class ResultSetWriter
Parameters:
depth - the indent depth
Throws:
IOException - if an I/O exception occurs

startRows

public void startRows(int depth)
               throws IOException
Starts a collection of rows.

Specified by:
startRows in class ResultSetWriter
Parameters:
depth - the indent depth
Throws:
IOException - if an I/O exception occurs

writeCell

public void writeCell(String name,
                      Object value,
                      int depth)
               throws IOException
Writes a cell property value.

Specified by:
writeCell in class ResultSetWriter
Parameters:
name - the property name
value - the property value
depth - the indent depth
Throws:
IOException - if an I/O exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.