Class JsonHandler
java.lang.Object
edu.harvard.hul.ois.jhove.HandlerBase
edu.harvard.hul.ois.jhove.handler.JsonHandler
- All Implemented Interfaces:
OutputHandler
OutputHandler for JSON output.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.harvard.hul.ois.jhove.HandlerBase
HandlerBase.SynchronizedDateFormat -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an JsonHandler.JsonHandler(String name, String release, int[] date, String note, String rights) Constructor for use by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected intpropertyLength(Property property) Gives the length (number of elements) of a propertyvoidshow()Outputs minimal information about the applicationvoidOutputs detailed information about the application, including configuration, available modules and handlers, etc.voidOutputs information about a Modulevoidshow(OutputHandler handler) Outputs information about the OutputHandler specified in the parametervoidOutputs the information contained in a RepInfo objectprotected jakarta.json.JsonObjectBuilderDisplay the audio metadata formatted according to the AES schema.protected jakarta.json.JsonObjectBuilderPRIVATE INSTANCE METHODS.protected jakarta.json.JsonArrayBuildershowArray(double[] darray) protected jakarta.json.JsonArrayBuildershowArray(int[] iarray) protected jakarta.json.JsonArrayBuilderprotected jakarta.json.JsonArrayBuilderprotected jakarta.json.JsonObjectBuildershowArrayProperty(Property property) protected jakarta.json.JsonObjectBuildershowChangeHistory(NisoImageMetadata niso, boolean bMix10) protected jakarta.json.JsonObjectBuildershowChecksum(Checksum checksum) protected jakarta.json.JsonObjectBuildershowDocument(Document document) voidDo the final output.voidDo the initial output.protected jakarta.json.JsonObjectBuildershowIdentifier(Identifier identifier) protected jakarta.json.JsonObjectBuildershowListProperty(Property property) protected jakarta.json.JsonObjectBuildershowMapProperty(Property property) protected jakarta.json.JsonObjectBuildershowMessage(Message message) protected jakarta.json.JsonObjectBuildershowNisoBasicDigitalObjectInformation(NisoImageMetadata niso, boolean bMix10) protected jakarta.json.JsonObjectBuildershowNisoBasicImageInformation(NisoImageMetadata niso, boolean bMix10) protected jakarta.json.JsonObjectBuildershowNisoImageAssessmentMetadata(NisoImageMetadata niso, boolean bMix10) protected jakarta.json.JsonObjectBuildershowNisoImageCaptureMetadata(NisoImageMetadata niso, boolean bMix10) protected jakarta.json.JsonObjectBuilderDisplay the NISO image metadata formatted according to the MIX schema.protected jakarta.json.JsonObjectBuildershowNisoImageMetadata(NisoImageMetadata niso, boolean bMix10) Display the NISO image metadata formatted according to the MIX 1.0 schema.protected jakarta.json.JsonObjectBuildershowProperty(Property property) protected jakarta.json.JsonArrayBuilderprotected jakarta.json.JsonObjectBuildershowScalarProperty(Property property) protected jakarta.json.JsonObjectBuildershowSetProperty(Property property) protected jakarta.json.JsonObjectBuildershowSignature(Signature signature) protected jakarta.json.JsonObjectBuildershowTextMDMetadata(TextMDMetadata textMD) protected StringvalueToString(Object obj) Methods inherited from class edu.harvard.hul.ois.jhove.HandlerBase
analyze, applyDefaultParams, close, doctype, doctype, doubleArray, element, element, element, element, elementEnd, elementStart, elementStart, endDirectory, getDate, getEncoding, getIndent, getName, getNote, getRelease, getRights, getSpecification, getVendor, init, integerArray, integerArray, longArray, okToProcess, param, rationalArray, rationalArray10, reset, resetParams, setApp, setBase, setDefaultParams, setEncoding, setWriter, startDirectory, toDateTime, xmlDecl, xmlDecl
-
Constructor Details
-
JsonHandler
public JsonHandler()Creates an JsonHandler. -
JsonHandler
Constructor for use by subclasses.
-
-
Method Details
-
show
public void show()Outputs minimal information about the application- Specified by:
showin interfaceOutputHandler- Specified by:
showin classHandlerBase
-
show
Outputs detailed information about the application, including configuration, available modules and handlers, etc.- Specified by:
showin interfaceOutputHandler- Specified by:
showin classHandlerBase
-
show
Outputs information about the OutputHandler specified in the parameter- Specified by:
showin interfaceOutputHandler- Specified by:
showin classHandlerBase
-
show
Outputs information about a Module- Specified by:
showin interfaceOutputHandler- Specified by:
showin classHandlerBase
-
show
Outputs the information contained in a RepInfo object- Specified by:
showin interfaceOutputHandler- Specified by:
showin classHandlerBase
-
showAgent
PRIVATE INSTANCE METHODS. -
showChecksum
-
showDocument
-
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:
showHeaderin interfaceOutputHandler- Specified by:
showHeaderin classHandlerBase
-
showIdentifier
-
showMessage
-
showSignature
-
valueToString
-
showProperty
-
showScalarProperty
-
showListProperty
-
showSetProperty
-
showMapProperty
-
propertyLength
Gives the length (number of elements) of a property -
showArrayProperty
-
showTextMDMetadata
-
showNisoImageMetadata
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
-
showAESAudioMetadata
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
-
showArray
-
showRational
-