if (filter == null || !filter.isSupported(document))
throw new NOAException(Messages.getString("PersistenceService.error_filter_invalid_message")); //$NON-NLS-1$
String filterDefinition = filter.getFilterDefinition(document);
OutputStreamToXOutputStreamAdapter streamAdapter = new OutputStreamToXOutputStreamAdapter(outputStream);
PropertyValue[] properties = new PropertyValue[2];
properties[0] = new PropertyValue();
properties[0].Name = "FilterName"; //$NON-NLS-1$
properties[0].Value = filterDefinition;
properties[1] = new PropertyValue("OutputStream", -1, streamAdapter, PropertyState.DIRECT_VALUE); //$NON-NLS-1$