org.onemind.jxp
Class JxpPageSource

java.lang.Object
  extended by org.onemind.jxp.JxpPageSource
Direct Known Subclasses:
CachingPageSource, MultiSourcePageSource

public abstract class JxpPageSource
extends java.lang.Object

Represent the source of JxpPages. It contains multiple JxpPages identified by the ids

Author:
TiongHiang Lee (thlee@onemindsoft.org)

Constructor Summary
JxpPageSource()
           
 
Method Summary
abstract  java.lang.StringBuffer getErrorSource(JxpPage page, int line, int col)
          Print the error source of this page on given line and column
abstract  AstJxpDocument getJxpDocument(JxpPage page)
          Get the jxp document for the JxpPage
abstract  JxpPage getJxpPage(java.lang.String id)
          Return a jxp page identified by the id
abstract  boolean hasJxpPage(java.lang.String id)
          Return whether the jxp page identified by the id exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JxpPageSource

public JxpPageSource()
Method Detail

hasJxpPage

public abstract boolean hasJxpPage(java.lang.String id)
Return whether the jxp page identified by the id exists

Parameters:
id - the id
Returns:
true if exists

getJxpPage

public abstract JxpPage getJxpPage(java.lang.String id)
                            throws JxpPageNotFoundException
Return a jxp page identified by the id

Parameters:
id - the id
Returns:
the jxp page
Throws:
JxpPageNotFoundException - if the page cannot be found

getErrorSource

public abstract java.lang.StringBuffer getErrorSource(JxpPage page,
                                                      int line,
                                                      int col)
                                               throws java.io.IOException
Print the error source of this page on given line and column

Parameters:
page - the page
line - the line
col - the column
Returns:
the StringBuffer
Throws:
java.io.IOException - if there's IO problem

getJxpDocument

public abstract AstJxpDocument getJxpDocument(JxpPage page)
                                       throws JxpPageSourceException
Get the jxp document for the JxpPage

Parameters:
page - the JxpPage
Returns:
the AstJxpDocument
Throws:
JxpPageSourceException - if there's source exception