001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 package graphlab.plugins.main; 005 006 import graphlab.platform.core.AbstractAction; 007 import graphlab.platform.core.BlackBoard; 008 009 /** 010 * @author Rouzbeh Ebrahimi 011 */ 012 public abstract class GraphAction extends AbstractAction { 013 private GraphData graphData; 014 015 /** 016 * constructor 017 * 018 * @param bb the blackboard of the action 019 */ 020 021 public GraphAction(BlackBoard bb) { 022 super(bb); 023 graphData = new GraphData(bb); 024 } 025 026 /** 027 * this method is the basic structure for performing a job in the AbstractAction structure,But Here we needed more 028 * simple structure ;so we defined GraphAction and so there was no need of this signature! 029 * 030 * @param eventName 031 * @param value 032 */ 033 public final void performAction(String eventName, Object value) { 034 performJob(graphData); 035 } 036 037 public abstract void performJob(GraphData graphData); 038 }