String mapPath = properties.getProperty("map-path");
InputStream in = this.getClass().getClassLoader().getResourceAsStream(mapPath);
if(in == null) {
throw new JasenException("Error locating token map in " + mapPath + ". Is this path in the classpath?");
}
// Load the token map...
String strMapStoreClass = properties.getProperty("map-store-class");
JasenMapStore store = null;
if(strMapStoreClass != null) {
try
{
store = (JasenMapStore)Class.forName(strMapStoreClass).newInstance();
}
catch (InstantiationException e)
{
throw new JasenException(e);
}
catch (IllegalAccessException e)
{
throw new JasenException(e);
}
catch (ClassNotFoundException e)
{
throw new JasenException(e);
}
}
else
{
store = new DiskMapStore();