Class MIJsonUtils


  • public class MIJsonUtils
    extends Object
    Utility class for public properties
    Since:
    05/07/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • MIJsonUtils

        public MIJsonUtils()
    • Method Detail

      • writeStartObject

        public static void writeStartObject​(Writer writer)
                                     throws IOException

        writeStartObject.

        Parameters:
        writer - a Writer object.
        Throws:
        IOException - if any.
      • writeEndObject

        public static void writeEndObject​(Writer writer)
                                   throws IOException

        writeEndObject.

        Parameters:
        writer - a Writer object.
        Throws:
        IOException - if any.
      • writeSeparator

        public static void writeSeparator​(Writer writer)
                                   throws IOException

        writeSeparator.

        Parameters:
        writer - a Writer object.
        Throws:
        IOException - if any.
      • writeOpenArray

        public static void writeOpenArray​(Writer writer)
                                   throws IOException

        writeOpenArray.

        Parameters:
        writer - a Writer object.
        Throws:
        IOException - if any.
      • writeEndArray

        public static void writeEndArray​(Writer writer)
                                  throws IOException

        writeEndArray.

        Parameters:
        writer - a Writer object.
        Throws:
        IOException - if any.
      • extractInteractorId

        public static String[] extractInteractorId​(Xref ref,
                                                   Interactor interactor)

        extractInteractorId.

        Parameters:
        ref - a Xref object.
        interactor - a Interactor object.
        Returns:
        an array of String : first the database, then the interactorId
      • extractInteractionId

        public static String[] extractInteractionId​(Xref ref,
                                                    Interaction interaction)

        extractInteractionId.

        Parameters:
        ref - a Xref object.
        interaction - a Interaction object.
        Returns:
        an array of String : first the database, then the interactionId
      • extractBinaryInteractionId

        public static String[] extractBinaryInteractionId​(Xref ref,
                                                          BinaryInteraction interaction,
                                                          Integer number)

        extractBinaryInteractionId.

        Parameters:
        ref - a Xref object.
        interaction - a BinaryInteraction object.
        number - a suffix
        Returns:
        an array of String : first the database, then the interactionId, then a number to append