TestYAWLEditorjava This is the core JUnit test class that binds all other JUnit

Testyawleditorjava this is the core junit test class

This preview shows page 60 - 63 out of 100 pages.

TestYAWLEditor.java : This is the core JUnit test class that binds all other JUnit test classes for the editor so that they may be executed as a single unit test. Figure 8.3 lists the current Java packages that makes up the core editor code, and briefly describes the nature of the classes to be found in each package. If there is a “key” package of the editor, containing classes that do the core job of graph manipulation, that package is org.yawlfoundation.yawl.editor.net . On a darker note, if there is anywhere in the editor where classes have tended toward implementing the god object anti-pattern , this this is the package for the very worst examples. Another important package is org.yawlfoundation.yawl.editor.specification . This package, however, is focused on managing an entire specification. There is very little code specific to graphing in this package, but the classes here are responsible for saving and loading a specification, and managing specification-wide events. In later sections, key classes from both packages will be described in much more detail. 8.2.3 Extensions to JGraph With a basic understanding of how JGraph works from section 8.2.1, we now describe how the basic framework of JGraph has been extended to implement the YAWLEditor. This section describes passive elements in Page 60 of 100
Image of page 60
Figure 8.3: The Java package hierarchy of the editor section 8.2.3 and active elements in section 8.2.3 depending on whether they need further processing, or are responsible for the processing, respectively. Page 61 of 100
Image of page 61
Passive Graphing Elements Figure 8.4 is a class diagram showing how the graphing model constructs of JGraph (see figure 8.1) have been extended to implement the YAWLEditor graphing model. These constructs reside in the package org.yawlfoundation.yawl.editor.elements.model . The package is passive in the sense that it’s not enough to just change attributes on objects in the package and have the change work. The changes must be processed through an active component, described later. org.yawlfoundation.yawl.editor.elements.model org.jgraph.graph V e r t e x C o n t a i n e r V e r t e x L a b e l 0..1 1 D e f a u l t G r a p h C e l l <<Interface>> Y A W L C e l l Y A W L V e r t e x Y A W L F l o w R e l a t i o n D e f a u l t E d g e Y A W L P o r t DefaultPort D e c o r a t o r P o r t Y A W L C o n d i t i o n I n p u t C o n d i t i o n C o n d i t i o n O u t p u t C o n d i t i o n D e c o r a t o r SplitDecorator J o i n D e c o r a t o r 1 0..1 0..1 1 5 1 0..1 Y A W L T a s k C o m p o s i t e T a s k A t o m i c T a s k M u l t i p l e A t o m i c T a s k M u l t i p l e C o m p o s i t e T a s k <<Interface>> Y A W L C o m p o s i t e T a s k <<Interface>> Y A W L M u l t i p l e I n s t a n c e T a s k 3..4 1 <<Interface>> P o r t <<Interface>> E d g e <<Interface>> G r a p h C e l l Figure 8.4: A class diagram of the graph model of the YAWLEditor A few features of figure 8.4 need discussion. We can see from the class diagram that a number of classes inherit from DefaultGraphCell . The most important of these from a design perspective is
Image of page 62
Image of page 63

You've reached the end of your free preview.

Want to read all 100 pages?

  • Spring '17
  • Sui
  • yawl

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes