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 Lesser General Public License (LGPL): http://www.gnu.org/licenses/ 004 005 package graphlab.library.event; 006 007 import graphlab.library.BaseEdge; 008 import graphlab.library.BaseGraph; 009 import graphlab.library.BaseVertex; 010 011 /** 012 * @author Omid 013 */ 014 public class GraphRequest<VertexType extends BaseVertex, EdgeType extends BaseEdge<VertexType>> 015 implements Event { 016 017 private BaseGraph<VertexType, EdgeType> graph; 018 019 /** 020 * @param graph The graph to set. 021 */ 022 public void setGraph(BaseGraph<VertexType, EdgeType> graph) { 023 if (graph == null) 024 throw new NullPointerException("Null graph supplied"); 025 026 this.graph = graph; 027 } 028 029 public BaseGraph<VertexType, EdgeType> getGraph() { 030 return graph; 031 } 032 033 public String getID() { 034 return "GraphRequest"; 035 } 036 037 public String getDescription() { 038 return "Select a Graph"; 039 } 040 041 private String message; 042 043 public String getMessage() { 044 return message; 045 } 046 047 public void setMessage(String message) { 048 this.message = message; 049 } 050 }