public class JsonSerializer extends Object implements EntityDocumentsSerializer
EntityDocumentsSerializer to provide a
JsonSerializer for EntityDocument objects.| Constructor and Description |
|---|
JsonSerializer(OutputStream out)
Creates a new JSON serializer that writes its output to the given stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Writes the footer (if any) on the output and closes the output stream.
|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
void |
processPropertyDocument(PropertyDocument propertyDocument)
Processes the given PropertyDocument.
|
void |
restartProcess()
This function resets the processor.
|
void |
start()
Initializes the serializer and writes the header (if any) to the output.
|
public JsonSerializer(OutputStream out)
out - the output stream to write topublic void restartProcess()
public void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessorprocessItemDocument in interface EntityDocumentProcessoritemDocument - the ItemDocumentpublic void processPropertyDocument(PropertyDocument propertyDocument)
EntityDocumentProcessorprocessPropertyDocument in interface EntityDocumentProcessorpropertyDocument - the PropertyDocumentpublic void start()
EntityDocumentsSerializerstart in interface EntityDocumentsSerializerpublic void close()
EntityDocumentsSerializerclose in interface EntityDocumentsSerializerCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage