Class QuickStatementsExporter
java.lang.Object
org.openrefine.wikidata.exporters.QuickStatementsExporter
- All Implemented Interfaces:
Exporter,WriterExporter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final QSSnakPrinterstatic final Stringprotected final QSSnakPrinter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(Project project, Properties options, Engine engine, Writer writer) protected voidtranslateItem(ItemEdit item, Writer writer) voidtranslateItemList(List<EntityEdit> updates, Writer writer) protected voidtranslateMediaInfo(MediaInfoEdit item, Writer writer) protected voidtranslateNameDescr(String qid, Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> values, String prefix, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id, Writer writer) voidtranslateSchema(Project project, Engine engine, WikibaseSchema schema, Writer writer) Exports a project and a schema to a QuickStatements fileprotected voidtranslateSnakGroup(org.wikidata.wdtk.datamodel.interfaces.SnakGroup sg, boolean reference, Writer writer) protected voidtranslateStatement(String qid, org.wikidata.wdtk.datamodel.interfaces.Statement statement, String pid, boolean add, Writer writer)
-
Field Details
-
impossibleSchedulingErrorMessage
- See Also:
-
noSchemaErrorMessage
- See Also:
-
mainSnakPrinter
-
referenceSnakPrinter
-
-
Constructor Details
-
QuickStatementsExporter
public QuickStatementsExporter()
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceExporter
-
export
public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException - Specified by:
exportin interfaceWriterExporter- Throws:
IOException
-
translateSchema
public void translateSchema(Project project, Engine engine, WikibaseSchema schema, Writer writer) throws IOException Exports a project and a schema to a QuickStatements file- Parameters:
project- the project to translateengine- the engine used for evaluation of the editsschema- the WikibaseSchema used for translation of tabular data to editswriter- the writer to which the QS should be written- Throws:
IOException
-
translateItemList
- Throws:
IOException
-
translateNameDescr
protected void translateNameDescr(String qid, Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> values, String prefix, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id, Writer writer) throws IOException - Throws:
IOException
-
translateItem
- Throws:
IOException
-
translateMediaInfo
- Throws:
IOException
-
translateStatement
protected void translateStatement(String qid, org.wikidata.wdtk.datamodel.interfaces.Statement statement, String pid, boolean add, Writer writer) throws IOException - Throws:
IOException
-
translateSnakGroup
protected void translateSnakGroup(org.wikidata.wdtk.datamodel.interfaces.SnakGroup sg, boolean reference, Writer writer) throws IOException - Throws:
IOException
-