Class JsonHandler

java.lang.Object
edu.harvard.hul.ois.jhove.HandlerBase
edu.harvard.hul.ois.jhove.handler.JsonHandler
All Implemented Interfaces:
OutputHandler

public class JsonHandler extends HandlerBase
OutputHandler for JSON output.
  • Constructor Details

    • JsonHandler

      public JsonHandler()
      Creates an JsonHandler.
    • JsonHandler

      public JsonHandler(String name, String release, int[] date, String note, String rights)
      Constructor for use by subclasses.
  • Method Details

    • show

      public void show()
      Outputs minimal information about the application
      Specified by:
      show in interface OutputHandler
      Specified by:
      show in class HandlerBase
    • show

      public void show(App app)
      Outputs detailed information about the application, including configuration, available modules and handlers, etc.
      Specified by:
      show in interface OutputHandler
      Specified by:
      show in class HandlerBase
    • show

      public void show(OutputHandler handler)
      Outputs information about the OutputHandler specified in the parameter
      Specified by:
      show in interface OutputHandler
      Specified by:
      show in class HandlerBase
    • show

      public void show(Module module)
      Outputs information about a Module
      Specified by:
      show in interface OutputHandler
      Specified by:
      show in class HandlerBase
    • show

      public void show(RepInfo info)
      Outputs the information contained in a RepInfo object
      Specified by:
      show in interface OutputHandler
      Specified by:
      show in class HandlerBase
    • showAgent

      protected jakarta.json.JsonObjectBuilder showAgent(Agent agent, String label)
      PRIVATE INSTANCE METHODS.
    • showChecksum

      protected jakarta.json.JsonObjectBuilder showChecksum(Checksum checksum)
    • showDocument

      protected jakarta.json.JsonObjectBuilder showDocument(Document document)
    • showFooter

      public void showFooter()
      Do the final output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
      Specified by:
      showFooter in interface OutputHandler
      Specified by:
      showFooter in class HandlerBase
    • showHeader

      public void showHeader()
      Do the initial output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
      Specified by:
      showHeader in interface OutputHandler
      Specified by:
      showHeader in class HandlerBase
    • showIdentifier

      protected jakarta.json.JsonObjectBuilder showIdentifier(Identifier identifier)
    • showMessage

      protected jakarta.json.JsonObjectBuilder showMessage(Message message)
    • showSignature

      protected jakarta.json.JsonObjectBuilder showSignature(Signature signature)
    • valueToString

      protected String valueToString(Object obj)
    • showProperty

      protected jakarta.json.JsonObjectBuilder showProperty(Property property)
    • showScalarProperty

      protected jakarta.json.JsonObjectBuilder showScalarProperty(Property property)
    • showListProperty

      protected jakarta.json.JsonObjectBuilder showListProperty(Property property)
    • showSetProperty

      protected jakarta.json.JsonObjectBuilder showSetProperty(Property property)
    • showMapProperty

      protected jakarta.json.JsonObjectBuilder showMapProperty(Property property)
    • propertyLength

      protected int propertyLength(Property property)
      Gives the length (number of elements) of a property
    • showArrayProperty

      protected jakarta.json.JsonObjectBuilder showArrayProperty(Property property)
    • showTextMDMetadata

      protected jakarta.json.JsonObjectBuilder showTextMDMetadata(TextMDMetadata textMD)
    • showNisoImageMetadata

      protected jakarta.json.JsonObjectBuilder showNisoImageMetadata(NisoImageMetadata niso)
      Display the NISO image metadata formatted according to the MIX schema. The schema which is used may be 0.2 or 1.0 or 2.0, depending on the module parameters.
      Parameters:
      niso - NISO image metadata
    • showNisoImageMetadata

      protected jakarta.json.JsonObjectBuilder showNisoImageMetadata(NisoImageMetadata niso, boolean bMix10)
      Display the NISO image metadata formatted according to the MIX 1.0 schema.
    • showNisoBasicDigitalObjectInformation

      protected jakarta.json.JsonObjectBuilder showNisoBasicDigitalObjectInformation(NisoImageMetadata niso, boolean bMix10)
    • showNisoBasicImageInformation

      protected jakarta.json.JsonObjectBuilder showNisoBasicImageInformation(NisoImageMetadata niso, boolean bMix10)
    • showNisoImageCaptureMetadata

      protected jakarta.json.JsonObjectBuilder showNisoImageCaptureMetadata(NisoImageMetadata niso, boolean bMix10)
    • showNisoImageAssessmentMetadata

      protected jakarta.json.JsonObjectBuilder showNisoImageAssessmentMetadata(NisoImageMetadata niso, boolean bMix10)
    • showChangeHistory

      protected jakarta.json.JsonObjectBuilder showChangeHistory(NisoImageMetadata niso, boolean bMix10)
    • showAESAudioMetadata

      protected jakarta.json.JsonObjectBuilder showAESAudioMetadata(AESAudioMetadata aes)
      Display the audio metadata formatted according to the AES schema.
      Parameters:
      aes - AES audio metadata
      Returns:
      Json
    • showArray

      protected jakarta.json.JsonArrayBuilder showArray(int[] iarray)
    • showArray

      protected jakarta.json.JsonArrayBuilder showArray(double[] darray)
    • showArray

      protected jakarta.json.JsonArrayBuilder showArray(String[] sarray)
    • showArray

      protected jakarta.json.JsonArrayBuilder showArray(Rational[] rarray)
    • showRational

      protected jakarta.json.JsonArrayBuilder showRational(Rational r)