Class QSSnakPrinter

  • All Implemented Interfaces:
    org.wikidata.wdtk.datamodel.interfaces.SnakVisitor<String>

    public class QSSnakPrinter
    extends Object
    implements org.wikidata.wdtk.datamodel.interfaces.SnakVisitor<String>
    Represents a snak in QuickStatements format.
    Author:
    Antonin Delpeuch
    • Field Detail

      • reference

        protected final boolean reference
      • valuePrinter

        protected final org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<String> valuePrinter
    • Constructor Detail

      • QSSnakPrinter

        public QSSnakPrinter​(boolean reference)
        Parameters:
        reference - indicates whether to print snaks as reference, or as main/qualifier snaks
    • Method Detail

      • visit

        public String visit​(org.wikidata.wdtk.datamodel.interfaces.ValueSnak snak)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.SnakVisitor<String>
      • visit

        public String visit​(org.wikidata.wdtk.datamodel.interfaces.SomeValueSnak snak)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.SnakVisitor<String>
      • visit

        public String visit​(org.wikidata.wdtk.datamodel.interfaces.NoValueSnak snak)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.SnakVisitor<String>
      • toQS

        protected String toQS​(org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue property,
                              String value)