Class ContextTag

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

public class ContextTag extends jakarta.servlet.jsp.tagext.TagSupport implements jakarta.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:
  • Field Details

    • TOPICMAPID_REQUEST_ATTRIBUTE

      public static String TOPICMAPID_REQUEST_ATTRIBUTE
  • Constructor Details

    • ContextTag

      public ContextTag()
  • Method Details

    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspTagException
      Process the start tag for this instance.
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspTagException
    • doEndTag

      public int doEndTag() throws jakarta.servlet.jsp.JspTagException
      Process the end tag for this instance.
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.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 jakarta.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 jakarta.servlet.jsp.tagext.TryCatchFinally
      Throws:
      Throwable
    • doFinally

      public void doFinally()
      Specified by:
      doFinally in interface jakarta.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.