Coverage Report - org.dishevelled.graph.io.GraphReader
 
Classes in this File Line Coverage Branch Coverage Complexity
GraphReader
N/A
N/A
1
 
 1  
 /*
 2  
 
 3  
     dsh-graph-io  Directed graph readers and writers.
 4  
     Copyright (c) 2008-2013 held jointly by the individual authors.
 5  
 
 6  
     This library is free software; you can redistribute it and/or modify it
 7  
     under the terms of the GNU Lesser General Public License as published
 8  
     by the Free Software Foundation; either version 3 of the License, or (at
 9  
     your option) any later version.
 10  
 
 11  
     This library is distributed in the hope that it will be useful, but WITHOUT
 12  
     ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
 13  
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 14  
     License for more details.
 15  
 
 16  
     You should have received a copy of the GNU Lesser General Public License
 17  
     along with this library;  if not, write to the Free Software Foundation,
 18  
     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
 19  
 
 20  
     > http://www.fsf.org/licensing/licenses/lgpl.html
 21  
     > http://www.opensource.org/licenses/lgpl-license.php
 22  
 
 23  
 */
 24  
 package org.dishevelled.graph.io;
 25  
 
 26  
 import java.net.URL;
 27  
 
 28  
 import java.io.File;
 29  
 import java.io.IOException;
 30  
 import java.io.InputStream;
 31  
 
 32  
 import org.dishevelled.graph.Graph;
 33  
 
 34  
 /**
 35  
  * Graph reader.
 36  
  *
 37  
  * @param <N> node value type
 38  
  * @param <E> edge value type
 39  
  * @author  Michael Heuer
 40  
  * @version $Revision$ $Date$
 41  
  */
 42  
 public interface GraphReader<N, E>
 43  
 {
 44  
 
 45  
     /**
 46  
      * Read a graph from the specified file.
 47  
      *
 48  
      * @param file file to read from, must not be null
 49  
      * @return a graph read from the specified file
 50  
      * @throws IOException if an IO error occurs
 51  
      */
 52  
     Graph<N, E> read(File file) throws IOException;
 53  
 
 54  
     /**
 55  
      * Read a graph from the specified input stream.
 56  
      *
 57  
      * @param inputStream input stream to read from, must not be null
 58  
      * @return a graph read from the specified input stream
 59  
      * @throws IOException if an IO error occurs
 60  
      */
 61  
     Graph<N, E> read(InputStream inputStream) throws IOException;
 62  
 
 63  
     /**
 64  
      * Read a graph from the specified URL.
 65  
      *
 66  
      * @param url URL to read from, must not be null
 67  
      * @return a graph read from the specified URL
 68  
      * @throws IOException if an IO error occurs
 69  
      */
 70  
     Graph<N, E> read(URL url) throws IOException;
 71  
 }