}
if ( loginResult != null ) {
allOntsTreeItem.addItem(new AuthorItem(REGISTERED_BY_ME, loginResult.getUserName(), loginResult.getUserId()));
TreeItem registerByTreeItem = new TreeItem(REGISTERED_BY);
allOntsTreeItem.addItem(registerByTreeItem);
List<String> usernames = new ArrayList<String>();
usernames.addAll(authors.keySet());
usernames.remove(loginResult.getUserName());
Collections.sort(usernames);
for ( String author : usernames ) {
registerByTreeItem.addItem(new AuthorItem(author, author, authors.get(author)));
}
}
allOntsTreeItem.setState(true);
if ( types.size() > 0 ) {
Collections.sort(types);
TreeItem typeItem = new TreeItem("Type");
tree.addItem(typeItem);
for ( String type : types ) {
typeItem.addItem(new TypeItem(type));
}
typeItem.setState(true);
}
if ( authorities.size() > 0 ) {
Collections.sort(authorities);
TreeItem authItem = new TreeItem("Authority");
tree.addItem(authItem);
for ( String auth : authorities ) {
authItem.addItem(new AuthorityItem(auth));
}
}
}