net.ontopia.topicmaps.nav2.taglibs.logic
Class ContextTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.ontopia.topicmaps.nav2.taglibs.logic.ContextTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally, NavigatorPageIF

public class ContextTag
extends javax.servlet.jsp.tagext.TagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally, NavigatorPageIF

INTERNAL: Logic Tag for establishing the outermost lexical scope in which all computation happens and the embedded tags are executed.

Use this tag as root tag for all tags defined in the Tag Libraries of the Ontopia Navigator Framework (2nd Generation).

See Also:
Serialized Form

Field Summary
static String TOPICMAPID_REQUEST_ATTRIBUTE
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ContextTag()
           
 
Method Summary
 void _setTopicMap(TopicMapIF topicmap)
          Special setter used only for unit testing purposes.
 void doCatch(Throwable t)
           
 int doEndTag()
          Process the end tag for this instance.
 void doFinally()
           
 int doStartTag()
          Process the start tag for this instance.
 ContextManagerIF getContextManager()
          INTERNAL: Get the Context Manager.
 DeclarationContextIF getDeclarationContext()
          INTERNAL: Gets the tolog declaration context.
 FunctionIF getFunction(String name)
          INTERNAL: Get a function out of the register.
 NavigatorApplicationIF getNavigatorApplication()
          INTERNAL: Get the navigator application which allows accessing all kind of configuration.
 NavigatorConfigurationIF getNavigatorConfiguration()
          INTERNAL: Get the navigator configuration for getting access to the application.xml settings.
 String[] getObjectIDs()
          Get Topic map object identifiers.
 Collection getObjects()
          Gets the topic map objects retrieved by the context tag.
 String getObjparam()
           
 javax.servlet.jsp.PageContext getPageContext()
          INTERNAL: Gets the JSP page context which allows to have access to further request relevant information.
 QueryProcessorIF getQueryProcessor()
          INTERNAL: Get the tolog query processor the context tag is working with.
 QueryResultIF getQueryResult(String name)
           
 String getTmparam()
           
 TopicMapIF getTopicMap()
          INTERNAL: Get the topicmap object the context tag is working with.
 String getTopicMapId()
           
 TopicMapRepositoryIF getTopicMapRepository()
           
 void registerFunction(FunctionIF function)
          INTERNAL: Add a function to the registry.
 void registerFunction(String name, FunctionIF function)
          INTERNAL: Add a named function to the registry.
 void registerQueryResult(String name, QueryResultIF queryResult)
           
 void setContextManager(ContextManagerIF ctxtmgr)
          Special setter used only for unit testing purposes.
 void setDeclarationContext(DeclarationContextIF declarationContext)
           
 void setObjparam(String objParam)
          If set, it tells the tag what request parameter contains the object ID of the object to set as the value of the default variable.
 void setReadonly(boolean readonly)
          A boolean flag to tell the tag to fetch a read-only or a read-write topic map.
 void setSet(String varObjName)
          The variable name which the object will be set as the value of.
 void setSettm(String varTMName)
          The variable name which the topic map will be set as the value of.
 void setTmparam(String tmParam)
          Tells the tag which request parameter contains the ID of the topic map in the context.
 void setTopicmap(String topicmap)
          If set, the ID taken from this attribute is the ID of the topic map.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOPICMAPID_REQUEST_ATTRIBUTE

public static String TOPICMAPID_REQUEST_ATTRIBUTE
Constructor Detail

ContextTag

public ContextTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Process the start tag for this instance.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Process the end tag for this instance.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException

setTmparam

public void setTmparam(String tmParam)
Tells the tag which request parameter contains the ID of the topic map in the context.

Parameters:
tmParam - String which specifies a Request parameter name.

getTmparam

public String getTmparam()

setObjparam

public void setObjparam(String objParam)
If set, it tells the tag what request parameter contains the object ID of the object to set as the value of the default variable. If not set, the default variable is set to the topic map.

Parameters:
objParam - String which specifies a Request parameter name.

getObjparam

public String getObjparam()

setSet

public void setSet(String varObjName)
The variable name which the object will be set as the value of.

Parameters:
varObjName - String which specifies a variable name for the object.

setSettm

public void setSettm(String varTMName)
The variable name which the topic map will be set as the value of.

Parameters:
varTMName - String which specifies a variable name for the topicmap.

setTopicmap

