Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jaxen
Class ContextSupport

    java.lang.Object
      org.jaxen.ContextSupport

All Implemented Interfaces:
  Serializable

public class ContextSupport
extends Object
implements Serializable

Supporting context information for resolving namespace prefixes, functions, and variables.

NOTE: This class is not typically used directly, but is exposed for writers of implementation-specific XPath packages.

Version:
  $Id: ContextSupport.java,v 1.10 2005/06/01 11:19:59 elharo Exp $
Author:
  bob mcwhirter
See Also:
  `XPath for dom4j`, `XPath for JDOM`, `XPath for W3C DOM`, Serialized Form

Constructor Summary
`ContextSupport()` Construct an empty `ContextSupport`.
`ContextSupport(NamespaceContext namespaceContext, FunctionContext functionContext, VariableContext variableContext, Navigator navigator)` Construct.

Method Summary
`Function` | `getFunction(String namespaceURI, String prefix, String localName)` Retrieve a `Function`.
`FunctionContext` | `getFunctionContext()` Retrieve the `FunctionContext`.
`NamespaceContext` | `getNamespaceContext()` Retrieve the `NamespaceContext`.
`Navigator` | `getNavigator()` Retrieve the `Navigator`.
`VariableContext` | `getVariableContext()` Retrieve the `VariableContext`.
`Object` | `getVariableValue(String namespaceURI, String prefix, String localName)` Retrieve a variable value.
`void` | `setFunctionContext(FunctionContext functionContext)` Set the `FunctionContext`.
`void` | `setNamespaceContext(NamespaceContext namespaceContext)` Set the `NamespaceContext`.
`void` | `setVariableContext(VariableContext variableContext)` Set the `VariableContext`.
`String` | `translateNamespacePrefixToUri(String prefix)` Translate a namespace prefix to its URI.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContextSupport

    public ContextSupport()

  Construct an empty `ContextSupport`.

### ContextSupport

    public ContextSupport(NamespaceContext namespaceContext,
                          FunctionContext functionContext,
                          VariableContext variableContext,
                          Navigator navigator)

  Construct.

Parameters:
  `namespaceContext` - the NamespaceContext
  `functionContext` - the FunctionContext
  `variableContext` - the VariableContext
  `navigator` - the model navigator

Method Detail

### setNamespaceContext

    public void setNamespaceContext(NamespaceContext namespaceContext)

  Set the `NamespaceContext`.

  Parameters:
    `namespaceContext` - the namespace context

### getNamespaceContext

    public NamespaceContext getNamespaceContext()

  Retrieve the `NamespaceContext`.

  Returns:
    the namespace context

### setFunctionContext

    public void setFunctionContext(FunctionContext functionContext)

  Set the `FunctionContext`.

  Parameters:
    `functionContext` - the function context

### getFunctionContext

    public FunctionContext getFunctionContext()

  Retrieve the `FunctionContext`.

  Returns:
    the function context

### setVariableContext

    public void setVariableContext(VariableContext variableContext)

  Set the `VariableContext`.

  Parameters:
    `variableContext` - the variable context

### getVariableContext

    public VariableContext getVariableContext()

  Retrieve the `VariableContext`.

  Returns:
    the variable context

### getNavigator

    public Navigator getNavigator()

  Retrieve the `Navigator`.

  Returns:
    the navigator

### translateNamespacePrefixToUri

    public String translateNamespacePrefixToUri(String prefix)

  Translate a namespace prefix to its URI.

  Parameters:
    `prefix` - The prefix
  Returns:
    the namespace URI mapped to the prefix

### getVariableValue

    public Object getVariableValue(String namespaceURI,
                                   String prefix,
                                   String localName)
                            throws UnresolvableException

  Retrieve a variable value.

  Parameters:
    `namespaceURI` - the function namespace URI
    `prefix` - the function prefix
    `localName` - the function name
  Returns:
    the variable value.
  Throws:
    `UnresolvableException` - if unable to locate a bound variable.

### getFunction

    public Function getFunction(String namespaceURI,
                                String prefix,
                                String localName)
                         throws UnresolvableException

  Retrieve a `Function`.

  Parameters:
    `namespaceURI` - the function namespace URI
    `prefix` - the function prefix
    `localName` - the function name
  Returns:
    the function object
  Throws:
    `UnresolvableException` - if unable to locate a bound function

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 Codehaus. All Rights Reserved.