//String servAddr =
StringBuilder sb = new StringBuilder();
//sb.append(SscfAjax.getServiceAddr(req)).append("/directory/").append(id);
//id is now the whole uri
String resUri = id;
XfoafSscfResource xfsr = XfoafSscfResource.getXfoafSscfResource(resUri);
if(xfsr!=null)
{
sb.setLength(0);
String labelOfFeed = xfsr.getLabel();
int type = 0; //1 for user feed;
System.out.println(resUri);
//in case we have top-level - user feed
if(xfsr.getId().length()<=8)
{
Person p = PersonFactory.findPerson(resUri);
if(p!=null) {
System.out.println(p.getName());
labelOfFeed = p.getName();
type = 1;
}
}
feed.setTitle(getFeedTitle(labelOfFeed, req.getLocalName(), rb, type));
//TODO: - resUri may point to different server/system
feed.setLink(resUri);
feed.setDescription(getFeedTitle(labelOfFeed, req.getLocalName(), rb, type)); //TODO
//get the changes
ChangelogDbHandler cdh = ChangelogDbHandler.getInstance();
List<ChangeBean> changes = new ArrayList<ChangeBean>();
List<SyndEntry> entries = new ArrayList<SyndEntry>();
if(cdh!=null)
{
changes = cdh.getLastChanges(resUri, numOfChanges);
}
for(ChangeBean change:changes)
{
SyndEntry entry;
SyndContent description;
entry = new SyndEntryImpl();
XfoafSscfResource changeRes = null;
XfoafSscfResource changedRes = null;
changedRes = XfoafSscfResource.getXfoafSscfResource(change.getChangedUri());
if((change.getChangeType()==ChangeTypes.ADDED.getChangeType()
||change.getChangeType()==ChangeTypes.REMOVED.getChangeType())
&&change.getChangeUri()!=null)