Fork me on GitHub

Tutorials - Exporting Binaries

The code snippets are excerpts (or slightly simplififed ones) from Example_Export_Asset_and_Image_Set_Content.

The example below exports data to JSON files by default. You may see the source linked above if you want to export data to XML files instead. The script in the link uses fileInJson parameter to choose either JSON or XML format.

Introduction

A binary content (asset or image) consists of a handle node and a variant node.

For example, an image binary content looks like the following (excerpt from /content/gallery/contenteximdemo/samples/blue-199261_150.jpg in the demo project):

<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="blue-199261_150.jpg" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>hippo:handle</sv:value>
  </sv:property>
  <sv:property sv:multiple="true" sv:name="jcr:mixinTypes" sv:type="Name">
    <sv:value>mix:referenceable</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:uuid" sv:type="String">
    <sv:value>9f32434e-84e3-4150-a6f2-d89a67be2fb1</sv:value>
  </sv:property>
  <sv:node sv:name="blue-199261_150.jpg">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>hippogallery:imageset</sv:value>
    </sv:property>
    <sv:property sv:multiple="true" sv:name="jcr:mixinTypes" sv:type="Name">
      <sv:value>mix:referenceable</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:uuid" sv:type="String">
      <sv:value>c01865db-394e-4c99-b51b-905a12298dd9</sv:value>
    </sv:property>
    <sv:property sv:multiple="true" sv:name="hippo:availability" sv:type="String">
      <sv:value>live</sv:value>
      <sv:value>preview</sv:value>
    </sv:property>
    <sv:property sv:name="hippogallery:description" sv:type="String">
      <sv:value>Description for blue-199261_150.jpg</sv:value>
    </sv:property>
    <sv:property sv:name="hippogallery:filename" sv:type="String">
      <sv:value>blue-199261_150.jpg</sv:value>
    </sv:property>
    <sv:node sv:name="hippogallery:thumbnail">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>hippogallery:image</sv:value>
      </sv:property>
      <sv:property sv:name="hippogallery:height" sv:type="Long">
        <sv:value>39</sv:value>
      </sv:property>
      <sv:property sv:name="hippogallery:width" sv:type="Long">
        <sv:value>60</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:data" sv:type="Binary">
        <sv:value>/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAnADwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+8CgkDqQB6k4HryTwOOTRXjfx58cz/Dz4b6r4jhjuJUjvdKsrtbO5ksr46ffX8MGoLY38Mkc+m3Ulm00SarblrrSEeTVbSOS6s4Ubsy7A18zx+Dy7CxU8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MdQUUUUAf/2Q==</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:lastModified" sv:type="Date">
        <sv:value>2013-11-12T11:15:00.000+01:00</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:mimeType" sv:type="String">
        <sv:value>image/jpeg</sv:value>
      </sv:property>
    </sv:node>
    <sv:node sv:name="hippogallery:original">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>hippogallery:image</sv:value>
      </sv:property>
      <sv:property sv:name="hippogallery:height" sv:type="Long">
        <sv:value>99</sv:value>
      </sv:property>
      <sv:property sv:name="hippogallery:width" sv:type="Long">
        <sv:value>150</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:data" sv:type="Binary">
        <sv:value>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCABjAJYDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAcIBQYJBAID/8QANxAAAQMEAQIEBAUCBQUAAAAAAQIDBAAFBhESByEIEzFBFCJRYRUyQnGBFiMJJGJyoRdSgpGx/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAUGAgMHBAH/xAA2EQABAwIEBAMFBwUBAAAAAAABAAIRAwQFEiExBkFRYRNxgRQiMpGxQlKhwdHh8BUjM4Ky8f/aAAwDAQACEQMRAD8A6gUpSizSlKURKUpREpSlESlKURKUpREpSlESlKURKUpREpSlESlKURKUpRF8PvsxmXJMl5DLLSStxxxQSlCQNkknsAB71GzniG6aHLX8Ih3N2RdWoYuDaQgIbkME6UppR/PxOuXbYB36d692ZXiNPv0rH5/wxtFntn4ncg/8yXFFWm0lHYOa12QohJUoE70AebPievmS2W82jqz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Ox0uyWgoNuKA+TlrlxHtsAD9qsVvj9TDX+HQqvq0ujwB+bvwKgLjCa+KAG9yNdzLGgE/OdPT15rAYNiD1mCr5fEsLvUmM3GKWe7MJhOlfDsE9ynntSln5nFAEgAJSnbTv2pSq5VqOrPL3blT1GkyhTFNg0GiUpSta2pSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiL//Z</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:lastModified" sv:type="Date">
        <sv:value>2013-11-12T11:15:00.000+01:00</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:mimeType" sv:type="String">
        <sv:value>image/jpeg</sv:value>
      </sv:property>
    </sv:node>
  </sv:node>
