try {
DateTime someDate=null;
setCreationDate(Calendar.getInstance());
Session session=db.getParent();
Document storyDoc = db.createDocument();
storyDoc.replaceItemValue("Form", "News");
storyDoc.replaceItemValue("NID", Utilities.generateUniqueId());
if(isRedirectEnabled()) {
try {
setLink(Utilities.followRedirect(getLink()));
} catch (IOException e) {
throw new StoryReaderException(Constants.EXCEPTION_COMM_ERROR + ": "+getLink());
}
}
storyDoc.replaceItemValue("NLink", getLink());
someDate=session.createDateTime(getCreationDate());
storyDoc.replaceItemValue("NCreationDate", someDate);
someDate.recycle();
someDate=session.createDateTime(getDate());
storyDoc.replaceItemValue("NPublicationDate", someDate);
someDate.recycle();
storyDoc.replaceItemValue("NTitle", getTitle());
storyDoc.replaceItemValue("NAbstract", getAbstractContent());