{
isDyn = false;
nc.setDyn(isDyn);
}
DirectoryNode dn = new DirectoryNode();
dn.setId(resource.getResource().toString());
dn.setLevel(level);
String label = resource.getStringURI();
if(label.length()>9)
label = label.substring(0,label.length()-9);
dn.setLabel(label+" bookmarks");
dn.setOwn(isOwner);
dn.setOwnerMbox((issuer != null) ? (issuer.getId()) : "");
dn.setOwnerName((issuer != null) ? (issuer.getName()) : "");
dn.setRemovable(!hasContent);
dn.setLinkedIn(parentIsOwner&!isOwner);
dn.setOpened(onPath);
dn.setStandalone(standalone);
nc.setContent(dn);
}
//normal directory
else if(isDir&&!isSuggested)
{
nc.setType("directory");
DirectoryNode dn = new DirectoryNode();
dn.setId(resource.getResource().toString());
dn.setLevel(level);
if(resource.getLabel().contains("\"")||resource.getLabel().contains("'"))
{
dn.setLabel("bleble "+resource.getLabel().replace("\"", "\\\"").replace("'","\\'"));
}
else if(resource.getLabel().trim().equals(""))
{
dn.setLabel(resource.getStringURI());
}
else
{
dn.setLabel(resource.getLabel());
}
dn.setOwn(isOwner);
dn.setOwnerMbox((issuer != null) ? (issuer.getId()) : "");
dn.setOwnerName((issuer != null) ? (issuer.getName()) : "");
dn.setRemovable(!hasContent);
dn.setLinkedIn(parentIsOwner&!isOwner);
dn.setOpened(onPath);
//check if user select this directory - we can get id or whole uri.
if(isSelected)
{
dn.setSelected(true);
dn.setOpened(false);
}
else dn.setSelected(false);
dn.setStandalone(standalone);
nc.setContent(dn);
}
//suggested directory
else if(isDir&&isSuggested)
{