Examples of ConnectiveDescr


Examples of org.drools.lang.descr.ConnectiveDescr

                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
       
        Object op = parser.getParent();
        ConnectiveDescr c = (ConnectiveDescr) parser.getCurrent();
       
        if ( op instanceof PatternDescr ) {
            StringBuilder sb = new StringBuilder();
            c.buildExpression( sb );
                 
            ExprConstraintDescr expr = new ExprConstraintDescr( );
            expr.setExpression( sb.toString() );
             
            final PatternDescr patternDescr = (PatternDescr)op; 
            patternDescr.addConstraint( expr );   
        } else {       
            ConnectiveDescr p = (ConnectiveDescr)op;
            p.add( c );
        }
        return c;
    }
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

        final String fieldName = attrs.getValue( "field-name" );
        emptyAttributeCheck( localName,
                             "field-name",
                             fieldName,
                             parser );
        final ConnectiveDescr connective = new ConnectiveDescr( RestrictionConnectiveType.AND );
        connective.setParen( false );

        connective.setPrefix( fieldName );

        return connective;
    }
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();

        final ConnectiveDescr c = (ConnectiveDescr) parser.getCurrent();

        Object p = parser.getParent();
        if ( p instanceof PatternDescr ) {
            StringBuilder sb = new StringBuilder();
            c.buildExpression( sb );

            ExprConstraintDescr expr = new ExprConstraintDescr();
            expr.setExpression( sb.toString() );

            final PatternDescr patternDescr = (PatternDescr) parser.getParent();
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
       
        ConnectiveDescr c = (ConnectiveDescr) parser.getParent();
        String s = (String) parser.getCurrent();

        c.add( s );
        return null;
    }
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

    public Object end(final String uri,
                      final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
       
        ConnectiveDescr c = (ConnectiveDescr) parser.getParent();
        String s = (String) parser.getCurrent();

        c.add( s );
        return null;
    }
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

        final Element element = parser.endElementBuilder();
        final String expression =((org.w3c.dom.Text)element.getChildNodes().item( 0 )).getWholeText();

        emptyContentCheck( localName, expression, parser );

        ConnectiveDescr c = (ConnectiveDescr) parser.getParent();
        String s = ( (String) parser.getCurrent()) + expression;

        c.add( s );
        return null;     
    }
View Full Code Here

Examples of org.drools.lang.descr.ConnectiveDescr

                      final ExtensibleXmlParser parser) throws SAXException {       
        final Element element = parser.endElementBuilder();
        final String expression =((org.w3c.dom.Text)element.getChildNodes().item( 0 )).getWholeText();
        emptyContentCheck( localName, expression, parser );
       
        ConnectiveDescr c = (ConnectiveDescr) parser.getParent();
        String s = ( (String) parser.getCurrent()) + "(" + expression + ")";

        c.add( s );
        return null;       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.