</sv:node>
        

When exporting a binary content, the wrapper handle node has no significant information in content migration context. Binary content handle node (whether it's asset or image) contain single variant node (type of hippogallery:imageset for image or type of hippogallery:exampleAssetSet for asset) only which is always meant to be for both live and preview mode. Therefore, we can simply export the only variant node of the binary content.

Select Binary Variant Nodes in Groovy Updater

You can use JCR query like the following example in a Groovy Updater script to select all the imageset variant nodes and all the asset variant nodes.

Then the Groovy Updater script will iterate all the nodes and invoke the #doUpdate(Node) method of the script on each visiting node.

/jcr:root/content//element(*,hippo:document)[@jcr:primaryType='hippogallery:imageset' or @jcr:primaryType='hippogallery:exampleAssetSet']
          
          

Initializing Export Task

    // 1. Initialize (workflow) document manager and binary exporting task using the default implementation.
    def documentManager = new WorkflowDocumentManagerImpl(session)
    def exportTask = new DefaultBinaryExportTask(documentManager)
    // 1.1. Sets the logger to the export task, which is useful when running in groovy updater.
    exportTask.setLogger(log)

    // 2. Sets binary attachment VFS folder. If binary data size is big (when the binary value size exceeds the threshold), it can store the data as an attachment.
    def binaryAttachmentFolderPath = "file:///var/data/attachments"
    def binaryAttachmentFolder = VFS.getManager().resolveFile(binaryAttachmentFolderPath)
    // 2.1. Set binary attachment VFS folder to export task.
    exportTask.setBinaryValueFileFolder(binaryAttachmentFolder)
    // 2.2. Set the threshold size
    //      if the binary data size is smaller than the threshold, it should be embedded in data: URL string
    //      otherwise, it is stored in an external VFS file with keeping the VFS file URL only.
    exportTask.setDataUrlSizeThreashold(256 * 1024); // 256KB as threshold

    // 3. Starting export task, meaning the task starts the execution record bookkeeping.
    exportTask.start()
          
          

Export Binary Variant Node to ContentNode bean

      // 1. Begin a record to capture the execution status of the current unit of export task.
      //    each record is stored in the export task until stopped and can be useful in the final phase to report all the result (i.e, exportTask#logSummary()).
      def record = exportTask.beginRecord(node.identifier, node.path)

      // 2. Get the binary content handle path from the currently visiting node and decide the export file location.
      def handlePath = node.parent.path
      def relPath = StringUtils.removeStart(handlePath, "/")
      def targetBaseFolder = VFS.getManager().resolveFile("file:///var/data/bindata")
      def file = targetBaseFolder.resolveFile(relPath + ".json")

      // 3. Mark this unit of export task is being processed before real processing below.
      record.setProcessed(true)

      // 4. Export the binary variant node (either imageset or assetset).
      //    export binary set (either imageset or assetset) node to ContentNode object.
      def contentNode = exportTask.exportBinarySetToContentNode(node)

      // 5. Because hippo:docbase UUID values in the exported data is kind of meaningless in many cases.
      //    For example, if the referenced content is also exported and imported again later, then the UUID will change.
      //    So, you don't have to, but let's just replace hippo:docbase UUID by the node path of the referenced content node in the exported data.
      ContentNodeUtils.replaceDocbasesByPaths(documentManager.session, contentNode, ContentNodeUtils.MIRROR_DOCBASES_XPATH)

      // 6. Record the exported file path for reporting later.
      record.setAttribute("file", file.name.path)

      // 7. Marshal the exported ContentNode object to a json file.
      exportTask.writeContentNodeToJsonFile(contentNode, file)

      // 8. Mark this unit of export task successful.
      record.setSucceeded(true)
          
          

Log execution summary

    // 1. Stop the export task after processing, which means you stop execution recording.
    exportTask.stop()

    // 2. Log the execution summary finally for administrator.
    exportTask.logSummary()
          
          

The summary logs above will look like the following:

INFO 2016-02-19 11:32:26 

===============================================================================================================
Execution Summary:
---------------------------------------------------------------------------------------------------------------
Total: 10, Processed: 10, Suceeded: 10, Failed: 0, Duration: 1574ms
---------------------------------------------------------------------------------------------------------------
Details (in CSV format):
---------------------------------------------------------------------------------------------------------------
SEQ,PROCESSED,SUCCEEDED,ID,PATH,TYPE,ATTRIBUTES,ERROR
1,true,true,60c09e1d-da86-448d-97bb-464c7471edc2,/content/assets/contenteximdemo/whitepaper/using-hippo-cms-to-manage-accessible-web-sites_508.pdf/using-hippo-cms-to-manage-accessible-web-sites_508.pdf,hippogallery:exampleAssetSet,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/assets/contenteximdemo/whitepaper/using-hippo-cms-to-manage-accessible-web-sites_508.pdf.json},
2,true,true,b6012d60-2745-49b5-9deb-64137c48ba33,/content/assets/contenteximdemo/whitepaper/whitepaper-seo.pdf/whitepaper-seo.pdf,hippogallery:exampleAssetSet,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/assets/contenteximdemo/whitepaper/whitepaper-seo.pdf.json},
3,true,true,e83b627f-9520-443e-beca-9de78adf3a29,/content/gallery/contenteximdemo/banners/banner2.png/banner2.png,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/banners/banner2.png.json},
4,true,true,dae3d7f1-70c6-44f8-9f71-7395b48215d8,/content/gallery/contenteximdemo/banners/banner-1.png/banner-1.png,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/banners/banner-1.png.json},
5,true,true,81fb343b-35b4-4448-8edf-997923d30a01,/content/gallery/contenteximdemo/samples/pencils-199883_150.jpg/pencils-199883_150.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/pencils-199883_150.jpg.json},
6,true,true,268a5727-5964-4489-88de-3a0828f84ae0,/content/gallery/contenteximdemo/samples/viognier-grapes-188185_640.jpg/viognier-grapes-188185_640.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/viognier-grapes-188185_640.jpg.json},
7,true,true,91a83535-6e37-43a7-a4fc-0c675919275c,/content/gallery/contenteximdemo/samples/snail-193611_640.jpg/snail-193611_640.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/snail-193611_640.jpg.json},
8,true,true,277f4bef-e405-4868-b824-a5d7a1d5d40f,/content/gallery/contenteximdemo/samples/coffee-206142_150.jpg/coffee-206142_150.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/coffee-206142_150.jpg.json},
9,true,true,4f288476-797a-45c8-a9c5-8c1e6b78a292,/content/gallery/contenteximdemo/samples/animal-2883_640.jpg/animal-2883_640.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/animal-2883_640.jpg.json},
10,true,true,c01865db-394e-4c99-b51b-905a12298dd9,/content/gallery/contenteximdemo/samples/blue-199261_150.jpg/blue-199261_150.jpg,hippogallery:imageset,{file=/home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/samples/blue-199261_150.jpg.json},
===============================================================================================================

          
          

