1 package com.sri.emo.dbobj.model_tree;
2
3 import com.sri.emo.dbobj.IViewable;
4
5 /***
6 * Interface that extends IViewable to include <tt>Visitor</tt> capabilities.
7 * The scope of it is more restrictive (specialized) than <code>IViewable</code> because
8 * it only considers data nodes, not necessarily other aspects such as
9 * permission groups. If you implement ViewVisitable in a new class, you need
10 * to modify the ViewVisitor interface to accept thew new node type. (Consequence
11 * of visitor pattern).
12 * <p>We are interested in extending IViewable because we wish to gain
13 * access to the Transition that IViewable gives to allow universal editing and
14 * access.</p>
15 *
16 * @author Michael Rimov
17 */
18 public interface ModelVisitable extends IViewable {
19
20
21 /***
22 * Accepts the visitor and redirects the visitor to the appropriate type
23 * we're dealing with.
24 *
25 * @param visitor ViewVisitor
26 * @throws ViewVisitorException if an exception occurs while processing
27 * inside the visitor.
28 * @throws UnsupportedOperationException if the visitor does not
29 * support processing of a particular node.
30 */
31 public void acceptVisitor(ModelVisitor visitor);
32 }