• No se han encontrado resultados

La producción del sujeto colectivo

In document DE SOUSA SANTOS y ME > (página 95-110)

The binding between the source unit and the destination unit of the link is for- mally represented by a link parameterdefined over the link, and by a parametric se- lector,defined in the destination unit.

A link parameter is a value associated with a link between units, which is transported, as an effect of the link navigation, from the source unit to the desti- nation unit. A link may be associated with as many link parameters as required by the destination unit. A parametric selector is a unit selector whose condition mentions one or more parameters. An example of these concepts is visible in Fig- ure 3.13, where the link includes a parameter (CurrArtist) representing the object identifier of the artist selected from the index, and the data unit has a selector [OID=CurrArtist], which uses the CurrArtist parameter to retrieve and display the details of the appropriate artist.

From a syntactic standpoint, a link parameter has a name and a label, sep- arated by a semicolon. The name is a user-defined string (CurrArtist in Figure 3.13), which can be used to refer to the parameter in the selector of the destina- tion unit. The label denotes the content of the parameter, which is either an at- tribute or a field of the source unit of the link; when the label refers to an

94 Chapter Three: Hypertext Model

Artist Artists AllArtists Artist Artist [OID=CurrArtist] ArtistDetails CurrArtist:OID Artists ARTISTS INDEX • Andrea Bocelli * Celine Dion • Frank Sinatra • The Beatles Artist ARTIST FirstName: Celine LastName: Dion Photo:

attribute, it consists of the concatenation of the entity and attribute names, sep- arated by a dot. The entity name can be omitted, if clear from the context, like the label OID in Figure 3.13, which stands for Artist.OID. The output values pro- duced by the various source units and the labels of the corresponding link para- meters are summarized in Table 3.1.

The link parameter specification can be added both to the graphical and tex- tual specification. The textual specification of the link graphically shown in Fig- ure 3.13 is reported below:

link ToArtistsDetails

(from AllArtists to ArtistDetails; parameters CurrArtist:OID)

Figure 3.14 shows an intra-page contextual link.Now, the index unit and the data unit are placed in the same page and connected by a contextual link. This link

3.4 Links 95

Table 3.1 Link parameters provided in output by content units.

Source unit Data unit Multidata unit Index unit Hierarchical index unit Multi-choice index unit Scroller unit Entry unit

Link parameters (for outgoing links)

Any attribute (including the OID) of the object displayed by the unit

The set of values of any attribute (including the OID) of the objects displayed by the unit The value of any attribute (including the OID) of the object selected by the user clicking on an anchor of the index unit

The value of any attribute (including the OID) of the object selected by the user clicking on an anchor in the unit. All the objects displayed at all the levels of the hierarchy can be selected The set of values of any attribute (including the OID) of the multiple objects selected using the check boxes of the unit

The set of values of any attribute (including the OID) of the block of objects selected by clicking on an anchor in the unit

The value input by the user in each field

Labels of link parameters

SourceEntity.attributeName {SourceEntity.attributName} SourceEntity.attributeName SourceEntity.attributeName {SourceEntity.attributName} {SourceEntity.attributName} fieldName

permits the user to select one object and redisplay the same page, with different content corresponding to the details of the newly selected instance. Also in this case, the link enables the passage of context information from the index unit to the data unit, and the binding between such units is represented by the CurrArtist link parameter and by the parametric selector of the data unit [OID=CurrArtist], which uses such a parameter.

The case of intra-page non-contextuallinks is also possible, although less fre- quently used, for connecting two alternative nested sub-pages of the same page. Nested sub-pages are treated in Section 3.6.3.

A link parameter can be single-valued,as the CurrArtist parameter in Figure 3.13 and Figure 3.14, which stores the OID of the single instance selected from an index unit, or set-valued;for example it may hold the set of OIDs of the objects selected from a multi-choice index unit.

Syntactically, set-valued link parameters are distinguished by enclosing their label in curly brackets, as shown in Table 3.1. Figure 3.15 gives an example of a set-valued link parameter: the ArtistMultichoice index unit allows the selec- tion of a set of artists, whose details are displayed by the ArtistsMultidata unit. The passage of parameters from the source to the destination unit is denoted by the set-valued parameter SelArtists: {OID} associated with the link, which is used by the selector condition of the destination unit [OID IN SelArtists] for testing that the OIDs of the objects to display in the multidata unit belong to the set of OIDs denoted by parameter SelArtists.

The textual definition of the link graphically shown in Figure 3.15 is:

link ToArtistsDetails

(from ArtistMultichoice to ArtistsMultidata; parameters SelArtists:{OID})

Units may have multiple outgoing links, possibly associated with different parameters. Figure 3.16 shows a hierarchical index unit (ArtsitIndex), in which

96 Chapter Three: Hypertext Model

Artists AllArtists Artist Artist [OID=CurrArtist] ArtistDetails CurrArtist:OID Artists ARTISTS INDEX • Andrea Bocelli * Celine Dion • Frank Sinatra • The Beatles ARTIST FirstName: Celine LastName: Dion Photo:

Figure 3.14 Intra-page contextual link with associated link parameter.

TEAM

FLY

