com.sonoma
Class SiteContent

java.lang.Object
  |
  +--com.sonoma.SiteContent

public class SiteContent
extends java.lang.Object

Creates DocBook Paragraph of nodes (item nodes) and attributes. Also used to create new postings (DocBook Articles) Other classes and JSP pages use this object instead of Xerces or XML. SiteContent.java


Constructor Summary
SiteContent()
           
 
Method Summary
 boolean addAuthorInfo()
          Not yet implemented or used
 boolean addLongArticle(org.w3c.dom.Document doc, dbNewArticle art)
          Creates a new article (posting) xml file.
 org.w3c.dom.Node addParagraph(org.w3c.dom.Document doc, java.lang.String sSection, int iPara, spParagraph para)
          Adds a new paragraph Before the specified paragraph number
 org.w3c.dom.Node addTitle(org.w3c.dom.Document doc, java.lang.String sSection, int iPara, java.lang.String title)
          Adds a Title element to the chapter or article.
 java.lang.String createXPath(int iPara, java.lang.String sSection, boolean isText)
          Creates XPath Query based on request parameters, usually from JSP pages.
 boolean deleteParagraph(org.w3c.dom.Document doc, int iPara, java.lang.String section)
          Deprecated.
 boolean deleteParagraph(org.w3c.dom.Document doc, java.lang.String sSection, int iPara)
          Deletes paragraphs title, anything at the section level
 boolean moveParagraph(org.w3c.dom.Document doc, java.lang.String sSection, int iPara, int iNewPosition)
          Copies a paragraph node to a new position then deletes it
 org.w3c.dom.Node updateParagraph(org.w3c.dom.Document doc, java.lang.String sSection, int iPara, spParagraph para)
          Updates the Node of a paragraph for DocBooks and DocBook Articles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteContent

public SiteContent()
Method Detail

createXPath

public java.lang.String createXPath(int iPara,
                                    java.lang.String sSection,
                                    boolean isText)
Creates XPath Query based on request parameters, usually from JSP pages.
Parameters:
iPath - is the current DocBook or DocBook Article paragraph node
sSection - the label of the section of the current paragraph. If null or empty string an Article document is used (/article)
isText - if true, the /text() element is added to the end of the XPath, otherwise, the paragraph is the final node

addTitle

public final org.w3c.dom.Node addTitle(org.w3c.dom.Document doc,
                                       java.lang.String sSection,
                                       int iPara,
                                       java.lang.String title)
Adds a Title element to the chapter or article. Maybe this should be citetitle?
Parameters:
doc - is the current DocBook or DocBook Article
sSection - the label of the section to be added to
nd - iPara the paragraph before which the new one will be added
title - The string value of the title to add

deleteParagraph

public final boolean deleteParagraph(org.w3c.dom.Document doc,
                                     java.lang.String sSection,
                                     int iPara)
Deletes paragraphs title, anything at the section level
Parameters:
iPath - is the current DocBook or DocBook Article paragraph node
sSection - the label of the section of the current paragraph. If null or empty string an Article document is used (/article)
iPara - the paragraph to be deleted

moveParagraph

public final boolean moveParagraph(org.w3c.dom.Document doc,
                                   java.lang.String sSection,
                                   int iPara,
                                   int iNewPosition)
Copies a paragraph node to a new position then deletes it
Parameters:
iPath - is the current DocBook or DocBook Article paragraph node
sSection - the label of the section of the current paragraph. If null or empty string an Article document is used (/article)
iPara - the paragraph to be moved
iNewPosition - the position in the current document (before the paragraph is deleted) where the paragraph should be moved

updateParagraph

public org.w3c.dom.Node updateParagraph(org.w3c.dom.Document doc,
                                        java.lang.String sSection,
                                        int iPara,
                                        spParagraph para)
Updates the Node of a paragraph for DocBooks and DocBook Articles. Actually deleting the old paragraph, processing and adding a new paragraph in its place
Parameters:
doc - is the current DocBook or DocBook Article
sSection - the label of the section to be added to
nd - iPara the paragraph before which the new one will be added
oPara - is a paragraph object representing a DocBook Paragraph

addParagraph

public org.w3c.dom.Node addParagraph(org.w3c.dom.Document doc,
                                     java.lang.String sSection,
                                     int iPara,
                                     spParagraph para)
Adds a new paragraph Before the specified paragraph number
Parameters:
doc - is the current DocBook or DocBook Article
sSection - the label of the section to be added to
nd - iPara the paragraph before which the new one will be added
oPara - is a paragraph object representing a DocBook Paragraph

addAuthorInfo

public boolean addAuthorInfo()
Not yet implemented or used

addLongArticle

public boolean addLongArticle(org.w3c.dom.Document doc,
                              dbNewArticle art)
Creates a new article (posting) xml file. A line break starts a new paragrph
Parameters:
doc - is the current DocBook or DocBook Article
art - is the Sonoma object representing a collection of paragraphs used to create the new article

deleteParagraph

public boolean deleteParagraph(org.w3c.dom.Document doc,
                               int iPara,
                               java.lang.String section)
Deprecated. Not used or supported