Example #1
0
        /**
         * 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);
        }
Example #2
0
        /**
         * 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);
        }
Example #3
0
        /**
         * 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);
        }
Example #4
0
        /**
         * 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);
        }
Example #5
0
        /**
         * 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);
        }