Package org.terrier.rest
Class JSONOutputFormat
- java.lang.Object
-
- org.terrier.rest.JSONOutputFormat
-
- All Implemented Interfaces:
OutputFormat
public class JSONOutputFormat extends java.lang.Object implements OutputFormat
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description JSONOutputFormat(java.lang.Object o)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
contentType()
void
printResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int _RESULTS_LENGTH)
Outputs the results of query q to PrintWriter pw, described by the method, iteration, and the specified limit on the number of results (0 means no limit).
-
-
-
Method Detail
-
printResults
public void printResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int _RESULTS_LENGTH) throws java.io.IOException
Description copied from interface:OutputFormat
Outputs the results of query q to PrintWriter pw, described by the method, iteration, and the specified limit on the number of results (0 means no limit).- Specified by:
printResults
in interfaceOutputFormat
- Throws:
java.io.IOException
-
contentType
public java.lang.String contentType()
- Specified by:
contentType
in interfaceOutputFormat
-
-