org.jacorb.notification.filter

Class DynamicEvaluator

Implemented Interfaces:
Configurable

public class DynamicEvaluator
extends java.lang.Object
implements Configurable

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

Version:
$Id: DynamicEvaluator.java,v 1.3 2004/05/06 12:39:59 nicolas Exp $

Author:
Alphonse Bendt

Constructor Summary

DynamicEvaluator(DynAnyFactory dynAnyFactory)

Method Summary

void
configure(Configuration conf)
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, String identifier)
Any
evaluateIdentifier(Any any, String identifier)
expensive
Any
evaluateIdentifier(Any any, int position)
Any
evaluateListLength(Any value)
identify the number of elements of a component.
protected Any
evaluateNamedValue(DynAny any, String name)
Any
evaluateNamedValueList(Any any, String name)
extract a named value out of a sequence of name/value pairs.
Any
evaluatePropertyList(Property list, 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)

Constructor Details

DynamicEvaluator

public DynamicEvaluator(DynAnyFactory dynAnyFactory)

Method Details

configure

public void configure(Configuration conf)


evaluateArrayIndex

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


evaluateDiscriminator

public Any evaluateDiscriminator(Any any)
            throws EvaluationException


evaluateElementInSequence

public EvaluationResult evaluateElementInSequence(EvaluationContext context,
                                                  EvaluationResult element,
                                                  Any sequence)
            throws EvaluationException


evaluateExistIdentifier

public Any evaluateExistIdentifier(Any value,
                                   String identifier)
            throws EvaluationException


evaluateIdentifier

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


evaluateIdentifier

public Any evaluateIdentifier(Any any,
                              int position)
            throws EvaluationException


evaluateListLength

public Any evaluateListLength(Any value)
            throws EvaluationException
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.

Parameters:
value - the component

Returns:
the number of elements in the list


evaluateNamedValue

protected Any evaluateNamedValue(DynAny any,
                                 String name)
            throws EvaluationException


evaluateNamedValueList

public Any evaluateNamedValueList(Any any,
                                  String name)
            throws EvaluationException
extract a named value out of a sequence of name/value pairs.


evaluatePropertyList

public Any evaluatePropertyList(Property list,
                                String name)


evaluateRepositoryId

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

Parameters:
value - the component

Returns:
the IDL type name (string) wrapped in an any


evaluateTypeName

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

Parameters:
value - the component

Returns:
the IDL type name (string) wrapped in an any


evaluateUnion

public Any evaluateUnion(Any value)
            throws EvaluationException
extract the default member from Union wrapped inside the provided Any.


evaluateUnion

public Any evaluateUnion(Any value,
                         int position)
            throws EvaluationException


hasDefaultDiscriminator

public boolean hasDefaultDiscriminator(Any any)
            throws EvaluationException