Exported file(s)

Exported JSON file for a gallery imageset will look like the following:

{
  "name" : "blue-199261_150.jpg",
  "primaryType" : "hippogallery:imageset",
  "mixinTypes" : [ "mix:referenceable" ],
  "properties" : [ {
    "name" : "hippogallery:description",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "Description for blue-199261_150.jpg" ]
  }, {
    "name" : "hippogallery:filename",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "blue-199261_150.jpg" ]
  }, {
    "name" : "jcr:path",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "/content/gallery/contenteximdemo/samples/blue-199261_150.jpg" ]
  }, {
    "name" : "jcr:localizedName",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "blue-199261_150.jpg" ]
  } ],
  "nodes" : [ {
    "name" : "hippogallery:thumbnail",
    "primaryType" : "hippogallery:image",
    "mixinTypes" : [ ],
    "properties" : [ {
      "name" : "jcr:data",
      "type" : "BINARY",
      "multiple" : false,
      "values" : [ "data:;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAnADwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9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qXen6fc6pLdyabpv2P33p09/1ooqsZjMXmGIqYvHYmvjMVV5faYjE1J1a1TkhGnHnqTblK0IQirvRRVra3nB4LCZfh6eEwOHpYXC0ub2dChCNOlBzk5zajFJc05uVSc3eU5zlKbbehRRRXMdQUUUUAf/2Q==" ]
    }, {
      "name" : "jcr:lastModified",
      "type" : "DATE",
      "multiple" : false,
      "values" : [ "2013-11-12T11:15:00.000+01:00" ]
    }, {
      "name" : "hippogallery:height",
      "type" : "LONG",
      "multiple" : false,
      "values" : [ "39" ]
    }, {
      "name" : "jcr:mimeType",
      "type" : "STRING",
      "multiple" : false,
      "values" : [ "image/jpeg" ]
    }, {
      "name" : "hippogallery:width",
      "type" : "LONG",
      "multiple" : false,
      "values" : [ "60" ]
    } ],
    "nodes" : [ ]
  }, {
    "name" : "hippogallery:original",
    "primaryType" : "hippogallery:image",
    "mixinTypes" : [ ],
    "properties" : [ {
      "name" : "jcr:data",
      "type" : "BINARY",
      "multiple" : false,
      "values" : [ "data:;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCABjAJYDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAcIBQYJBAID/8QANxAAAQMEAQIEBAUCBQUAAAAAAQIDBAAFBhESByEIEzFBFCJRYRUyQnGBFiMJJGJyoRdSgpGx/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAUGAgMHBAH/xAA2EQABAwIEBAMFBwUBAAAAAAABAAIRAwQFEiExBkFRYRNxgRQiMpGxQlKhwdHh8BUjM4Ky8f/aAAwDAQACEQMRAD8A6gUpSizSlKURKUpREpSlESlKURKUpREpSlESlKURKUpREpSlES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6XXyROZCH1w4rgCQ3v5XChR0lOyfmAAq6nT3G+u2KRba71OxO3t3C5vx4UO1MOl6Y/KcStRQpTW220DgSXFHQHcj2NorB4SOhmN5JbstgYzNeudoeMmC7NusmSI7pPIrQFr7EqG9b4776qVRZrf8Yi4Ox0uyWgoNuKA+TlrlxHtsAD9qsVvj9TDX+HQqvq0ujwB+bvwKgLjCa+KAG9yNdzLGgE/OdPT15rAYNiD1mCr5fEsLvUmM3GKWe7MJhOlfDsE9ynntSln5nFAEgAJSnbTv2pSq5VqOrPL3blT1GkyhTFNg0GiUpSta2pSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiJSlKIlKUoiUpSiL//Z" ]
    }, {
      "name" : "jcr:lastModified",
      "type" : "DATE",
      "multiple" : false,
      "values" : [ "2013-11-12T11:15:00.000+01:00" ]
    }, {
      "name" : "hippogallery:height",
      "type" : "LONG",
      "multiple" : false,
      "values" : [ "99" ]
    }, {
      "name" : "jcr:mimeType",
      "type" : "STRING",
      "multiple" : false,
      "values" : [ "image/jpeg" ]
    }, {
      "name" : "hippogallery:width",
      "type" : "LONG",
      "multiple" : false,
      "values" : [ "150" ]
    } ],
    "nodes" : [ ]
  } ]
}
          
          

