if((initialLevel==0||filter)&&root!=null)
bookmarksTree(persons.iterator(), buffer, viewer, depth, session,initialLevel,false,standalone,false,true,serviceAddr,selectedUri,/*pathsToUri*/null);
//generate only the part of the tree, starting with resource (without this resource)
else if(initialLevel>=1&&!paste)
{
XfoafSscfResource xsscf = XfoafSscfResource.getXfoafSscfResource(resource.getStringURI());
boolean parentIsOwnerInternal = parentIsOwner;
boolean issuerEqualsViewer = false;
if(xsscf.getIssuedBy()!=null&&xsscf.getIssuedBy().equals(viewer))
issuerEqualsViewer = true;
if(issuerEqualsViewer) parentIsOwnerInternal = true;
treeContent(xsscf, buffer, viewer, depth, session, initialLevel,parentIsOwnerInternal,standalone,issuerEqualsViewer,false,serviceAddr,selectedUri,/*pathsToUri*/null);
}
//generate only the part of the tree, starting with resource (with this resource) - used for pasting and inserting
else if(initialLevel>=1&&paste)
{
//need to get a type.
if(type!=null)
{
if(type.equals(SIOC.Site))
{
SiocSiteResource site = SiocSiteResource.getInstance(resource.getStringURI());
bookmarksTreeSiocData(site, viewer, buffer, depth, session, null, initialLevel, true,standalone,true,selectedUri,null);
}
if(type.equals(SIOC.Forum))
{
SiocForumResource forum = SiocForumResource.getInstance(resource.getStringURI());
bookmarksTreeSiocData(forum, viewer, buffer, depth, session, null, initialLevel, true,standalone,true,selectedUri,null);
}
if(type.equals(SIOC.Post))
{
SiocPostResource post = SiocPostResource.getInstance(resource.getStringURI());
bookmarksTreeSiocData(post, viewer, buffer, depth, session, null, initialLevel, true,standalone,true,selectedUri,null);
}
if(type.equals(S3B_SSCF.WebResource))
{
WebBookmarkResource wbr = WebBookmarkResource.getWebBookmarkResource(resource.getStringURI());
bookmarksTreeWebResource(wbr, viewer, buffer, initialLevel, true, standalone, true, selectedUri);
}
if(type.equals(S3B_SSCF.HexResource))
{
WebBookmarkResource wbr = WebBookmarkResource.getWebBookmarkResource(resource.getStringURI());
bookmarksTreeHexResource(wbr, viewer, buffer, initialLevel, true, standalone, true,selectedUri);
}
}
else
{
XfoafSscfResource xsscf = XfoafSscfResource.getXfoafSscfResource(resource.getStringURI());
bookmarksTreeSscfResource(xsscf, viewer, buffer, depth, session, null, initialLevel, true,standalone,false,true,serviceAddr,null,/*pathsToUri*/null);
}
}
//this is the case when new friend is added to the tree.
else if(initialLevel==0&&root==null)