Package org.omg.CosNotifyFilter

Examples of org.omg.CosNotifyFilter.ConstraintExp


    void connect(StructuredProxyPushSupplier supplier,
                FilterFactory filterFactory) throws Exception {

       filter_ = filterFactory.create_filter("EXTENDED_TCL");
        ConstraintExp[] _filter = new ConstraintExp[1];
        _filter[0] = new ConstraintExp();
        _filter[0].constraint_expr =
            "$type_name == 'LINE'";

        _filter[0].event_types = new EventType[1];
        _filter[0].event_types[0] = new EventType("*", "*");
 
View Full Code Here


    }

    void connect(StructuredProxyPushSupplier mySupplier, FilterFactory factory) throws Exception {
        myFilter_ = factory.create_filter("EXTENDED_TCL");
        ConstraintExp[] _filter = new ConstraintExp[1];
        _filter[0] = new ConstraintExp();

        _filter[0].constraint_expr = "$type_name == 'CLEAR'";
        _filter[0].event_types = new EventType[1];
        _filter[0].event_types[0] = new EventType("*", "*");
        myFilter_.add_constraints(_filter);
View Full Code Here

    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");
        String _expression = "FALSE";
        _constraintExp[0] = new ConstraintExp(_eventType, _expression);
        filter_.add_constraints(_constraintExp);

        assertFalse(filter_.match(testPerson_));
    }
View Full Code Here

    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");

        _constraintExp[0] = new ConstraintExp(_eventType, "$.first_name == 'firstname'");
        filter_.add_constraints(_constraintExp);

        // this should match
        assertTrue(filter_.match(testPerson_));
    }
View Full Code Here

    public void testAccessNonExistingMember() throws Exception
    {
        EventType[] _eventType = new EventType[] { new EventType("*", "*") };

        ConstraintExp[] _constraintExp = new ConstraintExp[] {
                new ConstraintExp(_eventType, "$not_exist == 3"),
                new ConstraintExp(_eventType, "TRUE"), };

        filter_.add_constraints(_constraintExp);

        assertTrue(filter_.match(testPerson_));
    }
View Full Code Here

    public void testMatch_EventTypes_IsEmpty() throws Exception
    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[0];

        _constraintExp[0] = new ConstraintExp(_eventType, "$.first_name == 'firstname'");
        filter_.add_constraints(_constraintExp);

        // this should match
        assertTrue(filter_.match(testPerson_));
    }
View Full Code Here

    public void testMatch_EventType_IsEmptyString() throws Exception
    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[] { new EventType("", "") };

        _constraintExp[0] = new ConstraintExp(_eventType, "$.first_name == 'firstname'");
        filter_.add_constraints(_constraintExp);

        // this should match
        assertTrue(filter_.match(testPerson_));
    }
View Full Code Here

    public void testMatch_FilterString_IsEmpty() throws Exception
    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[] { new EventType("*", "*") };

        _constraintExp[0] = new ConstraintExp(_eventType, "");
        filter_.add_constraints(_constraintExp);

        // this should match
        assertTrue(filter_.match(testPerson_));
    }
View Full Code Here

    public void testMatchModify() throws Exception
    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");
        _constraintExp[0] = new ConstraintExp(_eventType, "$.first_name == 'something'");
        ConstraintInfo[] _info = filter_.add_constraints(_constraintExp);

        // oops wrong
        assertTrue(!filter_.match(testPerson_));

View Full Code Here

        ConstraintExp[] _constraintExp = new ConstraintExp[1];

        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("domain", "name");
        String _expression = "1 + 1";
        _constraintExp[0] = new ConstraintExp(_eventType, _expression);

        ConstraintInfo[] _info = filter_.add_constraints(_constraintExp);

        assertTrue(_info.length == 1);
        assertTrue(_info[0].constraint_expression.event_types.length == 1);
View Full Code Here

TOP

Related Classes of org.omg.CosNotifyFilter.ConstraintExp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.