|
Wikibase
MediaWiki Wikibase extension
|
JsonDumpGenerator generates an JSON dump of a given set of entities, excluding redirects. More...
Inheritance diagram for Wikibase\Repo\Dumpers\JsonDumpGenerator:
Collaboration diagram for Wikibase\Repo\Dumpers\JsonDumpGenerator:Public Member Functions | |
| __construct ( $out, EntityRevisionLookup $lookup, Serializer $entitySerializer, EntityPrefetcher $entityPrefetcher, PropertyDataTypeLookup $dataTypeLookup) | |
| encode ( $data) | |
| Encodes the given data as JSON. | |
| setUseSnippets ( $useSnippets) | |
| setJsonFlags ( $jsonFlags) | |
| Flags to use with json_encode as a bit field, see PHP's JSON_XXX constants. | |
| getJsonFlags () | |
Public Member Functions inherited from Wikibase\Repo\Dumpers\DumpGenerator | |
| __construct ( $out, EntityPrefetcher $entityPrefetcher) | |
| setLimit ( $limit) | |
| Set maximum number of entities produced. | |
| setBatchSize ( $batchSize) | |
| Sets the batch size for processing. | |
| setProgressReporter (MessageReporter $progressReporter) | |
| setExceptionHandler (ExceptionHandler $exceptionHandler) | |
| setShardingFilter ( $shardingFactor, $shard) | |
| Set the sharding factor and desired shard. | |
| setEntityTypesFilter ( $types) | |
| Set the entity types to be included in the output. | |
| generateDump (EntityIdPager $idPager) | |
| Generates a dump, writing to the file handle provided to the constructor. | |
Protected Member Functions | |
| preDump () | |
| Do something before dumping data. | |
| postDump () | |
| Do something after dumping data. | |
| preEntityDump ( $dumpCount) | |
| Do something before dumping entity. | |
| generateDumpForEntityId (EntityId $entityId) | |
Protected Member Functions inherited from Wikibase\Repo\Dumpers\DumpGenerator | |
| writeToDump ( $data) | |
| Writers the given string to the output provided to the constructor. | |
| preBatchDump ( $entities) | |
| Do something before dumping a batch of entities. | |
| postEntityDump ( $dumpCount) | |
| Do something after dumping entity. | |
Private Member Functions | |
| injectEntitySerializationWithDataTypes (array $serialization) | |
| getArrayWithDataTypesInGroupedSnakListAtPath (array $array, $path) | |
Private Attributes | |
| $jsonFlags = 0 | |
| $entitySerializer | |
| $entityLookup | |
| $dataTypeLookup | |
| $callbackFactory | |
| $modifier | |
| $useSnippets = false | |
Additional Inherited Members | |
Protected Attributes inherited from Wikibase\Repo\Dumpers\DumpGenerator | |
| $batchSize = 100 | |
| $out | |
| $shardingFactor = 1 | |
| $shard = 0 | |
| $progressReporter | |
| $exceptionHandler | |
| $entityPrefetcher | |
| $entityTypes | |
| $limit = 0 | |
JsonDumpGenerator generates an JSON dump of a given set of entities, excluding redirects.
| Wikibase\Repo\Dumpers\JsonDumpGenerator::__construct | ( | $out, | |
| EntityRevisionLookup | $lookup, | ||
| Serializer | $entitySerializer, | ||
| EntityPrefetcher | $entityPrefetcher, | ||
| PropertyDataTypeLookup | $dataTypeLookup | ||
| ) |
| resource | $out | |
| EntityRevisionLookup | $lookup | |
| Serializer | $entitySerializer | |
| EntityPrefetcher | $entityPrefetcher | |
| PropertyDataTypeLookup | $dataTypeLookup |
| InvalidArgumentException |
| Wikibase\Repo\Dumpers\JsonDumpGenerator::encode | ( | $data | ) |
Encodes the given data as JSON.
| mixed | $data |
| MWException |
|
protected |
| EntityId | $entityId |
| EntityLookupException | |
| StorageException |
Reimplemented from Wikibase\Repo\Dumpers\DumpGenerator.
|
private |
| array | $array | |
| string | $path |
| Wikibase\Repo\Dumpers\JsonDumpGenerator::getJsonFlags | ( | ) |
|
private |
| array | $serialization |
|
protected |
Do something after dumping data.
Reimplemented from Wikibase\Repo\Dumpers\DumpGenerator.
|
protected |
Do something before dumping data.
Reimplemented from Wikibase\Repo\Dumpers\DumpGenerator.
|
protected |
Do something before dumping entity.
| int | $dumpCount |
Reimplemented from Wikibase\Repo\Dumpers\DumpGenerator.
| Wikibase\Repo\Dumpers\JsonDumpGenerator::setJsonFlags | ( | $jsonFlags | ) |
Flags to use with json_encode as a bit field, see PHP's JSON_XXX constants.
| int | $jsonFlags |
| Wikibase\Repo\Dumpers\JsonDumpGenerator::setUseSnippets | ( | $useSnippets | ) |
| bool | $useSnippets | Whether to output valid json (false) or only comma separated entities |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |