Package edu.isi.karma.metadata

Source Code of edu.isi.karma.metadata.ModelLearnerMetadata

package edu.isi.karma.metadata;

import edu.isi.karma.config.ModelingConfiguration;
import edu.isi.karma.controller.update.UpdateContainer;
import edu.isi.karma.modeling.alignment.learner.ModelLearningGraphLoaderThread;
import edu.isi.karma.modeling.ontology.OntologyManager;
import edu.isi.karma.rep.Workspace;
import edu.isi.karma.webserver.KarmaException;
import edu.isi.karma.webserver.ServletContextParameterMap.ContextParameter;

public class ModelLearnerMetadata extends KarmaUserMetadata {

 
  public ModelLearnerMetadata(Workspace workspace) throws KarmaException
  {
    super(workspace);
  }
 
  @Override
  public void setup(UpdateContainer uc) {
    OntologyManager ontologyManager = workspace.getOntologyManager();
    if (ModelingConfiguration.isLearnerEnabled())
      new ModelLearningGraphLoaderThread(ontologyManager).run();
  }

  @Override
  protected ContextParameter getDirectoryContextParameter() {
    return ContextParameter.ALIGNMENT_GRAPH_DIRECTORY;
  }

  @Override
  protected String getDirectoryPath() {
    return "alignment-graph/";
  }

  @Override
  public KarmaMetadataType getType() {
    return StandardUserMetadataTypes.MODEL_LEARNER;
  }
}
TOP

Related Classes of edu.isi.karma.metadata.ModelLearnerMetadata

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.