use of android.content.UriMatcher in project mechanoid by robotoworks.
the class AbstractGithubDBContentProvider method createUriMatcher.
@Override
protected UriMatcher createUriMatcher() {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
final String authority = GithubDBContract.CONTENT_AUTHORITY;
matcher.addURI(authority, "issues", ISSUES);
matcher.addURI(authority, "issues/#", ISSUES_ID);
// User Actions
return matcher;
}
use of android.content.UriMatcher in project QuantumFlux by himanshu-soni.
the class UriMatcherHelper method init.
public void init(Context context, TableDetailsCache detailsCache) {
mUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
int matcherInterval = MATCHER_CODE_INTERVALS;
for (Class<?> dataModelObject : ReflectionHelper.getDomainClasses(context, ReflectionHelper.TableType.TABLE)) {
TableDetails tableDetails = detailsCache.findTableDetails(context, dataModelObject);
mMatcherCodes.put(matcherInterval, tableDetails);
mUriMatcher.addURI(mAuthority, tableDetails.getTableName(), matcherInterval + MATCHER_ALL);
mUriMatcher.addURI(mAuthority, tableDetails.getTableName() + "/*", matcherInterval + MATCHER_SINGLE);
matcherInterval += MATCHER_CODE_INTERVALS;
}
}
use of android.content.UriMatcher in project BeyondUPnP by kevinshine.
the class SystemProvider method buildUriMatcher.
/**
* Build and return a {@link UriMatcher} that catches all {@link Uri}
* variations supported by this {@link ContentProvider}.
*/
private static UriMatcher buildUriMatcher() {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
final String authority = BeyondUpnpContract.CONTENT_AUTHORITY;
matcher.addURI(authority, "playlist_item", PLAYLIST_ITEM);
matcher.addURI(authority, "playlist_item/*", PLAYLIST_ITEM_ID);
return matcher;
}
use of android.content.UriMatcher in project SeriesGuide by UweTrottmann.
the class SeriesGuideProvider method buildUriMatcher.
/**
* Build and return a {@link UriMatcher} that catches all {@link Uri} variations supported by
* this {@link ContentProvider}.
*/
private static UriMatcher buildUriMatcher() {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
final String authority = SgApp.CONTENT_AUTHORITY;
// Shows
matcher.addURI(authority, SeriesGuideContract.PATH_SHOWS, SHOWS);
matcher.addURI(authority, SeriesGuideContract.PATH_SHOWS + "/" + SeriesGuideContract.PATH_FILTER + "/*", SHOWS_FILTERED);
matcher.addURI(authority, SeriesGuideContract.PATH_SHOWS + "/" + SeriesGuideContract.PATH_WITH_LAST_EPISODE, SHOWS_WITH_LAST_EPISODE);
matcher.addURI(authority, SeriesGuideContract.PATH_SHOWS + "/" + SeriesGuideContract.PATH_WITH_NEXT_EPISODE, SHOWS_WITH_NEXT_EPISODE);
matcher.addURI(authority, SeriesGuideContract.PATH_SHOWS + "/*", SHOWS_ID);
// Episodes
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES, EPISODES);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/" + SeriesGuideContract.PATH_OFSEASON + "/" + SeriesGuideContract.PATH_WITHSHOW + "/*", EPISODES_OFSEASON_WITHSHOW);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/" + SeriesGuideContract.PATH_OFSEASON + "/*", EPISODES_OFSEASON);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/" + SeriesGuideContract.PATH_OFSHOW + "/*", EPISODES_OFSHOW);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/" + SeriesGuideContract.PATH_WITHSHOW, EPISODES_WITHSHOW);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/" + SeriesGuideContract.PATH_WITHSHOW + "/*", EPISODES_ID_WITHSHOW);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODES + "/*", EPISODES_ID);
// Seasons
matcher.addURI(authority, SeriesGuideContract.PATH_SEASONS, SEASONS);
matcher.addURI(authority, SeriesGuideContract.PATH_SEASONS + "/" + SeriesGuideContract.PATH_OFSHOW + "/*", SEASONS_OFSHOW);
matcher.addURI(authority, SeriesGuideContract.PATH_SEASONS + "/*", SEASONS_ID);
// Lists
matcher.addURI(authority, SeriesGuideContract.PATH_LISTS, LISTS);
matcher.addURI(authority, SeriesGuideContract.PATH_LISTS + "/" + SeriesGuideContract.PATH_WITH_LIST_ITEM_ID + "/*", LISTS_WITH_LIST_ITEM_ID);
matcher.addURI(authority, SeriesGuideContract.PATH_LISTS + "/*", LISTS_ID);
// List items
matcher.addURI(authority, SeriesGuideContract.PATH_LIST_ITEMS, LIST_ITEMS);
matcher.addURI(authority, SeriesGuideContract.PATH_LIST_ITEMS + "/" + SeriesGuideContract.PATH_WITH_DETAILS, LIST_ITEMS_WITH_DETAILS);
matcher.addURI(authority, SeriesGuideContract.PATH_LIST_ITEMS + "/*", LIST_ITEMS_ID);
// Movies
matcher.addURI(authority, SeriesGuideContract.PATH_MOVIES, MOVIES);
matcher.addURI(authority, SeriesGuideContract.PATH_MOVIES + "/*", MOVIES_ID);
// Activity
matcher.addURI(authority, SeriesGuideContract.PATH_ACTIVITY, ACTIVITY);
// Search
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODESEARCH + "/" + SeriesGuideContract.PATH_SEARCH, EPISODESEARCH);
matcher.addURI(authority, SeriesGuideContract.PATH_EPISODESEARCH + "/*", EPISODESEARCH_ID);
// Suggestions
matcher.addURI(authority, SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
matcher.addURI(authority, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH_SUGGEST);
// Ops
matcher.addURI(authority, SeriesGuideContract.PATH_RENEWFTSTABLE, RENEW_FTSTABLE);
return matcher;
}
use of android.content.UriMatcher in project android-ui-design-pattern by MathieuCalba.
the class YANAProvider method buildUriMatcher.
protected static UriMatcher buildUriMatcher(final String authority) {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
if (BuildConfig.DEBUG) {
Log.d(TAG, "authority=[" + authority + "]");
}
/* ARTICLES */
matcher.addURI(authority, YANAContract.PATH_ARTICLE + SEPARATOR + YANAContract.PATH_FEED + NUMBER + SEPARATOR + YANAContract.PATH_CATEGORY + NUMBER, ARTICLE_BY_FEED_ID_AND_CATEGORY_ID);
matcher.addURI(authority, YANAContract.PATH_ARTICLE + SEPARATOR + YANAContract.PATH_CATEGORY + NUMBER, ARTICLE_BY_CATEGORY_ID);
matcher.addURI(authority, YANAContract.PATH_ARTICLE + SEPARATOR + YANAContract.PATH_FEED + NUMBER, ARTICLE_BY_FEED_ID);
matcher.addURI(authority, YANAContract.PATH_ARTICLE + NUMBER, ARTICLE_ID);
matcher.addURI(authority, YANAContract.PATH_ARTICLE, ARTICLE);
/* FEEDS */
matcher.addURI(authority, YANAContract.PATH_FEED + NUMBER, FEED_ID);
matcher.addURI(authority, YANAContract.PATH_FEED, FEED);
/* CATEGORIES */
matcher.addURI(authority, YANAContract.PATH_CATEGORY + NUMBER, CATEGORY_ID);
matcher.addURI(authority, YANAContract.PATH_CATEGORY, CATEGORY);
return matcher;
}
Aggregations