public class JsonSerializationProcessor extends Object implements EntityDocumentProcessor
DatamodelFilter
to eliminate some of the data.
As an example, the program only serializes data for people who were born in
Dresden, Germany. This can be changed by modifying the code in
includeDocument(ItemDocument)
.
Constructor and Description |
---|
JsonSerializationProcessor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the output.
|
static void |
main(String[] args)
Runs the example program.
|
static void |
printDocumentation()
Prints some basic documentation about this program.
|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
void |
processPropertyDocument(PropertyDocument propertyDocument)
Processes the given PropertyDocument.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processEntityRedirectDocument, processLexemeDocument, processMediaInfoDocument
public JsonSerializationProcessor() throws IOException
IOException
- if there is a problem opening the output filepublic static void main(String[] args) throws IOException
args
- IOException
- if there was a problem in writing the output filepublic void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessor
processItemDocument
in interface EntityDocumentProcessor
itemDocument
- the ItemDocumentpublic void processPropertyDocument(PropertyDocument propertyDocument)
EntityDocumentProcessor
processPropertyDocument
in interface EntityDocumentProcessor
propertyDocument
- the PropertyDocumentpublic static void printDocumentation()
public void close()
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage