public function getMetaData()
 {
     $response = $this->__soap->getJasperResponseFor(JasperSoapMultipartClient::CONTENT_ID_RESPONSE);
     if (count($response) == 1) {
         $rd = $response->current();
         $struct = array('label' => $rd->getLabel(), 'crdate' => $this->context->getTranslationManager()->_d($rd->getCrdate(), 'date-tstamp'), 'has_attachment' => $this->__soap->hasAttachment(), 'has_report' => $this->__soap->hasReport());
         $struct = $rd->getResourceDescriptor()->getParameters() + $struct;
         $struct = $rd->getProperties()->getParameters() + $struct;
         if ($struct['has_attachment']) {
             $mime = AppKitFileUtil::getMimeTypeForData($this->__soap->getDataFor(JasperSoapMultipartClient::CONTENT_ID_ATTACHMENT), $this->__soap->getHeaderFor(JasperSoapMultipartClient::CONTENT_ID_ATTACHMENT, 'content-type'));
             $struct = array('content_type' => $mime, 'content_length' => $this->__soap->getContentSize(JasperSoapMultipartClient::CONTENT_ID_ATTACHMENT), 'preview_allowed' => $this->canPreview($mime), 'download_allowed' => $this->canDownload($rd->getProperties()->getParameter('PROP_RESOURCE_TYPE'))) + $struct;
         }
         return $struct;
     }
 }
 private function htmlInsertInlineImages()
 {
     $iteration_counter = 0;
     $content =& $this->__data;
     $matches = array();
     while (preg_match('/(["\'])base64_inline_image:(\\w+)(\\1)/', $content, $matches)) {
         if (++$iteration_counter > self::MAX_REPLACEMENT_ITERATIONS) {
             throw new AppKitModelException('Inline image replacement' . ' failes after ' . self::MAX_REPLACEMENT_ITERATIONS . ' iterations. Abort!');
         }
         $cid = $matches[2];
         $data_string = 'NOT_FOUND';
         if ($this->__client->hasContentId($cid)) {
             $this->__compressor->compressImage($this->__client->getDataFor($cid), $this->__client->getHeaderFor($cid, 'content-type'));
             $data_string = sprintf('"data:%s;base64,%s"', $this->__compressor->getContentType(), $this->__compressor->getBase64Image());
         } else {
             $this->getContext()->getLoggerManager()->log("Could not find image: {$cid}", AgaviLogger::ERROR);
             $data_string = sprintf('"data:%s;base64,%s"', $this->__placeholderImage->getContentType(), base64_encode((string) $this->__placeholderImage));
         }
         $content = preg_replace('/' . preg_quote($matches[0]) . '/', $data_string, $content);
     }
 }