class JsonHandler extends HandlerBase {

	protected JsonObjectBuilder showScalarProperty(Property property) {
		JsonObjectBuilder propBuilder = Json.createObjectBuilder();

		PropertyType propType = property.getType();
		switch (propType) {
		case BOOLEAN:
			Boolean b = (Boolean) property.getValue();
			propBuilder.add(property.getName(), b.booleanValue());
			break;
		case BYTE:
		case CHARACTER:
		case OBJECT:
			propBuilder.add(property.getName(), property.getValue().toString());
			break;
		case DATE:
			Date dt = (Date) property.getValue();
			propBuilder.add(property.getName(), toDateTime(dt));
			break;
		case DOUBLE:
			Double d = (Double) property.getValue();
			propBuilder.add(property.getName(), d.doubleValue());
			break;
		case FLOAT:
			Float f = (Float) property.getValue();
			propBuilder.add(property.getName(), f.floatValue());
			break;
		case INTEGER:
			Integer i = (Integer) property.getValue();
			propBuilder.add(property.getName(), i.intValue());
			break;
		case LONG:
			Long l = (Long) property.getValue();
			propBuilder.add(property.getName(), l.longValue());
			break;
		case AESAUDIOMETADATA:
			propBuilder.add(property.getName(), showAESAudioMetadata((AESAudioMetadata) property.getValue()));
			break;
		case NISOIMAGEMETADATA:
			propBuilder.add(property.getName(), showNisoImageMetadata((NisoImageMetadata) property.getValue()));
			break;
		case TEXTMDMETADATA:
			propBuilder.add(property.getName(), showTextMDMetadata((TextMDMetadata) property.getValue()));
			break;
		case SHORT:
			Short s = (Short) property.getValue();
			propBuilder.add(property.getName(), s.shortValue());
			break;
		case STRING:
			propBuilder.add(property.getName(), (String) property.getValue());
			break;
		case RATIONAL:
			propBuilder.add(property.getName(), showRational((Rational) property.getValue()));
			break;
		case PROPERTY:
			Property property2 = (Property) property.getValue();
			propBuilder.add(property.getName(), showProperty(property2));
			break;
		default:
			propBuilder.add(property.getName(), property.getValue().toString());
			break;
		}
		return propBuilder;
	}

	public  JsonHandler();
	public  JsonHandler(String name, String release, int[] date, String note, String rights);

}