Map<Object, Object> properties,
Map<Object, Object> responseProperties,
PrintWriter writer
) throws IllegalArgumentException
{
XMLEncoder encoder = (XMLEncoder)type.getProperty(
ImageType.XML_ENCODER_PROPERTY);
if (encoder == null)
throw new IllegalArgumentException(_ENCODER_ERROR + type);
// Don't know if this is necessary, but just in case
if (responseProperties == null)
responseProperties = _EMPTY_MAP;
// Print the root element
writer.print("<ImageMetadata version=\"2.0\"");
writer.print(" xmlns=\"");
writer.print(ImageConstants.TECATE_NAMESPACE);
writer.println("\">");
// Write the metadata
encoder.encodeXML(context,
namespaceURI,
localName,
properties,
responseProperties,
writer);