The ACCESS section of a GPD declares how the concept values are associated with the underlying database, i.e. which ``physical'' database object a ``logical'' concept refers to and where to find it in the database --- the path to the parts of the view. Therefore, for each subpart listed in STRUCTURE section, you declare how to find that part in the database.
In order to make it easier to understand the examples in this section, we now introduce a set of GPD language keywords and some specialized syntax, an understanding of which will help in following the discussion.
In the following section, we will discuss the kinds of access that can be made to database objects and give examples. Please refer to these examples as the discussion progresses.
Keep in mind that each information component is made up of attributes, links and an image. Figure 7.12 shows such an information component.
: Parts of an `information component'
Attributes and links are named using the group name, the field name, and for links, the position. For example, a link might be named by TEXT:Paragraph:1, meaning group TEXT, field Paragraph, position 1 (positions begin at 1). An attribute value might look like TEXT:Title, meaning the TEXT attribute group and Title field under that group. There can only be one attribute of this name in a given information component.
Presently, one can refer to the following database concepts:
For example, the example in figure 7.13 would retrieve all attribute groups and display the attribute group names.
: ACCESS of all attribute groups
Again, ATTR is a keyword.
: ACCESS of specific attribute fields in a group
Given that, look at the GPD in figure 7.17. It is used to view a specific attribute group. Firstly, the topmost concept, `attribute group' is defined as a constant in the ACCESS section. That attribute value (the constant) is used as the access to retrieve the fields in that attribute group. This is because that concept is the parent that will be used for the resolution of the parent VALUE in ATTR ``%VALUE%''. The ``tag'' field is ``same-as-parent'' (the $ sign), which means that it displays the value of the parent, in this case the attribute value CONSTANT:sg&f_group. If you then edit the attribute value in a view using this GPD, the fields in the attribute group that you change it to will then be displayed. Again, applying this GPD to the same object in the two previous figures, you see the initial view in figure 7.18. After then editing SYSTEM and changing it to TEXT (which alters the value of the attribute), we obtain the view in figure 7.19. This is a rather difficult example, so don't be too concerned if you don't understand it when you first begin using the system.
Figure: Initial view of SYSTEM attributes
In the example in figure 7.20, we again see that all attribute groups are retrieved using ATTR. The fields are then retrieved using the value of the parent (the attribute group name) as ATTR ``%VALUE%''. For each field, the value is retrieved using the group name in the parent (``%GROUP%'') and the value of the parent (the field name). Thus, if there is a group SYSTEM with a field Created, the access for the value will be ATTR SYSTEM Created.
This functions in the same way as showing all attribute groups in an object, but rather than the keyword `ATTR', you use the keyword `LINK'.
Again, this is the same as for attribute fields but with the keyword LINK rather than ATTR.
As with the previous two items, this works in a similar fashion as all the fields in an attribute group, but using LINK instead of ATTR.
This is a special case which is seldomly used. Instead of the ACCESS directive `LINK GROUP Name' (which would pick up all the link items in this link group), you use `LINK GROUP Name 1', which specifies that you use the first link item in that link group. No other integer other than 1 is acceptable.
This is available simply so that you can view singular link items even if there are multiple link items in that link group.
This is accessed using the keyword IMAGE. Figure 7.21 shows the `image' GPD, which does this.