the top level of the hierarchy displays the instances of the Artist entity, and the second level of the hierarchy lists the albums connected to each artist by the re- lationship role ArtistToAlbum. Two links connect the hierarchical index unit and two data units placed in distinct pages: the link pointing to the ArtistDetails data unit is associated with a link parameter of type Artist.OID, which holds the OID of an artist selected from the top level of the hierarchy; the link pointing to the AlbumDetails data unit is associated with a link parameter of type Album.OID, which holds the OID of an album selected from the second level of the hierarchy. When the user selects an artist or an album, the appropriate page is displayed.

As Table 3.1 clearly indicates, multidata units, index units, hierarchical index units, and multi-choice index units differ in the meaning of the link parameter

3.4 Links 97 Artists ArtistsMultidata Artist [OID IN SelArtists] SelArtists: {OID} ArtistMultichoice Artist Artists SELECTED ARTISTS Celine Dion Jon Bon Jovi The Beatles Frank Sinatra ARTISTS SELECTION The Beatles Sting Frank Sinatra OK Jon Bon Jovi Celine Dion

Figure 3.15 Multi-choice index and set-valued link parameter.

Artists&Albums Artist Album Artist [OID=Art] ArtistDetails Album [OID=Alb] AlbumDetails Art:Artist.OID Alb:Album.OID ArtistsIndex Artist NEST Album [ArtistToAlbum] Album ALBUM

Title: All the way

Year: 1999 Cover: Artists&Albums ARTISTS Andrea Bocelli Celine Dion Frank Sinatra The Beatles Sogno Per amore Bocelli All the way Hits of ... Romance Best of Voice Oldies In the beginning Artist ARTIST FirstName: Celine LastName: Dion Photo: Selection of an artist Selection of an album

associated with their outgoing link: for index units and hierarchical index units, the outgoing link permits the selection of an individual object,for multi-choice index units it permits the selection of a subset of objects,for multidata units it per- mits only the passage of the entire setof visualized objects.

To make hypertext diagrams more readable, the link parameter specification can be omitted, when the parameters associated with the link are deducible from the context. To help this simplification, for each unit a default output parameter is defined, so that, when a link is associated with the default output of its source unit, the link parameter specification can be omitted without loss of informa- tion. Table 3.2 summarizes the default output of units.

A similar simplification can be done also for selector conditions. Table 3.3 shows the default selectors of units with incoming links; when a unit has an in- coming link and no selector, the default selector specified in Table 3.3 is implic- itly assumed.

As a consequence of these defaults, the graphic specification of the page in Figure 3.14 can be simplified as shown in Figure 3.17.

Thanks to the default output parameter of index units and to the default se- lector of data units, the diagram in Figure 3.17 is equivalent to that in Figure 3.14: its intuitive meaning is that the index unit supplies the OID of the selected artist to the data unit.

98 Chapter Three: Hypertext Model

Table 3.2 Default link parameters of units.

Source unit

Data unit Multidata unit Index unit

Hierarchical index unit

Multi-choice index unit Scroller unit

Default link parameters of outgoing links

The OID of the object displayed by the unit The set OIDs of the objects displayed by the unit The OID of the single object selected from the unit

The OID of the single object selected from the unit. If the unit has multiple nested entities, the OID refers to an instance of the entity at the top of the hierarchy.Parameters associated with the objects of entities nested at inner levels must be specified explicitly

The set of OIDs of the multiple objects selected from the unit The set of OIDs of the selected block of objects, or a single OID if the block factor is 1

Another example of the use of defaults is shown in Figure 3.18, which il- lustrates a WebML diagram equivalent to the one of Figure 3.15. In this case, de- faults spare the explicit mention of the set-valued link parameter (SelArtists) and of the default selector condition of the multidata unit [OID IN SelArtists]. In the rest of the book, we will omit the specification of parameters and selector condi- tions that can be inferred by the defaults, unless the need arises for emphasizing their presence.

Link parameters are also used for transmitting the values input into an entry unit. Figure 3.19 shows an example of link having the value of a field as a para- meter. The KeyWordEntry unit includes a single field called TitleKeyword, not shown in the graphic notation, for inputting a keyword. The value of such a field is assigned as a parameter, called Keyword, to the outgoing link of the entry unit,

3.4 Links 99

Table 3.3 Default selector conditions of units, when an input link is specified but no selector.

Destination unit

Data unit

Multidata, index, multi-choice index, scroller unit

Hierarchical index unit

Default selector condition when an input link is specified and no explicit selector is mentioned

OID = <link parameter of type OID of the input link> OID IN <link parameter of the type {OID} of the input link>

The default selector is defined only for the entity at the top of the hierarchy and is: OID IN <link parameter of the type {OID} of the input link>

Artist

AllArtists

Artist Artist

ArtistDetails

and is used in the selector condition of the multidata unit, to display only those albums whose title contains the keyword provided by the user.

The textual syntax for the entry unit and its outgoing link is the following:

EntryUnit KeyWordEntry (fields TitleKeyword String) link EntryToMultidata

(from KeyWordEntry to AlbumMultidata; parameters Keyword:TitleKeyword)

A very useful application of parametric selectors occurs when one unit must displayall the instances of an entity that are related to some instances of another en- tity.In this case, a selector condition can be specified that retrieves the subset of

100 Chapter Three: Hypertext Model

Artists

ArtistsMultidata

Artist

ArtistMultichoice

Artist

Figure 3.18 Example of use of a default link parameters and selectors.

SearchAlbums

KeyWordEntry AlbumsMultidata

Album [Title contains Keyword]

In document DE SOUSA SANTOS y ME > (página 95-110)