Examples of AndNode


Examples of anvil.script.expression.AndNode

      }
      jj_consume_token(BOOLEAN_AND);
      EqualityExpression();
      Node right = pop();
      Node left = pop();
      push(new AndNode(left, right));
    }
  }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode


    private byte[] findClassInDIT( List<Dn> searchContexts, String name ) throws ClassNotFoundException
    {
        // Set up the search filter
        BranchNode filter = new AndNode();
        AttributeType fqjcnAt = directoryService.getSchemaManager().getAttributeType( "fullyQualifiedJavaClassName" );
        filter.addNode( new EqualityNode<String>( fqjcnAt, new StringValue( name ) ) );
        filter.addNode( new EqualityNode<String>( OBJECT_CLASS_AT,
            new StringValue( ApacheSchemaConstants.JAVA_CLASS_OC ) ) );

        try
        {
            for ( Dn base : searchContexts )
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode

        }
        else
        {
            if ( isRefreshPresent )
            {
                filter = new AndNode();
            }
            else
            {
                filter = new OrNode();
            }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode

        replicaLog.setRefreshNPersist( refreshNPersist );
        StringValue contexCsnValue = new StringValue( contextCsn );

        // modify the filter to include the context Csn
        GreaterEqNode csnGeNode = new GreaterEqNode( CSN_AT, contexCsnValue );
        ExprNode postInitContentFilter = new AndNode( modifiedFilter, csnGeNode );
        request.setFilter( postInitContentFilter );

        // now we process entries forever as they change
        // irrespective of the sync mode set the 'isRealtimePush' to false initially so that we can
        // store the modifications in the queue and later if it is a persist mode
        PROVIDER_LOG.debug( "Starting the replicaLog {}", replicaLog );

        // we push this queue's content and switch to realtime mode
        SyncReplSearchListener replicationListener = new SyncReplSearchListener( session, request, replicaLog, false );
        replicaLog.setPersistentListener( replicationListener );

        // compose notification criteria and add the listener to the event
        // service using that notification criteria to determine which events
        // are to be delivered to the persistent search issuing client
        NotificationCriteria criteria = new NotificationCriteria();
        criteria.setAliasDerefMode( request.getDerefAliases() );
        criteria.setBase( request.getBase() );
        criteria.setFilter( request.getFilter() );
        criteria.setScope( request.getScope() );
        criteria.setEventMask( EventType.ALL_EVENT_TYPES_MASK );

        replicaLog.setSearchCriteria( criteria );

        dirService.getEventService().addListener( replicationListener, criteria );

        // then start pushing initial content
        LessEqNode csnNode = new LessEqNode( CSN_AT, contexCsnValue );

        // modify the filter to include the context Csn
        ExprNode initialContentFilter = new AndNode( modifiedFilter, csnNode );
        request.setFilter( initialContentFilter );

        // Now, do a search to get all the entries
        SearchResultDone searchDoneResp = doSimpleSearch( session, request, replicaLog );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode

     * Remove the (ObjectClass=*) node from an AndNode, if we have one.
     */
    private ExprNode handleAndNode( ExprNode node )
    {
        int nbNodes = 0;
        AndNode newAndNode = new AndNode();

        for ( ExprNode child : ( ( BranchNode ) node ).getChildren() )
        {
            ExprNode modifiedNode = removeObjectClass( child );

            if ( !( modifiedNode instanceof ObjectClassNode ) )
            {
                newAndNode.addNode( modifiedNode );
                nbNodes++;
            }

            if ( modifiedNode instanceof UndefinedNode )
            {
                // We can just return an Undefined node as nothing will get selected
                return UndefinedNode.UNDEFINED_NODE;
            }
        }

        switch ( nbNodes )
        {
            case 0:
                // Unlikely... But (&(ObjectClass=*)) or (|(ObjectClass=*)) are still an option
                return ObjectClassNode.OBJECT_CLASS_NODE;

            case 1:
                // We can safely remove the AND/OR node and replace it with its first child
                return newAndNode.getFirstChild();

            default:
                return newAndNode;
        }
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode

        }
        else
        {
            if ( isRefreshPresent )
            {
                filter = new AndNode();
            }
            else
            {
                filter = new OrNode();
            }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.AndNode

        {
            root = new ScopeNode( aliasDerefMode, effectiveBase, effectiveBaseId, scope );
        }
        else
        {
            root = new AndNode();
            ( ( AndNode ) root ).getChildren().add( filter );
            ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase, effectiveBaseId, scope );
            ( ( AndNode ) root ).getChildren().add( node );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.filter.AndNode

    /* (non-Javadoc)
     * @see org.apache.directory.server.core.schema.SchemaPartitionDao#hasMatchingRule(java.lang.String)
     */
    public boolean hasMatchingRule( String oid ) throws Exception
    {
        BranchNode filter = new AndNode();
        filter.addNode( new EqualityNode<String>( OBJECTCLASS_OID, new ClientStringValue(
            MetaSchemaConstants.META_MATCHING_RULE_OC ) ) );

        if ( NUMERIC_OID_CHECKER.isValidSyntax( oid ) )
        {
            filter.addNode( new EqualityNode<String>( M_OID_OID, new ClientStringValue( oid ) ) );
        }
        else
        {
            filter.addNode( new EqualityNode<String>( M_NAME_OID, new ClientStringValue( oid.toLowerCase() ) ) );
        }

        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        EntryFilteringCursor cursor = null;
View Full Code Here

Examples of org.apache.directory.shared.ldap.filter.AndNode

    /* (non-Javadoc)
     * @see org.apache.directory.server.core.schema.SchemaPartitionDao#hasAttributeType(java.lang.String)
     */
    public boolean hasAttributeType( String oid ) throws Exception
    {
        BranchNode filter = new AndNode();
        filter.addNode( new EqualityNode<String>( OBJECTCLASS_OID, new ClientStringValue(
            MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC ) ) );

        if ( NUMERIC_OID_CHECKER.isValidSyntax( oid ) )
        {
            filter.addNode( new EqualityNode<String>( M_OID_OID, new ClientStringValue( oid ) ) );
        }
        else
        {
            filter.addNode( new EqualityNode<String>( M_NAME_OID, new ClientStringValue( oid.toLowerCase() ) ) );
        }

        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        EntryFilteringCursor cursor = null;
View Full Code Here

Examples of org.apache.directory.shared.ldap.filter.AndNode

    /* (non-Javadoc)
     * @see org.apache.directory.server.core.schema.SchemaPartitionDao#hasObjectClass(java.lang.String)
     */
    public boolean hasObjectClass( String oid ) throws Exception
    {
        BranchNode filter = new AndNode();
        filter.addNode( new EqualityNode<String>( OBJECTCLASS_OID,
            new ClientStringValue( MetaSchemaConstants.META_OBJECT_CLASS_OC ) ) );

        if ( NUMERIC_OID_CHECKER.isValidSyntax( oid ) )
        {
            filter.addNode( new EqualityNode<String>( M_OID_OID, new ClientStringValue( oid ) ) );
        }
        else
        {
            filter.addNode( new EqualityNode<String>( M_NAME_OID, new ClientStringValue( oid.toLowerCase() ) ) );
        }

        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        EntryFilteringCursor cursor = 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.