org.globus.wsrf.impl
Class SimpleTopicExpressionEvaluator

java.lang.Object
  extended byorg.globus.wsrf.impl.SimpleTopicExpressionEvaluator
All Implemented Interfaces:
TopicExpressionEvaluator

public class SimpleTopicExpressionEvaluator
extends java.lang.Object
implements TopicExpressionEvaluator

Topic expression evalutor for the simple topic dialect.

See Also:
TopicExpressionEvaluator

Field Summary
private static java.lang.String[] dialects
           
private static org.globus.util.I18n i18n
           
(package private) static org.apache.commons.logging.Log logger
           
 
Constructor Summary
SimpleTopicExpressionEvaluator()
           
 
Method Summary
 java.util.List getConcreteTopicPath(TopicExpressionType expression)
          Converts the expression from dialect specific form to a ordered list of QNames.
 java.lang.String[] getDialects()
          Gets the URIs for the dialects that this evaluator can handle
 java.util.Collection resolve(TopicExpressionType expression, TopicList topicList)
          Evaluates the expression over a TopicList and returns the result.
 TopicExpressionType toTopicExpression(java.util.List topicPath)
          Converts a topic path (list of QNames) to a dialect specific concrete topic expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.commons.logging.Log logger

i18n

private static org.globus.util.I18n i18n

dialects

private static java.lang.String[] dialects
Constructor Detail

SimpleTopicExpressionEvaluator

public SimpleTopicExpressionEvaluator()
Method Detail

resolve

public java.util.Collection resolve(TopicExpressionType expression,
                                    TopicList topicList)
                             throws UnsupportedTopicExpressionDialectException,
                                    TopicExpressionResolutionException,
                                    InvalidTopicExpressionException,
                                    TopicExpressionException
Description copied from interface: TopicExpressionEvaluator
Evaluates the expression over a TopicList and returns the result.

Specified by:
resolve in interface TopicExpressionEvaluator
Parameters:
expression - object passed by client representing the topic expression
topicList - topic list associated with the service/resource
Returns:
the result of the evaluation which depends on the expression.
Throws:
TopicExpressionException - if any other error occurs
InvalidTopicExpressionException - if the topic expression is invalid
UnsupportedTopicExpressionDialectException - if the topic expression dialect is not supported
TopicExpressionResolutionException - if the expression could not be evaluated

getDialects

public java.lang.String[] getDialects()
Description copied from interface: TopicExpressionEvaluator
Gets the URIs for the dialects that this evaluator can handle

Specified by:
getDialects in interface TopicExpressionEvaluator
Returns:
array of URIs supported by this evaluator

getConcreteTopicPath

public java.util.List getConcreteTopicPath(TopicExpressionType expression)
                                    throws UnsupportedTopicExpressionDialectException,
                                           InvalidTopicExpressionException,
                                           TopicExpressionException
Description copied from interface: TopicExpressionEvaluator
Converts the expression from dialect specific form to a ordered list of QNames. This method throws an exception if the expression does not evaluate to a concrete topic path.

Specified by:
getConcreteTopicPath in interface TopicExpressionEvaluator
Parameters:
expression - object passed by client representing the topic expression
Returns:
a list of QNames describing the concrete topic path
Throws:
UnsupportedTopicExpressionDialectException - if the topic expression dialect is not supported
TopicExpressionException - if any other error occurs
InvalidTopicExpressionException - if the topic expression is invalid

toTopicExpression

public TopicExpressionType toTopicExpression(java.util.List topicPath)
                                      throws InvalidTopicExpressionException,
                                             TopicExpressionException
Description copied from interface: TopicExpressionEvaluator
Converts a topic path (list of QNames) to a dialect specific concrete topic expression.

Specified by:
toTopicExpression in interface TopicExpressionEvaluator
Parameters:
topicPath - containing a list of QNames describing a concrete topic path
Returns:
dialect specific version of the topic path
Throws:
InvalidTopicExpressionException - if the conrete topic path is invalid
TopicExpressionException - if any other error occurs