1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package org.utgenome.gwt.utgb.client.track.operation;
26
27 import org.utgenome.gwt.utgb.client.track.Track;
28 import org.utgenome.gwt.utgb.client.track.lib.old.OldUTGBOperationParser;
29
30 import com.google.gwt.user.client.ui.AbsolutePanel;
31 import com.google.gwt.xml.client.Document;
32 import com.google.gwt.xml.client.Node;
33 import com.google.gwt.xml.client.XMLParser;
34
35
36
37
38
39
40
41 public abstract class OperationParser {
42 private static OperationParser _parser = new OldUTGBOperationParser();
43
44 public static OperationParser getParser() {
45 return _parser;
46 }
47
48 public final void parse(final String operationXMLStr, final AbsolutePanel panel, final Track track) {
49 final Document document = XMLParser.parse(operationXMLStr);
50
51 parse(document, panel, track);
52 }
53
54 public abstract void parse(final Document document, final AbsolutePanel panel, final Track track);
55
56 protected abstract EventImpl parseEventNode(final Node eventNode);
57
58 public abstract Operation parseOperationNode(final Node operationNode, final Track track);
59
60 protected abstract MenuOperationItem parseMenuItemNode(final Node menuItemNode, final Track track);
61
62 protected abstract FrameCommand parseCommandNode(final Node commandNode, final Track track);
63
64 }