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 javax.json.JsonObjectBuilderDisplay the audio metadata formatted according to the AES schema.protected javax.json.JsonObjectBuilderPRIVATE INSTANCE METHODS.protected javax.json.JsonArrayBuildershowArray(double[] darray) protected javax.json.JsonArrayBuildershowArray(int[] iarray) protected javax.json.JsonArrayBuilderprotected javax.json.JsonArrayBuilderprotected javax.json.JsonObjectBuildershowArrayProperty(Property property) protected javax.json.JsonObjectBuildershowChangeHistory(NisoImageMetadata niso, boolean bMix10) protected javax.json.JsonObjectBuildershowChecksum(Checksum checksum) protected javax.json.JsonObjectBuildershowDocument(Document document) voidDo the final output.voidDo the initial output.protected javax.json.JsonObjectBuildershowIdentifier(Identifier identifier) protected javax.json.JsonObjectBuildershowListProperty(Property property) protected javax.json.JsonObjectBuildershowMapProperty(Property property) protected javax.json.JsonObjectBuildershowMessage(Message message) protected javax.json.JsonObjectBuildershowNisoBasicDigitalObjectInformation(NisoImageMetadata niso, boolean bMix10) protected javax.json.JsonObjectBuildershowNisoBasicImageInformation(NisoImageMetadata niso, boolean bMix10) protected javax.json.JsonObjectBuildershowNisoImageAssessmentMetadata(NisoImageMetadata niso, boolean bMix10) protected javax.json.JsonObjectBuildershowNisoImageCaptureMetadata(NisoImageMetadata niso, boolean bMix10) protected javax.json.JsonObjectBuilderDisplay the NISO image metadata formatted according to the MIX schema.protected javax.json.JsonObjectBuildershowNisoImageMetadata(NisoImageMetadata niso, boolean bMix10) Display the NISO image metadata formatted according to the MIX 1.0 schema.protected javax.json.JsonObjectBuildershowProperty(Property property) protected javax.json.JsonArrayBuilderprotected javax.json.JsonObjectBuildershowScalarProperty(Property property) protected javax.json.JsonObjectBuildershowSetProperty(Property property) protected javax.json.JsonObjectBuildershowSignature(Signature signature) protected javax.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 javax.json.JsonObjectBuilder showNisoImageMetadata(NisoImageMetadata niso, boolean bMix10) Display the NISO image metadata formatted according to the MIX 1.0 schema. -
showNisoBasicDigitalObjectInformation
protected javax.json.JsonObjectBuilder showNisoBasicDigitalObjectInformation(NisoImageMetadata niso, boolean bMix10) -
showNisoBasicImageInformation
protected javax.json.JsonObjectBuilder showNisoBasicImageInformation(NisoImageMetadata niso, boolean bMix10) -
showNisoImageCaptureMetadata
protected javax.json.JsonObjectBuilder showNisoImageCaptureMetadata(NisoImageMetadata niso, boolean bMix10) -
showNisoImageAssessmentMetadata
protected javax.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 javax.json.JsonArrayBuilder showArray(int[] iarray) -
showArray
protected javax.json.JsonArrayBuilder showArray(double[] darray) -
showArray
-
showArray
-
showRational
-