public void setTopicmap(String topicmap)
If set, the ID taken from this attribute is the ID of the topic map.

Parameters:
topicmap - String which specifies a Topic map ID.

setReadonly

public void setReadonly(boolean readonly)
A boolean flag to tell the tag to fetch a read-only or a read-write topic map.

Parameters:
readonly - boolean value; true if read-only. The default is true.

getObjectIDs

public String[] getObjectIDs()
Get Topic map object identifiers.


getObjects

public Collection getObjects()
Gets the topic map objects retrieved by the context tag.

Returns:
collection of TopicIF objects.

getContextManager

public ContextManagerIF getContextManager()
Description copied from interface: NavigatorPageIF
INTERNAL: Get the Context Manager.

Specified by:
getContextManager in interface NavigatorPageIF
Returns:
object which implements the ContextManagerIF interface

registerFunction

public void registerFunction(FunctionIF function)
Description copied from interface: NavigatorPageIF
INTERNAL: Add a function to the registry.

Specified by:
registerFunction in interface NavigatorPageIF
Parameters:
function - The function to be added to the internal registry; An object implementing FunctionIF.

registerFunction

public void registerFunction(String name,
                             FunctionIF function)
Description copied from interface: NavigatorPageIF
INTERNAL: Add a named function to the registry.

Specified by:
registerFunction in interface NavigatorPageIF
Parameters:
name - The name with which the function is to be registered.
function - The function to be added to the internal registry; An object implementing FunctionIF.

getFunction

public FunctionIF getFunction(String name)
Description copied from interface: NavigatorPageIF
INTERNAL: Get a function out of the register.

Specified by:
getFunction in interface NavigatorPageIF
Parameters:
name - The string which identifies the name of the function.
Returns:
The function

registerQueryResult

public void registerQueryResult(String name,
                                QueryResultIF queryResult)

getQueryResult

public QueryResultIF getQueryResult(String name)

getTopicMapRepository

public TopicMapRepositoryIF getTopicMapRepository()

getNavigatorApplication

public NavigatorApplicationIF getNavigatorApplication()
Description copied from interface: NavigatorPageIF
INTERNAL: Get the navigator application which allows accessing all kind of configuration.

Specified by:
getNavigatorApplication in interface NavigatorPageIF
Returns:
Object implementing NavigatorApplicationIF

getNavigatorConfiguration

public NavigatorConfigurationIF getNavigatorConfiguration()
Description copied from interface: NavigatorPageIF
INTERNAL: Get the navigator configuration for getting access to the application.xml settings.

Specified by:
getNavigatorConfiguration in interface NavigatorPageIF

getTopicMap

public TopicMapIF getTopicMap()
Description copied from interface: NavigatorPageIF
INTERNAL: Get the topicmap object the context tag is working with.

Specified by:
getTopicMap in interface NavigatorPageIF
Returns:
Object implementing TopicMapIF

getTopicMapId

public String getTopicMapId()

getQueryProcessor

public QueryProcessorIF getQueryProcessor()
Description copied from interface: NavigatorPageIF
INTERNAL: Get the tolog query processor the context tag is working with.

Specified by:
getQueryProcessor in interface NavigatorPageIF
Returns:
Object implementing QueryProcessorIF

getPageContext

public javax.servlet.jsp.PageContext getPageContext()
Description copied from interface: NavigatorPageIF
INTERNAL: Gets the JSP page context which allows to have access to further request relevant information.

Specified by:
getPageContext in interface NavigatorPageIF

getDeclarationContext

public DeclarationContextIF getDeclarationContext()
Description copied from interface: NavigatorPageIF
INTERNAL: Gets the tolog declaration context.

Specified by:
getDeclarationContext in interface NavigatorPageIF

setDeclarationContext

public void setDeclarationContext(DeclarationContextIF declarationContext)

doCatch

public void doCatch(Throwable t)
             throws Throwable
Specified by:
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinally
Throws:
Throwable

doFinally

public void doFinally()
Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally

_setTopicMap

public void _setTopicMap(TopicMapIF topicmap)
Special setter used only for unit testing purposes. The JSP containers will never call this constructor, nor should anyone else.


setContextManager

public void setContextManager(ContextManagerIF ctxtmgr)
Special setter used only for unit testing purposes. The JSP containers will never call this constructor, nor should anyone else.



Copyright © 2000-2012 Ontopia.