public UriParseResult(final Uri uri) {
			//uri formats:
			//content://[authority]  for general queries
			//content://[authority]/[tables] for table specific queries
			//content://[authority]/[table]/[id] for entity specific queries

			//check if authority matches
			if (!authority.equals(uri.getEncodedAuthority())) {
				throw new IllegalArgumentException("Expected authority: '" +
			        authority + "' got '" + uri.getEncodedAuthority() + "'.");
			}
			//parse path
			final List<String> pathSegments = uri.getPathSegments();
			//we need at least the database
			/*if (pathSegments == null || pathSegments.isEmpty()) {
				throw new IllegalArgumentException(
						"No db part int uri: '" + uri.toString() + "'.");
			}*/
			//we can only have up to three path arguments ([db_name]/[table]/[id])
			if (pathSegments.size() > 2) {
				throw new IllegalArgumentException("Uri path to long: '" + uri);
			}

			//little bobby tables, we call him.
			tables = !pathSegments.isEmpty() ? pathSegments.get(0) : "";

			//we have an id elements, make sure it is a valid long
			if (pathSegments.size() == 2) {
				try {
					id = Long.parseLong(pathSegments.get(1));
				} catch (final Exception e) {
					throw new IllegalArgumentException(
							"Not a valid id: " + pathSegments.get(1), e);
				}
			} else {
				id = null;
			}
		}