public class RdfSerializer extends Object implements EntityDocumentDumpProcessor
EntityDocumentDumpProcessor
to provide a RDF
serializer to render RDF graphs of EntityDocument
objects.Modifier and Type | Field and Description |
---|---|
static int |
TASK_ALIASES |
static int |
TASK_ALL_ENTITIES |
static int |
TASK_ALL_EXACT_DATA |
static int |
TASK_DATATYPES |
static int |
TASK_DESCRIPTIONS |
static int |
TASK_ITEMS |
static int |
TASK_LABELS |
static int |
TASK_PROPERTIES |
static int |
TASK_PROPERTY_LINKS |
static int |
TASK_SIMPLE_STATEMENTS |
static int |
TASK_SITELINKS |
static int |
TASK_STATEMENTS |
static int |
TASK_TERMS |
Constructor and Description |
---|
RdfSerializer(org.eclipse.rdf4j.rio.RDFFormat format,
OutputStream output,
Sites sites,
PropertyRegister propertyRegister)
Creates a new RDF serializer for the specified format and output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Finishes the processing by performing any final steps, such as closing
resources.
|
int |
getTasks()
Returns the tasks that should be performed during export.
|
long |
getTripleCount()
Returns the number of triples that have been written so far.
|
void |
open()
Starts the processing by performing any initial steps to prepare
processing.
|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
void |
processPropertyDocument(PropertyDocument propertyDocument)
Processes the given PropertyDocument.
|
void |
setTasks(int tasks)
Sets the tasks that should be performed during export.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processEntityRedirectDocument, processLexemeDocument, processMediaInfoDocument
public static final int TASK_STATEMENTS
public static final int TASK_SITELINKS
public static final int TASK_DATATYPES
public static final int TASK_PROPERTY_LINKS
public static final int TASK_LABELS
public static final int TASK_DESCRIPTIONS
public static final int TASK_ALIASES
public static final int TASK_TERMS
public static final int TASK_ALL_EXACT_DATA
public static final int TASK_SIMPLE_STATEMENTS
public static final int TASK_ITEMS
public static final int TASK_PROPERTIES
public static final int TASK_ALL_ENTITIES
public RdfSerializer(org.eclipse.rdf4j.rio.RDFFormat format, OutputStream output, Sites sites, PropertyRegister propertyRegister)
format
- RDF format, such as RDFFormat.TURTLEoutput
- the output stream to write tosites
- information about site linkspublic void setTasks(int tasks)
TASK_STATEMENTS
.tasks
- the tasks to be performedpublic int getTasks()
TASK_STATEMENTS
.public long getTripleCount()
public void open()
EntityDocumentDumpProcessor
open
in interface EntityDocumentDumpProcessor
public void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessor
processItemDocument
in interface EntityDocumentProcessor
itemDocument
- the ItemDocumentpublic void processPropertyDocument(PropertyDocument propertyDocument)
EntityDocumentProcessor
processPropertyDocument
in interface EntityDocumentProcessor
propertyDocument
- the PropertyDocumentpublic void close()
EntityDocumentDumpProcessor
close
in interface EntityDocumentDumpProcessor
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