- URI is a string of characters that identifies a resource.
- also URI is a refrence that points to the actuall data/resource.
(anything between square the brackets is optional).
-so URI can be broken down into 5 parts given below.
- Scheme = scheme describe what type of resource we are pointing to (eg mailto ,geo,https).
- authority= authority is the part where we describe user name,password and host.
- path= path is further navigation to resource eg (/courses/ud851/lessons..)
- query= query is used to filter the resource.
- fragment= fragment contains data used by path of query.
- Scheme = Not Optional
- authority = Optional
- path = Not Optional
- query = Optional
- fragment = Optional
- if authority is present than path should be preceded by "/" ,otherwise its optional.
- Authority has 3 parts
- UserName and password = Optional
- host = Not optional
- port= Optional
- "//" in start = Not Optional
- userName =Not optional
- password=Not optional
- "UserName and Password" ends with "@" character.
- port = Not Optional
- ":" in start = Not Optional
- query = Not Optional
- "?" in start = Not Optional
- fragment = Not Optional
- "#" in start = Not Optional
- Content URI , has scheme content ,A content URI is a URI that identifies data in a provider .
- formal format
-
geo URI
-
formal formate
-
geo URI has scheme geo:
-
in above URI example geo is scheme ,geo scheme describes that the resource/data type to which this URI points is a physical location.
-
in above example scheme geo: is followed by path 0,0 . 0,0 is latitude and longitude .its 0,0 because according to rules if
-
we decribe a string address than lat and long should be 0,0.
-
their is not authority in above example because we don't need it also authority is optional.
-
lets find out
-
general URI format
-
content URI format
-
content URI exampe
-
geo URI format
-
geo URI example
-
so content URI has scheme ,content authority , path so its legitmate as we know scheme and path are must and it has both.
-
and geo URI is also legitmate as it has scheme geo, path, query and as we know scheme and path are must and it has both.
For content provider we only need to worry about Content URI ,as it is used to get data from content provider.