public class SelectivePropHitWriter extends java.lang.Object implements ResultHitWriter
| Constructor and Description |
|---|
SelectivePropHitWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
write(Hit hit,
JSONWriter writer,
Query query)
Writes a given
Hit into the JSONWriter. |
public void write(Hit hit, JSONWriter writer, Query query) throws RepositoryException, JSONException
ResultHitWriterHit into the JSONWriter. This will be
called for each hit of the result page. The surrounding json structure is
an array and each entry should be a simple object. The caller will have
invoked the writer.object() already and will call
writer.endObject() directly after this method returns.write in interface ResultHitWriterhit - the result hit to renderwriter - to output jsonquery - the original query; can be used to access custom parameters
set in the predicate root group (
query.getPredicates().get("param", "default"))RepositoryException - in case access on the hit failedJSONException - in case there is a problem with writing to the jsonwriterCopyright © 2010 - 2023 Adobe. All Rights Reserved