java.lang.Object
org.phenopackets.phenopackettools.util.print.PhenopacketPrintUtil

public class PhenopacketPrintUtil extends Object
A static utility class for obtaining JsonFormat.Parser and JsonFormat.Printer configured for printing Phenopacket Schema elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.protobuf.util.JsonFormat.Parser
    Get a parser configured for parsing Phenopacket Schema elements from JSON format.
    static com.google.protobuf.util.JsonFormat.Printer
    Get a printer configured for printing Phenopacket Schema elements into JSON while respecting the special requirements of the schema.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getParser

      public static com.google.protobuf.util.JsonFormat.Parser getParser()
      Get a parser configured for parsing Phenopacket Schema elements from JSON format.
    • getPrinter

      public static com.google.protobuf.util.JsonFormat.Printer getPrinter()
      Get a printer configured for printing Phenopacket Schema elements into JSON while respecting the special requirements of the schema.

      Currently, the special requirements include printing all enum field values, including the default values whose presence is implied in absence of the JSON field by Protobuf.

      Returns:
      the printer