Package org.omg.CosNotifyFilter

Examples of org.omg.CosNotifyFilter.ConstraintExp


    public void testEmptyIteratorThrowsException() throws Exception {
        ConstraintExp[] _exp = new ConstraintExp[1];

        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("domain1", "type1");
        _eventType[1] = new EventType("domain2", "type2");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        Iterator _i =
            objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain3", "type3"));
View Full Code Here



    public void testIterator2() throws Exception {
        ConstraintExp[] _exp = new ConstraintExp[1];
        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("*", "*");
        _eventType[1] = new EventType("domain*", "type*");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        Iterator _i =
            objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));

        int _count = 0;
        while (_i.hasNext()) {
            _count++;
            ConstraintEntry _e = (ConstraintEntry)_i.next();
            assertEquals("1", _e.getConstraintInfo().constraint_expression.constraint_expr);
        }
        assertTrue(_count == 2);

        ConstraintExp[] _exp2 = new ConstraintExp[1];
        _exp2[0] = new ConstraintExp();

        EventType[] _eventType2 = new EventType[2];
        _eventType2[0] = new EventType("*", "*");
        _eventType2[1] = new EventType("domain*", "type*");
        _exp2[0] = new ConstraintExp(_eventType2, "2");
        objectUnderTest_.add_constraints(_exp2);

        _i = objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));
        _count = 0;

View Full Code Here


    public void testAddRemove() throws Exception {
        ConstraintExp[] _exp = new ConstraintExp[1];
        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("*", "*");
        _eventType[1] = new EventType("domain*", "type*");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        ConstraintExp[] _exp2 = new ConstraintExp[1];
        _exp2[0] = new ConstraintExp();

        EventType[] _eventType2 = new EventType[2];
        _eventType2[0] = new EventType("*", "*");
        _eventType2[1] = new EventType("domain*", "type*");
        _exp2[0] = new ConstraintExp(_eventType2, "2");

        ConstraintInfo[] _info = objectUnderTest_.add_constraints(_exp2);

        Iterator _i = objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));
        int _count = 0;
View Full Code Here

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

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

        falseFilter_ = createFilter();

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

        _constraintExp[0] = new ConstraintExp(_eventType, "false");
        falseFilter_.add_constraints(_constraintExp);       
    }
View Full Code Here

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

        _constraintExp[0] = new ConstraintExp(_eventType, filterExpr);
        objectUnderTest_.add_constraints(_constraintExp);
    }
View Full Code Here

        resultToSet.insert_string("this indicates success");

        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");
        ConstraintExp constraintExp = new ConstraintExp(_eventType, "$.first_name == 'firstname'");

        MappingConstraintPair[] mappingConstraintPair = new MappingConstraintPair[1];
        mappingConstraintPair[0] = new MappingConstraintPair(constraintExp, resultToSet);

        MappingConstraintInfo[] _info = _mappingFilter
View Full Code Here

        resultToSet.insert_string("this is 10");

        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");
        ConstraintExp constraintExp = new ConstraintExp(_eventType, "$ == 10");

        MappingConstraintPair[] mappingConstraintPair = new MappingConstraintPair[2];
        mappingConstraintPair[0] = new MappingConstraintPair(constraintExp, resultToSet);

        constraintExp = new ConstraintExp(_eventType, "$ == 20");
        resultToSet = getORB().create_any();
        resultToSet.insert_string("this is 20");
        mappingConstraintPair[1] = new MappingConstraintPair(constraintExp, resultToSet);

        MappingConstraintInfo[] _info = _mappingFilter
View Full Code Here

  Filter _filter = null;
  try {
      _filter = filterFactory_.create_filter("EXTENDED_TCL");

      ConstraintExp[] _constraints = new ConstraintExp[1];
      _constraints[0] = new ConstraintExp();
      _constraints[0].event_types = new EventType[] {new EventType(EVENT_DOMAIN, "*")};
      _constraints[0].constraint_expr = "$.header.variable_header(" + WORKGROUP_ID + ") != " + _id.intValue();

      _filter.add_constraints(_constraints);

View Full Code Here

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

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

        falseFilter_ = createFilter();

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

        _constraintExp[0] = new ConstraintExp(_eventType, "false");
        falseFilter_.add_constraints(_constraintExp);       
    }
View Full Code Here

    @Test
    public void testIterator() throws Exception {
        ConstraintExp[] _exp = new ConstraintExp[1];

        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("*", "*");
        _eventType[1] = new EventType("domain*", "type*");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        Iterator _i =
            objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));

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.