Exported JSON file for an asset content will look like the following:

Note: the PDF binary data exceeds the configured threshold size, so, export task stores the binary data in an external VFS file automatically and keeps a file URL for the data in this example.

{
  "name" : "whitepaper-seo.pdf",
  "primaryType" : "hippogallery:exampleAssetSet",
  "mixinTypes" : [ ],
  "properties" : [ {
    "name" : "jcr:path",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "/content/assets/contenteximdemo/whitepaper/whitepaper-seo.pdf" ]
  }, {
    "name" : "jcr:localizedName",
    "type" : "STRING",
    "multiple" : false,
    "values" : [ "whitepaper-seo.pdf" ]
  } ],
  "nodes" : [ {
    "name" : "hippogallery:asset",
    "primaryType" : "hippo:resource",
    "mixinTypes" : [ ],
    "properties" : [ {
      "name" : "jcr:lastModified",
      "type" : "DATE",
      "multiple" : false,
      "values" : [ "2016-02-10T23:38:59.632-05:00" ]
    }, {
      "name" : "jcr:data",
      "type" : "BINARY",
      "multiple" : false,
      "values" : [ "file:///home/test/content-exim-demo-TRUNK/target/tomcat8x/temp/content-exim-demo/attachments/_hipojo_bin_1455899545793.pdf" ]
    }, {
      "name" : "jcr:mimeType",
      "type" : "STRING",
      "multiple" : false,
      "values" : [ "application/pdf" ]
    } ],
    "nodes" : [ ]
  } ]
}