public final String uriFilter( String line )
    {
        for ( int i = 0; i < VALID_URI_SCHEMES.length; ++i )
        {
            String scheme = VALID_URI_SCHEMES[i];

            int index = line.indexOf( scheme );

            if ( index != -1 )
            {
                int start = index;
                int end = -1;

                for ( int j = start; j < line.length(); ++j )
                {
                    char current = line.charAt( j );

                    if ( !Character.isLetterOrDigit( current ) && isInvalidURICharacter( current ) )
                    {
                        end = j;
                        break;
                    }

                    end = j;
                }

                //now you should have the full URI so you can replace this
                //in the current buffer

                if ( end != -1 )
                {
                    String uri = line.substring( start, end );

                    line = StringUtils.replace( line, uri,
                                                "<a href=\"" + uri + "\" target=\"alexandria_uri\">" + uri + "</a>" );
                }
            }
        }

        //if we are in a multiline comment we should not call JXR here.
        if ( !inMultiLineComment && !inJavadocComment )
        {
            return jxrFilter( line );
        }

        return line;
    }