title: How do i use GraphMLReader2 in Jung?
body: <p>I want to use class GraphMLReader to read a Undirected Graph from graphML with JUNG2.0.</p>
  
  <p>The code is as follow:</p>
  
  <pre><code>import edu.uci.ics.jung.io.*;
  import edu.uci.ics.jung.io.graphml.*;
  import java.io.*;
  import java.util.*;
  import org.apache.commons.collections15.Transformer;
  import edu.uci.ics.jung.graph.*;
  
  class Vertex{
          int id;
          String type;
          String value;
  }
  
  class Edge{
          int id ;
          String type;
          String value;
  }
  
  public class Loader{
          static String src = "test.xsl";
  
          public static void  Main( String[] args){
                  Reader reader = new FileReader(src );
                  Transformer&lt;NodeMetadata, Vertex&gt; vtrans = new Transformer&lt;NodeMetadata,Vertex&gt;(){
                          public Vertex transform(NodeMetadata nmd ){
                                  Vertex v = new Vertex() ;
                                  v.type = nmd.getProperty("type");
                                  v.value = nmd.getProperty("value");
                                  v.id = Integer.valueOf( nmd.getId() );
                                  return v;
                          }
                  };
                  Transformer&lt;EdgeMetadata, Edge&gt; etrans = new Transformer&lt;EdgeMetadata,Edge&gt;(){
                          public Edge transform( EdgeMetadata emd ){
                                  Edge e = new Edge() ;
                                  e.type = emd.getProperty("type");
                                  e.value = emd.getProperty("value");
                                  e.id = Integer.valueOf( emd.getId() );
                                  return e;
                          }
                  };
                  Transformer&lt;HyperEdgeMetadata, Edge&gt; hetrans = new Transformer&lt;HyperEdgeMetadata,Edge&gt;(){
  
                          public Edge transform( HyperEdgeMetadata emd ){
                                  Edge e = new Edge() ;
                                  e.type = emd.getProperty("type");
                                  e.value = emd.getProperty("value");
                                  e.id = Integer.valueOf( emd.getId() );
                                  return e;
                          }
                  };
                  Transformer&lt; GraphMetadata , UndirectedSparseGraph&gt; gtrans = new Transformer&lt;GraphMetadata,UndirectedSparseGraph&gt;(){
                          public UndirectedSparseGraph&lt;Vertex,Edge&gt; transform( GraphMetadata gmd ){
                                  return new UndirectedSparseGraph&lt;Vertex,Edge&gt;();
                          }
                  };
  
  
  
                  GraphMLReader2&lt; UndirectedSparseGraph&lt;Vertex,Edge&gt; , Vertex , Edge&gt; gmlr =
                          new GraphMLReader2&lt; UndirectedSparseGraph&lt;Vertex,Edge&gt; ,Vertex, Edge&gt;(
                                          reader,
                                          gtrans,
                                          vtrans,
                                          etrans,
                                          hetrans);
                  UndirectedSparseGraph&lt;Vertex,Edge&gt; g = gmlr.readGraph();
  
                  return ;
  
          }
  }
  </code></pre>
  
  <p>However, compiler alert that:</p>
  
  <pre><code>    Loader.java:60: cannot find symbol
  symbol  : constructor GraphMLReader2(java.io.Reader,org.apache.commons.collections15.Transformer&lt;edu.uci.ics.jung.io.graphml.GraphMetadata,edu.uci.ics.jung.graph.UndirectedSparseGraph&gt;,org.apache.commons.collections15.Transformer&lt;edu.uci.ics.jung.io.graphml.NodeMetadata,Vertex&gt;,org.apache.commons.collections15.Transformer&lt;edu.uci.ics.jung.io.graphml.EdgeMetadata,Edge&gt;)
  location: class edu.uci.ics.jung.io.graphml.GraphMLReader2&lt;edu.uci.ics.jung.graph.UndirectedSparseGraph&lt;Vertex,Edge&gt;,Vertex,Edge&gt;
     new GraphMLReader2&lt; UndirectedSparseGraph&lt;Vertex,Edge&gt; ,Vertex, Edge&gt;(
     ^
  1 error
  </code></pre>
  
  <p>How can i solve this problem? Thanks.</p>