org.jacorb.notification.filter.impl
Class DefaultETCLEvaluator

java.lang.Object
  extended byorg.jacorb.notification.filter.impl.DefaultETCLEvaluator
All Implemented Interfaces:
ETCLEvaluator

public class DefaultETCLEvaluator
extends java.lang.Object
implements ETCLEvaluator

Provide the Basic operations needed to evaluate filter expressions on Anys.

Version:
$Id: DefaultETCLEvaluator.java,v 1.3 2005/10/08 09:59:55 alphonse.bendt Exp $
Author:
Alphonse Bendt

Constructor Summary
DefaultETCLEvaluator(org.apache.avalon.framework.configuration.Configuration config, DynAnyFactory dynAnyFactory)
           
 
Method Summary
 Any evaluateArrayIndex(Any any, int index)
          extract the n-th position out of an Array wrapped inside an Any.
 Any evaluateDiscriminator(Any any)
           
 EvaluationResult evaluateElementInSequence(EvaluationContext context, EvaluationResult element, Any sequence)
           
 Any evaluateExistIdentifier(Any value, java.lang.String identifier)
           
 Any evaluateIdentifier(Any any, int position)
           
 Any evaluateIdentifier(Any any, java.lang.String identifier)
          expensive
 Any evaluateListLength(Any value)
          identify the number of elements of a component. if the parameter is a sequence or an array, this method will return the number of elements in the list.
 Any evaluateNamedValueList(Any any, java.lang.String name)
          extract a named value out of a sequence of name/value pairs.
 Any evaluatePropertyList(Property[] list, java.lang.String name)
           
 Any evaluateRepositoryId(Any value)
          identify the RepositoryId of a component.
 Any evaluateTypeName(Any value)
          identify the unscoped IDL type name of a component.
 Any evaluateUnion(Any value)
          extract the default member from Union wrapped inside the provided Any.
 Any evaluateUnion(Any value, int position)
           
 boolean hasDefaultDiscriminator(Any any)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultETCLEvaluator

public DefaultETCLEvaluator(org.apache.avalon.framework.configuration.Configuration config,
                            DynAnyFactory dynAnyFactory)
Method Detail

hasDefaultDiscriminator

public boolean hasDefaultDiscriminator(Any any)
                                throws EvaluationException
Specified by:
hasDefaultDiscriminator in interface ETCLEvaluator
Throws:
EvaluationException

evaluateExistIdentifier

public Any evaluateExistIdentifier(Any value,
                                   java.lang.String identifier)
                            throws EvaluationException
Specified by:
evaluateExistIdentifier in interface ETCLEvaluator
Throws:
EvaluationException

evaluateTypeName

public Any evaluateTypeName(Any value)
                     throws EvaluationException
Description copied from interface: ETCLEvaluator
identify the unscoped IDL type name of a component. (e.g. mystruct._typeid == 'mystruct')

Specified by:
evaluateTypeName in interface ETCLEvaluator
Parameters:
value - the component
Returns:
the IDL type name (string) wrapped in an any
Throws:
EvaluationException

evaluateRepositoryId

public Any evaluateRepositoryId(Any value)
                         throws EvaluationException
Description copied from interface: ETCLEvaluator
identify the RepositoryId of a component. (e.g. mystruct._repos_id == 'IDL:module/mystruct:1.0'

Specified by:
evaluateRepositoryId in interface ETCLEvaluator
Parameters:
value - the component
Returns:
the IDL type name (string) wrapped in an any
Throws:
EvaluationException

evaluateListLength

public Any evaluateListLength(Any value)
                       throws EvaluationException
Description copied from interface: ETCLEvaluator
identify the number of elements of a component. if the parameter is a sequence or an array, this method will return the number of elements in the list.

Specified by:
evaluateListLength in interface ETCLEvaluator
Parameters:
value - the component
Returns:
the number of elements in the list
Throws:
EvaluationException

evaluateUnion

public Any evaluateUnion(Any value)
                  throws EvaluationException
Description copied from interface: ETCLEvaluator
extract the default member from Union wrapped inside the provided Any.

Specified by:
evaluateUnion in interface ETCLEvaluator
Throws:
EvaluationException

evaluateUnion

public Any evaluateUnion(Any value,
                         int position)
                  throws EvaluationException
Specified by:
evaluateUnion in interface ETCLEvaluator
Throws:
EvaluationException

evaluatePropertyList

public Any evaluatePropertyList(Property[] list,
                                java.lang.String name)
Specified by:
evaluatePropertyList in interface ETCLEvaluator

evaluateNamedValueList

public Any evaluateNamedValueList(Any any,
                                  java.lang.String name)
                           throws EvaluationException
Description copied from interface: ETCLEvaluator
extract a named value out of a sequence of name/value pairs.

Specified by:
evaluateNamedValueList in interface ETCLEvaluator
Throws:
EvaluationException

evaluateArrayIndex

public Any evaluateArrayIndex(Any any,
                              int index)
                       throws EvaluationException
Description copied from interface: ETCLEvaluator
extract the n-th position out of an Array wrapped inside an Any.

Specified by:
evaluateArrayIndex in interface ETCLEvaluator
Throws:
EvaluationException

evaluateIdentifier

public Any evaluateIdentifier(Any any,
                              int position)
                       throws EvaluationException
Specified by:
evaluateIdentifier in interface ETCLEvaluator
Throws:
EvaluationException

evaluateDiscriminator

public Any evaluateDiscriminator(Any any)
                          throws EvaluationException
Specified by:
evaluateDiscriminator in interface ETCLEvaluator
Throws:
EvaluationException

evaluateElementInSequence

public EvaluationResult evaluateElementInSequence(EvaluationContext context,
                                                  EvaluationResult element,
                                                  Any sequence)
                                           throws EvaluationException
Specified by:
evaluateElementInSequence in interface ETCLEvaluator
Throws:
EvaluationException

evaluateIdentifier

public Any evaluateIdentifier(Any any,
                              java.lang.String identifier)
                       throws EvaluationException
expensive

Specified by:
evaluateIdentifier in interface ETCLEvaluator
Throws:
EvaluationException