Ticket #38 (assigned defect)

Opened 7 years ago

Last modified 7 years ago

Enable Index Node to access context infomation

Reported by: D. Schwabe Owned by: anonymous
Priority: high Milestone: 0.5
Component: Metamodel Version: 0.4
Severity: normal Keywords:
Cc: dschwabe@…

Description

An index entry declaration must be able to have access to its container information. For instance, in the Lab Site example, the entry for "Student by Area" index (value of "Students" index attribute) must be able to pass the area as a parameter.

Change History

Changed 7 years ago by dema

  • cc dschwabe@… added
  • owner changed from somebody to anonymous
  • status changed from new to assigned

Daniel, it's not as simple as it sounded. For instance, in the example cited, in order for the student (a node) to have access to the research area id, it must know that it is contained by a index entry, which is contained by a index, which is contained by an attribute, which is finally contained by a node (the research area).

The params expression would have to look something like this:

self.parent.parent.parent.id

I would have to be really careful to set all the "parent" accessors along the way. The more straight-forward alternative would be accessing the parameters values from the containing index directly, like this:

index.params_values

Which is the current way (although this is done "automagically" when it shouldn't). But this is not "semantically" correct, I am just taking advantage that the research area id has been fed as a parameter to the index and not getting a hold to an actual research area object.

Changed 7 years ago by anonymous

  • version set to 0.4
  • component changed from component1 to Metamodel
  • milestone set to 0.5
Note: See TracTickets for help on using tickets.