<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a way to derive a WebDAV path from a DocumentModel? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316644#M3645</link>
    <description>&lt;P&gt;The WebDAV "path" is basically the the same &lt;CODE&gt;doc.getPathAsString()&lt;/CODE&gt;, namely the sequence of &lt;CODE&gt;doc.getName()&lt;/CODE&gt; for the &lt;CODE&gt;doc&lt;/CODE&gt; objects (that are folderish) leading to the document, except that:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the first parts may be skipped depending on the WebDAV virtual roots in effect,&lt;/LI&gt;
&lt;LI&gt;the last part, for the document, is not its &lt;CODE&gt;doc.getName()&lt;/CODE&gt; but the filename of the doc's blob.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;See &lt;CODE&gt;org.nuxeo.ecm.platform.wi.backend.SimpleBackend.getDisplayName&lt;/CODE&gt; for the code.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2013 12:54:39 GMT</pubDate>
    <dc:creator>Florent_Guillau</dc:creator>
    <dc:date>2013-08-07T12:54:39Z</dc:date>
    <item>
      <title>Is there a way to derive a WebDAV path from a DocumentModel?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316643#M3644</link>
      <description>&lt;P&gt;As part of an operation, I need to retrieve the path to a document's file:content for a remote system to access via WebDAV.&lt;/P&gt;
&lt;P&gt;However, the path as retrieved by &lt;CODE&gt;getPathAsString()&lt;/CODE&gt; and &lt;CODE&gt;getFilePath()&lt;/CODE&gt; do not match the path to the document as observed via WebDAV.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public void run(DocumentModel input) throws ClientException {
        // ...
        LOG.info(input.getPathAsString());
        BlobHolder x = input.getAdapter(BlobHolder.class);
        LOG.info(x.getFilePath());
       // ...
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;yields&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;/default-domain/workspaces/Publisher Content/Testing/foo bar
/default-domain/workspaces/Publisher Content/Testing/foo bar/document.pdf
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the observed path to the document is at&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/site/dav/Publisher" target="test_blank"&gt;http://localhost:8080/nuxeo/site/dav/Publisher&lt;/A&gt; Content/Testing/document.pdf
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(i.e. no &lt;CODE&gt;/foo bar/&lt;/CODE&gt; component).&lt;/P&gt;
&lt;P&gt;In an automation operation, where should I be looking to derive a path for a DocumentModel that another system will later be able to access underneath &lt;A href="http://example.com/nuxeo/site/dav" target="test_blank"&gt;http://example.com/nuxeo/site/dav&lt;/A&gt; ?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2013 21:41:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316643#M3644</guid>
      <dc:creator>Steven_Huwig1</dc:creator>
      <dc:date>2013-08-06T21:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to derive a WebDAV path from a DocumentModel?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316644#M3645</link>
      <description>&lt;P&gt;The WebDAV "path" is basically the the same &lt;CODE&gt;doc.getPathAsString()&lt;/CODE&gt;, namely the sequence of &lt;CODE&gt;doc.getName()&lt;/CODE&gt; for the &lt;CODE&gt;doc&lt;/CODE&gt; objects (that are folderish) leading to the document, except that:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the first parts may be skipped depending on the WebDAV virtual roots in effect,&lt;/LI&gt;
&lt;LI&gt;the last part, for the document, is not its &lt;CODE&gt;doc.getName()&lt;/CODE&gt; but the filename of the doc's blob.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;See &lt;CODE&gt;org.nuxeo.ecm.platform.wi.backend.SimpleBackend.getDisplayName&lt;/CODE&gt; for the code.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2013 12:54:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316644#M3645</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-08-07T12:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to derive a WebDAV path from a DocumentModel?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316645#M3646</link>
      <description>&lt;P&gt;This is exactly the pointer I needed. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2013 15:04:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/is-there-a-way-to-derive-a-webdav-path-from-a-documentmodel/m-p/316645#M3646</guid>
      <dc:creator>Steven_Huwig1</dc:creator>
      <dc:date>2013-08-07T15:04:08Z</dc:date>
    </item>
  </channel>
</rss>

