Package eu.ha3.matmos.expansions.agents

Source Code of eu.ha3.matmos.expansions.agents.RawJasonLoadingAgent

package eu.ha3.matmos.expansions.agents;

import eu.ha3.matmos.engine.core.implem.Knowledge;
import eu.ha3.matmos.expansions.ExpansionIdentity;
import eu.ha3.matmos.tools.JasonExpansions_Engine1Deserializer2000;

/*
--filenotes-placeholder
*/

public class RawJasonLoadingAgent implements LoadingAgent
{
  private final String jasonString;
 
  public RawJasonLoadingAgent(String jasonString)
  {
    this.jasonString = jasonString;
  }
 
  @Override
  public boolean load(ExpansionIdentity identity, Knowledge knowledge)
  {
    try
    {
      return new JasonExpansions_Engine1Deserializer2000().loadJson(this.jasonString, identity, knowledge);
    }
    catch (Exception e)
    {
      e.printStackTrace();
      return false;
    }
  }
 
}
TOP

Related Classes of eu.ha3.matmos.expansions.agents.RawJasonLoadingAgent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.