com.hfg.xml.parser.SymbolEntities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com_hfg Show documentation
Show all versions of com_hfg Show documentation
com.hfg xml, html, svg, and bioinformatics utility library
package com.hfg.xml.parser;
import com.hfg.util.collection.BiHashMap;
import com.hfg.util.collection.BiMap;
//------------------------------------------------------------------------------
/**
Lookup class for the character entities defined in XHTML1-symbol.ent
@author J. Alex Taylor, hairyfatguy.com
*/
//------------------------------------------------------------------------------
// com.hfg XML/HTML Coding Library
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
// [email protected]
//------------------------------------------------------------------------------
public class SymbolEntities extends AbstractEntities
{
private static SymbolEntities sInstance;
private static BiMap sEntityMap = new BiHashMap<>();
static
{
// Latin Extended-B
sEntityMap.put("fnof", 402);
// Greek
sEntityMap.put("Alpha", 913);
sEntityMap.put("Beta", 914);
sEntityMap.put("Gamma", 915);
sEntityMap.put("Delta", 916);
sEntityMap.put("Epsilon", 917);
sEntityMap.put("Zeta", 918);
sEntityMap.put("Eta", 919);
sEntityMap.put("Theta", 920);
sEntityMap.put("Iota", 921);
sEntityMap.put("Kappa", 922);
sEntityMap.put("Lambda", 923);
sEntityMap.put("Mu", 924);
sEntityMap.put("Nu", 925);
sEntityMap.put("Xi", 926);
sEntityMap.put("Omicron", 927);
sEntityMap.put("Pi", 928);
sEntityMap.put("Rho", 929);
sEntityMap.put("Sigma", 931);
sEntityMap.put("Tau", 932);
sEntityMap.put("Upsilon", 933);
sEntityMap.put("Phi", 934);
sEntityMap.put("Chi", 935);
sEntityMap.put("Psi", 936);
sEntityMap.put("Omega", 937);
sEntityMap.put("alpha", 945);
sEntityMap.put("beta", 946);
sEntityMap.put("gamma", 947);
sEntityMap.put("delta", 948);
sEntityMap.put("epsilon", 949);
sEntityMap.put("zeta", 950);
sEntityMap.put("eta", 951);
sEntityMap.put("theta", 952);
sEntityMap.put("iota", 953);
sEntityMap.put("kappa", 954);
sEntityMap.put("lambda", 955);
sEntityMap.put("mu", 956);
sEntityMap.put("nu", 957);
sEntityMap.put("xi", 958);
sEntityMap.put("omicron", 959);
sEntityMap.put("pi", 960);
sEntityMap.put("rho", 961);
sEntityMap.put("sigmaf", 962);
sEntityMap.put("sigma", 963);
sEntityMap.put("tau", 964);
sEntityMap.put("upsilon", 965);
sEntityMap.put("phi", 966);
sEntityMap.put("chi", 967);
sEntityMap.put("psi", 968);
sEntityMap.put("omega", 969);
sEntityMap.put("thetasym", 977);
sEntityMap.put("upsih", 978);
sEntityMap.put("piv", 982);
// General Punctuation
sEntityMap.put("bull", 8226);
sEntityMap.put("hellip", 8230);
sEntityMap.put("prime", 8242);
sEntityMap.put("Prime", 8243);
sEntityMap.put("oline", 8254);
sEntityMap.put("frasl", 8260);
// Letterlike Symbols
sEntityMap.put("weierp", 8472);
sEntityMap.put("image", 8465);
sEntityMap.put("real", 8476);
sEntityMap.put("trade", 8482);
sEntityMap.put("alefsym", 8501);
// Arrows
sEntityMap.put("larr", 8592);
sEntityMap.put("uarr", 8593);
sEntityMap.put("rarr", 8594);
sEntityMap.put("darr", 8595);
sEntityMap.put("harr", 8596);
sEntityMap.put("crarr", 8629);
sEntityMap.put("lArr", 8656);
sEntityMap.put("uArr", 8657);
sEntityMap.put("rArr", 8658);
sEntityMap.put("dArr", 8659);
sEntityMap.put("hArr", 8660);
// Mathematical Operators
sEntityMap.put("forall", 8704);
sEntityMap.put("part", 8706);
sEntityMap.put("exist", 8707);
sEntityMap.put("empty", 8709);
sEntityMap.put("nabla", 8711);
sEntityMap.put("isin", 8712);
sEntityMap.put("notin", 8713);
sEntityMap.put("ni", 8715);
sEntityMap.put("prod", 8719);
sEntityMap.put("sum", 8721);
sEntityMap.put("minus", 8722);
sEntityMap.put("lowast", 8727);
sEntityMap.put("radic", 8730);
sEntityMap.put("prop", 8733);
sEntityMap.put("infin", 8734);
sEntityMap.put("ang", 8736);
sEntityMap.put("and", 8743);
sEntityMap.put("or", 8744);
sEntityMap.put("cap", 8745);
sEntityMap.put("cup", 8746);
sEntityMap.put("int", 8747);
sEntityMap.put("there4", 8756);
sEntityMap.put("sim", 8764);
sEntityMap.put("cong", 8773);
sEntityMap.put("asymp", 8776);
sEntityMap.put("ne", 8800);
sEntityMap.put("equiv", 8801);
sEntityMap.put("le", 8804);
sEntityMap.put("ge", 8805);
sEntityMap.put("sub", 8834);
sEntityMap.put("sup", 8835);
sEntityMap.put("nsub", 8836);
sEntityMap.put("sube", 8838);
sEntityMap.put("supe", 8839);
sEntityMap.put("oplus", 8853);
sEntityMap.put("otimes", 8855);
sEntityMap.put("perp", 8869);
sEntityMap.put("sdot", 8901);
// Miscellaneous Technical
sEntityMap.put("lceil", 8968);
sEntityMap.put("rceil", 8969);
sEntityMap.put("lfloor", 8970);
sEntityMap.put("rfloor", 8971);
sEntityMap.put("lang", 9001);
sEntityMap.put("rang", 9002);
// Geometric Shapes
sEntityMap.put("loz", 9674);
// Miscellaneous Symbols
sEntityMap.put("spades", 9824);
sEntityMap.put("clubs", 9827);
sEntityMap.put("hearts", 9829);
sEntityMap.put("diams", 9830);
}
//---------------------------------------------------------------------------
private SymbolEntities()
{
}
//---------------------------------------------------------------------------
public static SymbolEntities getInstance()
{
if (null == sInstance)
{
sInstance = new SymbolEntities();
}
return sInstance;
}
//---------------------------------------------------------------------------
protected BiMap getEntityMap()
{
return sEntityMap;
}
}