View Javadoc

1   package org.util.activemath;
2   
3   import java.util.Hashtable;
4   
5   
6   
7   public class JomeConstants{
8   	
9   	public final static  Hashtable SYMBOLS = getSymbols();  
10  	
11  	private static Hashtable getSymbols(){
12  		Hashtable table = new Hashtable();
13  		table.put("//cup", new Symbol("\u222A", "∪"));
14  		table.put("//cap", new Symbol("\u2229", "∩"));
15  		table.put("//Theta", new Symbol("\u0398", "Θ"));
16  		table.put("//theta", new Symbol("\u03B8", "θ"));
17  		table.put("//alpha", new Symbol("\u03B1", "α"));
18  		table.put("//beta", new Symbol("\u03B2", "β"));
19  		table.put("//gamma",new Symbol("\u03B3", "γ"));
20  		table.put("//delta", new Symbol ("\u03B4", "δ"));
21  		table.put("//epsilon", new Symbol ("\u03B5", "ε"));
22  		table.put("//zeta", new Symbol ("\u03B6", "ζ"));		
23  		table.put("//Gamma", new Symbol ("\u0393", "Γ"));
24  		table.put("//Delta", new Symbol ("\u0394", "Δ"));
25  		table.put("//kappa", new Symbol ("\u03BA", "κ"));
26  		table.put("//lambda", new Symbol ("\u03BB", "λ"));
27  		table.put("//mu", new Symbol ("\u03BC", "μ"));
28  		table.put("//nu", new Symbol ("\u03BD", "ν"));
29  		table.put("//xi", new Symbol ("\u03BE", "ξ"));
30  		table.put("//Xi", new Symbol ("\u039E", "Ξ"));
31  		table.put("//Pi", new Symbol ("\u03A0", "Π"));
32  		table.put("//pi", new Symbol ("\u03C0", "π"));
33  		table.put("//sigma", new Symbol ("\u03C2", "ς"));
34  		table.put("//Sigma", new Symbol ("\u03A3", "Σ"));
35  		table.put("//Phi", new Symbol ("\u03A6", "Φ"));
36  		table.put("//phi", new Symbol ("\u03C6", "φ"));
37  		table.put("//Omega", new Symbol ("\u03A9", "Ω"));
38  		table.put("//omega", new Symbol ("\u03C9", "ω"));
39  		table.put("//emptyset", new Symbol ("\u2205", "∅"));
40  		table.put("//nabla", new Symbol ("\u2207", "∇"));
41  		table.put("//angle", new Symbol ("\u299F", "⦟"));
42  		table.put("//angmsd", new Symbol ("\u2221", "∡"));
43  		table.put("//circ", new Symbol ("\u2218", "∘"));
44  		table.put("//prime", new Symbol ("\u2032", "′"));
45  		
46  		table.put("//forall", new Symbol ("\u2200", "∀"));
47  		table.put("//exist", new Symbol ("\u2203", "∃"));
48  		table.put("//partial", new Symbol ("\u2202", "∂"));
49  		table.put("//infty", new Symbol ("\u221E", "∞"));
50  		table.put("//OverBar", new Symbol ("\u00AF", "¯"));		
51  		table.put("//sum", new Symbol ("\u2211", "∑"));		
52  		table.put("//prod", new Symbol ("\u220F", "∏"));		
53  		table.put("//,", new Symbol (",", ","));
54  		table.put("//{", new Symbol ("{", "{"));		
55  		table.put("//}", new Symbol ("}", "}"));		
56  		table.put("////", new Symbol ("//", "//"));		
57  		table.put("//times", new Symbol ("\u00D7", "×"));
58  		table.put("//prec", new Symbol ("\u227A", "≺"));
59  		table.put("//preceq", new Symbol ("\u227C", "≼"));
60  		table.put("//succ", new Symbol ("\u227B", "≻")); 
61  		table.put("//succeq", new Symbol ("\u227D", "≽"));
62  		table.put("//subseteq", new Symbol ("\u2286", "⊆"));		
63  		table.put("//nsubseteq", new Symbol ("\u2288", "⊈"));
64  		table.put("//subset", new Symbol ("\u2282", "⊂"));		
65  		table.put("//nsubset", new Symbol ("\u2284", "⊄"));
66  		table.put("//leq", new Symbol ("\u2264", "≤"));		
67  		table.put("//geq", new Symbol ("\u2265", "≥"));		
68  		table.put("//neq", new Symbol ("\u2260", "≠"));		
69  		table.put("//sim", new Symbol ("\u223C", "∼"));		
70  		table.put("//equiv", new Symbol ("\u2261", "≡"));
71  		table.put("//not", new Symbol ("\u2310", "⌐"));
72  		table.put("//wedge", new Symbol ("\u2227", "∧"));		
73  		table.put("//vee", new Symbol ("\u2228", "∨"));		
74  		table.put("//Rightarrow", new Symbol ("\u21D2", "⇒"));		
75  		
76  				
77  		
78  		return table; 
79  	}
80  	
81  	public static class Symbol{
82  		private String javaCode;
83  		private String htmlCode;
84  		
85  		public Symbol(String javaCode, String htmlCode){
86  			this.javaCode = javaCode;
87  			this.htmlCode = htmlCode;
88  		}
89  		
90  		public String toString(){
91  			return javaCode;
92  		}
93  		
94  		public String getUniCode(){
95  			return htmlCode;
96  		}
97  		
98  	}
99  }