01: /**
02: *
03: */package com.dappit.Dapper.parser;
04:
05: /**
06: * @author Ohad Serfaty
07: *
08: */
09: public class ParserInstruction {
10:
11: public static final int OpenNode = 1;
12: public static final int CloseNode = 2;
13: public static final int WriteAttributeKey = 3;
14: public static final int WriteAttributeValue = 4;
15: public static final int AddText = 5;
16: public static final int AddContent = 6;
17: public static final int CloseLeaf = 7;
18: public static final int AddLeaf = 8;
19: public static final int AddEntity = 9;
20: public static final int AddComment = 10;
21: public static final int SetTitle = 11;
22: public static final int AddProcessingInstruction = 12;
23: public static final int AddDoctypeDecl = 13;
24:
25: /**
26: * @param domOperation
27: * @return
28: */
29: public static String getOperationString(int domOperation) {
30: switch (domOperation) {
31: case OpenNode:
32: return "OpenNode";
33: case CloseNode:
34: return "CloseNode";
35: case WriteAttributeKey:
36: return "WriteAttributeKey";
37: case WriteAttributeValue:
38: return "WriteAttributeValue";
39: case AddText:
40: return "AddText";
41: case AddContent:
42: return "AddContent";
43: case CloseLeaf:
44: return "CloseLeaf";
45: case AddLeaf:
46: return "AddLeaf";
47: case AddEntity:
48: return "AddEntity";
49: case AddComment:
50: return "AddComment";
51: case SetTitle:
52: return "SetTitle";
53: case AddProcessingInstruction:
54: return "AddProcessingInstruction";
55: case AddDoctypeDecl:
56: return "AddDoctypeDecl";
57: }
58:
59: return "N/A";
60: }
61:
62: }
|