All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.macros.report.embeddings.vm Maven / Gradle / Ivy

#macro(includeEmbeddings, $embeddings)

#if (!$embeddings.isEmpty())
  
#foreach($embedding in $embeddings) #if ($embedding.getMimeType() == "image/png") #includeImageEmbedding($embedding, "png", $foreach.index) #elseif ($embedding.getMimeType() == "image/bmp") #includeImageEmbedding($embedding, "bmp", $foreach.index) #elseif ($embedding.getMimeType() == "image/jpeg") #includeImageEmbedding($embedding, "jpeg", $foreach.index) #elseif ($embedding.getMimeType() == "text/xml") #includeEscapedTextEmbedding($embedding, "XML text", $foreach.index) #elseif ($embedding.getMimeType() == "text/plain") #includeTextEmbedding($embedding, "Plain text", $foreach.index) #elseif ($embedding.getMimeType() == "text/html") #includeTextEmbedding($embedding, "HTML", $foreach.index) #elseif ($embedding.getMimeType() == "application/json") #includeTextEmbedding($embedding, "JSON", $foreach.index) #elseif ($embedding.getMimeType() == "image/url") #includeImageReferenceEmbedding($embedding, $foreach.index) #else #includeUnknownEmbedding($embedding, $foreach.index) #end #end
#end #end #macro(includeImageEmbedding, $embedding, $image_type, $index) #set($Quote = '"') #includeExpandableEmbedding($embedding, $image_type, "", $index) #end #macro(includeImageReferenceEmbedding, $embedding, $index) #set($Quote = '"') #includeExpandableEmbedding($embedding, "Image", "", $index) #end #macro(includeTextEmbedding, $embedding, $format, $index) #includeExpandableEmbedding($embedding, $format, "
$embedding.getDecodedData()
", $index) #end #macro(includeEscapedTextEmbedding, $embedding, $format, $index) #includeExpandableEmbedding($embedding, $format, "
$embedding.getEscapedDecodedData()
", $index) #end #macro(includeUnknownEmbedding, $embedding, $index) #set($Quote = '"') #includeExpandableEmbedding($embedding, $embedding.getMimeType(), "This file cannot be displayed. Use download button to get the content as file.", $index) #end #macro(includeExpandableEmbedding, $embedding, $type, $content, $index) #set($index = $index + 1)
#set($embeddingId = $counter.next())
$content
#end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy