class JsonHandler extends HandlerBase {

	protected JsonObjectBuilder showSetProperty(Property property) {
		JsonObjectBuilder propBuilder = Json.createObjectBuilder();
		Set<?> propSet = (Set<?>) property.getValue();
		JsonArrayBuilder lPropBuilder = Json.createArrayBuilder();
		PropertyType type = property.getType();

		Iterator<?> iter = propSet.iterator();
		while (iter.hasNext()) {
			Object val = iter.next();
			switch (type) {
			case BOOLEAN:
				lPropBuilder.add(((Boolean) val).booleanValue());
				break;
			case BYTE:
				lPropBuilder.add(valueToString(val));
				break;
			case CHARACTER:
				lPropBuilder.add(valueToString(val));
				break;
			case DATE:
				lPropBuilder.add(valueToString(val));
				break;
			case DOUBLE:
				lPropBuilder.add(((Double) val).doubleValue());
				break;
			case FLOAT:
				lPropBuilder.add(((Float) val).floatValue());
				break;
			case INTEGER:
				lPropBuilder.add(((Integer) val).intValue());
				break;
			case LONG:
				lPropBuilder.add(((Long) val).longValue());
				break;
			case OBJECT:
				lPropBuilder.add(valueToString(val));
				break;
			case SHORT:
				lPropBuilder.add(((Short) val).shortValue());
				break;
			case STRING:
				lPropBuilder.add(valueToString(val));
				break;
			case RATIONAL:
				lPropBuilder.add(showRational((Rational) val));
				break;
			case PROPERTY:
				lPropBuilder.add(showProperty((Property) val));
				break;
			case NISOIMAGEMETADATA:
				lPropBuilder.add(showNisoImageMetadata((NisoImageMetadata) property.getValue()));
				break;
			case AESAUDIOMETADATA:
				lPropBuilder.add(showAESAudioMetadata((AESAudioMetadata) property.getValue()));
				break;
			case TEXTMDMETADATA:
				lPropBuilder.add(showTextMDMetadata((TextMDMetadata) property.getValue()));
				break;
			default:
				break;
			}
		}
		propBuilder.add(property.getName(), lPropBuilder);
		return propBuilder;
	}

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

}