25.10.2014 Views

Thesis full text (PDF) - Politecnico di Milano

Thesis full text (PDF) - Politecnico di Milano

Thesis full text (PDF) - Politecnico di Milano

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

them by invoking respectively the create, set, getClasses, and destroy methods. In case a<br />

selection con<strong>di</strong>tion is multi-valued, another parameter value in<strong>di</strong>cates if the con<strong>di</strong>tion for a<br />

retrieved element should be satisfied for every input value or for at least one. Both conjunctive<br />

and <strong>di</strong>sjunctive expressions are allowed.<br />

u:User<br />

><br />

c:ClassComponent<br />

query([["Jackie Brown"], ["Horror Parody"])<br />

set("Jackie Brown")<br />

:ClassOfInstance<br />

c1 = getClasses()<br />

destroy()<br />

set("Horror Parody")<br />

:ClassDisjointOfClass<br />

c2 = getClasses()<br />

destroy()<br />

classes<br />

classes = conjunction(c1, c2)<br />

Figure 3.2: Invocation of the Class Component<br />

To exemplify the behavior of the component, figure 3.2 shows the UML sequence <strong>di</strong>agram<br />

describing the extraction of classes both defining the Jackie Brown object and being <strong>di</strong>sjoint to<br />

the Horror Parody class. The user inserts the values as parameters to the query method through<br />

the user interface. The Class Component object creates a new ClassOfInstance object and<br />

initializes the con<strong>di</strong>tion value invoking the set method with Jackie Brown as parameter value.<br />

Then, it calls the getClasses method to get the classes defining Jackie Brown, and it destroys the<br />

selection con<strong>di</strong>tion object. The Class Component object creates the ClassDisjointOfClass object,<br />

sets the con<strong>di</strong>tion value to Horror Parody, and gets the classes being <strong>di</strong>sjoint to it. Finally, the<br />

object component returns to the user the conjunction of the two result sets.<br />

29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!