1
2
3
4
5
6 package org.apache.maven.usability.plugin;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class ExpressionDocumentation
15 implements java.io.Serializable
16 {
17
18
19
20
21
22
23
24
25 private java.util.List<Expression> expressions;
26
27
28
29
30 private String modelEncoding = "UTF-8";
31
32
33
34
35
36
37
38
39
40
41
42 public void addExpression( Expression expression )
43 {
44 getExpressions().add( expression );
45 }
46
47
48
49
50
51
52 public java.util.List<Expression> getExpressions()
53 {
54 if ( this.expressions == null )
55 {
56 this.expressions = new java.util.ArrayList<Expression>();
57 }
58
59 return this.expressions;
60 }
61
62
63
64
65
66
67 public String getModelEncoding()
68 {
69 return this.modelEncoding;
70 }
71
72
73
74
75
76
77 public void removeExpression( Expression expression )
78 {
79 getExpressions().remove( expression );
80 }
81
82
83
84
85
86
87
88
89 public void setExpressions( java.util.List<Expression> expressions )
90 {
91 this.expressions = expressions;
92 }
93
94
95
96
97
98
99 public void setModelEncoding( String modelEncoding )
100 {
101 this.modelEncoding = modelEncoding;
102 }
103
104 private java.util.Map expressionsBySyntax;
105
106 public java.util.Map getExpressionsBySyntax()
107 {
108 if ( expressionsBySyntax == null )
109 {
110 expressionsBySyntax = new java.util.HashMap();
111
112 java.util.List expressions = getExpressions();
113
114 if ( expressions != null && !expressions.isEmpty() )
115 {
116 for ( java.util.Iterator it = expressions.iterator(); it.hasNext(); )
117 {
118 Expression expr = (Expression) it.next();
119
120 expressionsBySyntax.put( expr.getSyntax(), expr );
121 }
122 }
123 }
124
125 return expressionsBySyntax;
126 }
127
128 public void flushExpressionsBySyntax()
129 {
130 expressionsBySyntax = null;
131 }
132
133 }