<?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 get and ignore fm:discussion association in alfresco in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33151#M14034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to count the number of files present in a folder.It is working fine but the only problem that I am facing is that it also takes a comment as a file.So,the number of files increases on adding a comment and so it gives the wrong count of the number of files.&lt;/P&gt;&lt;P&gt;My java class for this is as follows-:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pastebin.com/aE3TAnc1" title="https://pastebin.com/aE3TAnc1" rel="nofollow noopener noreferrer"&gt;NodeSizeWebScript.java - Pastebin.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further,what I have noticed is that a child association called fm:discussion of the parent folder is created that holds all the comments.So,plz tell me how to actually catch and ignore that child association of the parent folder in java&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2017 09:17:11 GMT</pubDate>
    <dc:creator>ayushi_agrahari</dc:creator>
    <dc:date>2017-09-13T09:17:11Z</dc:date>
    <item>
      <title>get and ignore fm:discussion association in alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33151#M14034</link>
      <description>I am trying to count the number of files present in a folder.It is working fine but the only problem that I am facing is that it also takes a comment as a file.So,the number of files increases on adding a comment and so it gives the wrong count of the number of files.My java class for this is as fol</description>
      <pubDate>Wed, 13 Sep 2017 09:17:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33151#M14034</guid>
      <dc:creator>ayushi_agrahari</dc:creator>
      <dc:date>2017-09-13T09:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: get and ignore fm:discussion association in alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33152#M14035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the Alfresco 5.2 REST search API with a query like&lt;/P&gt;&lt;P&gt;"query":"ANCESTOR:\"&amp;lt;folder node ref&amp;gt;\" AND TYPE:\"cm:content\""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wich gives me a json response with the total Number of items found:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "list": {&lt;BR /&gt; "pagination": {&lt;BR /&gt; "count": 100,&lt;BR /&gt; "hasMoreItems": true,&lt;BR /&gt; "totalItems": 1687,&lt;BR /&gt; "skipCount": 0,&lt;BR /&gt; "maxItems": 100&lt;BR /&gt; },...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 10:46:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33152#M14035</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-09-13T10:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: get and ignore fm:discussion association in alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33153#M14036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;SPAN style="color: #8b8b8b; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;Ayushi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many ways to achieve your requirement but after looking to your class, best way would be to add set containing type of children expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;Set&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;QName&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; types &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;HashSet&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;QName&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;types&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ContentModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; TYPE_CONTENT&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;List&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;ChildAssociationRef&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; chilAssocsList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; nodeService&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getChildAssocs&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;childNodeRef&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;types&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalpesh&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 11:20:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-and-ignore-fm-discussion-association-in-alfresco/m-p/33153#M14036</guid>
      <dc:creator>kalpesh_c2</dc:creator>
      <dc:date>2017-09-13T11:20:41Z</dc:date>
    </item>
  </channel>
</rss>

