/** * Creates a new list element and adds all of the given components in the * list * * @param textComponents * a <code>List</code> of <code>NLGElement</code>s that form the * components of this element. * @return a <code>DocumentElement</code> representing the list. */ public virtual DocumentElement createList(IList <DocumentElement> textComponents) { DocumentElement list = new DocumentElement(new DocumentCategory(DocumentCategory.DocumentCategoryEnum.LIST), null); list.addComponents(textComponents); return(list); }
/** * Creates a new sentence element and adds all of the given components. * * @param components * a <code>List</code> of <code>NLGElement</code>s that form the * components of this element. * @return a <code>DocumentElement</code> representing this sentence */ public virtual DocumentElement createSentence(IList <NLGElement> components) { DocumentElement sentence = new DocumentElement(new DocumentCategory(DocumentCategory.DocumentCategoryEnum.SENTENCE), null); sentence.addComponents(components); return(sentence); }
/** * Creates a new document element with the given title and adds all of the * given components in the list * * @param title * the title of this element. * @param components * a <code>List</code> of <code>NLGElement</code>s that form the * components of this element. * @return a <code>DocumentElement</code> */ public virtual DocumentElement createDocument(string title, IList <DocumentElement> components) { DocumentElement document = new DocumentElement(new DocumentCategory(DocumentCategory.DocumentCategoryEnum.DOCUMENT), title); if (components != null) { document.addComponents(components); } return(document); }
/** * Creates a new section element with the given title and adds all of the * given components in the list * * @param title * the title of this element. * @param components * a <code>List</code> of <code>NLGElement</code>s that form the * components of this element. * @return a <code>DocumentElement</code> representing the section. */ public virtual DocumentElement createSection(string title, IList <DocumentElement> components) { DocumentElement section = new DocumentElement(new DocumentCategory(DocumentCategory.DocumentCategoryEnum.SECTION), title); if (components != null) { section.addComponents(components); } return(section); }
/** * Creates a new paragraph element and adds all of the given components in * the list * * @param components * a <code>List</code> of <code>NLGElement</code>s that form the * components of this element. * @return a <code>DocumentElement</code> representing this paragraph */ public virtual DocumentElement createParagraph(IList <DocumentElement> components) { DocumentElement paragraph = new DocumentElement(new DocumentCategory(DocumentCategory.DocumentCategoryEnum.PARAGRAPH), null); if (components != null) { paragraph.addComponents(components); } return(paragraph); }