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.saveload.core; 005 006 import graphlab.graph.graph.GraphModel; 007 008 import java.io.File; 009 010 /** 011 * @author azin azadi 012 013 */ 014 public interface GraphWriterInterface { 015 016 /** 017 * Retrieves the name of the file type. 018 * 019 * @return the Name 020 */ 021 public String getName(); 022 023 /** 024 * Retrieves the file extension for the file type. Example: "xml", "gr". 025 * 026 * @return the Extension 027 */ 028 public String getExtension(); 029 030 /** 031 * Writes the graph to the file. 032 * 033 * @param file the file 034 * @param graph the graph 035 * @throws GraphIOException In the case of the writer error. 036 */ 037 public void write(File file, GraphModel graph) throws GraphIOException; 038 }