app/src/main/java/com/sap/cloud/mobile/fiori/demo/search/dictionary/DictionaryProvider.java
@NonNull
    private static UriMatcher buildUriMatcher() {
        UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
        // to get definitions...
        matcher.addURI(AUTHORITY, "dictionary", SEARCH_WORDS);
        matcher.addURI(AUTHORITY, "dictionary/#", GET_WORD);
        // to get suggestions...
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH_SUGGEST);

        /* The following are unused in this implementation, but if we include
         * {@link SearchManager#SUGGEST_COLUMN_SHORTCUT_ID} as a column in our suggestions table, we
         * could expect to receive refresh queries when a shortcutted suggestion is displayed in
         * Quick Search Box, in which case, the following Uris would be provided and we
         * would return a cursor with a single item representing the refreshed suggestion data.
         */
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT, REFRESH_SHORTCUT);
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT + "/*", REFRESH_SHORTCUT);
        return matcher;
    }
/**
     * Builds up a UriMatcher for search suggestion and shortcut refresh queries.
     */
Builds up a UriMatcher for search suggestion and shortcut refresh queries.
Builds up a UriMatcher for search suggestion and shortcut refresh queries .
@NonNull
    private static UriMatcher buildUriMatcher() {
        UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
        matcher.addURI(AUTHORITY, "dictionary", SEARCH_WORDS);
        matcher.addURI(AUTHORITY, "dictionary/#", GET_WORD);
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH_SUGGEST);
        /* The following are unused in this implementation, but if we include
         * {@link SearchManager#SUGGEST_COLUMN_SHORTCUT_ID} as a column in our suggestions table, we
         * could expect to receive refresh queries when a shortcutted suggestion is displayed in
         * Quick Search Box, in which case, the following Uris would be provided and we
         * would return a cursor with a single item representing the refreshed suggestion data.
         */
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT, REFRESH_SHORTCUT);
        matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT + "/*", REFRESH_SHORTCUT);
        return matcher;
    }
@ NonNull private static UriMatcher buildUriMatcher ( ) { UriMatcher matcher = new UriMatcher ( UriMatcher . NO_MATCH ) ; matcher . addURI ( AUTHORITY , "dictionary" , SEARCH_WORDS ) ; matcher . addURI ( AUTHORITY , "dictionary/#" , GET_WORD ) ; matcher . addURI ( AUTHORITY , SearchManager . SUGGEST_URI_PATH_QUERY , SEARCH_SUGGEST ) ; matcher . addURI ( AUTHORITY , SearchManager . SUGGEST_URI_PATH_QUERY + "/*" , SEARCH_SUGGEST ) ; /* The following are unused in this implementation, but if we include
         * {@link SearchManager#SUGGEST_COLUMN_SHORTCUT_ID} as a column in our suggestions table, we
         * could expect to receive refresh queries when a shortcutted suggestion is displayed in
         * Quick Search Box, in which case, the following Uris would be provided and we
         * would return a cursor with a single item representing the refreshed suggestion data.
         */ matcher . addURI ( AUTHORITY , SearchManager . SUGGEST_URI_PATH_SHORTCUT , REFRESH_SHORTCUT ) ; matcher . addURI ( AUTHORITY , SearchManager . SUGGEST_URI_PATH_SHORTCUT + "/*" , REFRESH_SHORTCUT ) ; return matcher ; }
Builds up a UriMatcher for search suggestion and shortcut refresh queries.
Builds up a UriMatcher for search suggestion and shortcut refresh queries .
// to get definitions... // to get suggestions...