Using the Location Bar

The Proximity Database Browser location bar uses a URL-like path to provide direct access to any Proximity database entity. The following exercise illustrates how to use the location bar to access the different types of Proximity database entities (objects, links, and attributes). Using the location bar to access containers and subgraphs is described in “Exploring Containers and Subgraphs”. See Appendix A, Proximity Quick Reference for a summary of how to use the location bar.

Exercise 4.3. Using the location bar:

Before beginning, make sure that you are serving the ProxWebKB database using Mserver. Start the Proximity Database Browser if it is not already running.

  1. Click Home to go to the Proximity Database Browser start page.

  2. In the location bar at the top of the Proximity Database Browser, type db:/objects and press Return.

    Proximity reports the total number of objects in the database and lists the IDs for the first 200 objects.

    The leftmost portion of the location bar path (to the left of the colon) can be loosely viewed as a protocol describing the type of information to be displayed. Use db:/ as the path protocol to access the list of objects or the list of links. See “Location Bar Path Syntax” for a complete list of location bar path protocols.

  3. Type db:/objects#2 in the location bar and press Return. Proximity displays the second page of object IDs.

    When Proximity breaks up a list over multiple pages, follow the location bar path with the pound symbol (#) and a page number to display the corresponding page of items.

  4. Enter item:/objects/1 in the location bar. Proximity displays information about object 1.

    Note that the entire path has changed so that it no longer begins with the db: protocol. Use the item: protocol to access individual objects or links.

  5. Enter item:/objects/1!ATTRVALS in the location bar. Proximity displays the attributes and their values for object 1.

    Add !ATTRVALS to the end of the location bar path to display the attribute list for any database entity that has attributes (objects, links, containers, and subgraphs).

  6. Enter db:/ in the location bar. Proximity returns to the Proximity Database Browser start page.

    With the exception of db:/ to indicate the Proximity Database Browser start page, location bar paths do not use a trailing slash (/).

  7. Enter db:/links in the location bar. Proximity displays the list of link IDs.

  8. Enter item:/links/1 in the location bar. Proximity displays information about link 1. Again, the path protocol changes from db:/ to item:/.

  9. Enter item:/links/1!ATTRVALS in the location bar. Proximity displays the attributes and their values for link 1.

    As we saw before, adding !ATTRVALS to the end of the location bar path displays the attribute values for the corresponding database item.

  10. Enter attrdefs:/objects in the location bar. Proximity displays the list of object attributes.

    Use the attrdefs: protocol to display either the list of object attributes or the list of link attributes.

  11. Enter attr:/objects/url in the location bar. Proximity displays the table of values and counts for the url object attribute.

    As we saw with the change from viewing a list of objects to viewing a single object, changing from displaying a list of attributes to displaying a single attribute requires changing the path protocol. Use the attr: protocol to display information on a specific attribute.

    Because the url attribute has over 200 distinct values in the ProxWebKB database, Proximity breaks up the list of values across several pages. Add # and a page number to the end of the location bar path to display the corresponding page of attribute values. For example, to see the second page of values for the url attribute, enter attr:/objects/url#2 in the location bar.

  12. Enter filter:/objects/pagetype/value/'Student' in the location bar. Proximity displays the list of objects filtered by the specified attribute value. The text entered in the location bar states that we only want to see those objects whose pagetype attribute has a value of Student.

    The filter: protocol filters objects and links by the value of an attribute. The syntax of the filter: protocol is:

    filter:/item-type/attribute-name/column-name/attribute-value

    where

    • item-type is either objects or links

    • attribute-name is the name of the attribute to use

    • column-name is the name of the data column for that attribute. Most Proximity attribute data, including the data in ProxWebKB, is one-dimensional and thus requires only a single column. Unless you have specified a different column name when importing data, this column will have the default name value. Column names are shown above the histogram (table of values and counts) for an attribute.

    • attribute-value is the specific value to filter on. Only database items having this value will be displayed. If the attribute is of type str (string), the value must be quoted.