mascoptLib.io.graph
Class MGLReader

java.lang.Object
  |
  +--mascoptLib.io.graph.MGLReader
All Implemented Interfaces:
ReaderInterface
Direct Known Subclasses:
MGXReader

public class MGLReader
extends Object
implements ReaderInterface


Constructor Summary
MGLReader(String file)
          Creates a reader on an MGL file.
MGLReader(String file, boolean validate)
          Creates a reader on an MGL file validating the DTD or not.
 
Method Summary
 Iterator getAbstractChains()
          Gives an iterator on AbstractChains read.
 Iterator getAbstractEdges()
          Gives an iterator on AbstractEdges read.
 Iterator getAbstractEdgeSets()
          Gives an iterator on AbstractEdgeSets read.
 Iterator getAbstractGraphs()
          Gives an iterator on AbstractGraphs read.
 Iterator getAbstractNodes()
          Gives an iterator on AbstractNodes read.
 Iterator getAbstractNodeSets()
          Gives an iterator on AbstractNodeSets read.
 Iterator getAllObjects()
          Gives an iterator on other objects.
 int getNumberOfGraphs()
          Get the number of graphs parsed by the MGLReader.
 void parse()
          Parse the MGL file and create in memory all objects contained in it.
 void setSuperEdgeSets()
           
 void setSuperGraphs()
           
 void setSuperNodeSets()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MGLReader

public MGLReader(String file)
Creates a reader on an MGL file.

Parameters:
file - the file to read.

MGLReader

public MGLReader(String file,
                 boolean validate)
Creates a reader on an MGL file validating the DTD or not.

Parameters:
file - the file to read.
validate - if true the DTD is validated.
Method Detail

parse

public void parse()
           throws Exception
Parse the MGL file and create in memory all objects contained in it. Then you can use all the access method to get objects.

Throws:
Exception

getNumberOfGraphs

public int getNumberOfGraphs()
Get the number of graphs parsed by the MGLReader.

Returns:
the number of graphs parsed by the MGLReader in the file.

setSuperNodeSets

public void setSuperNodeSets()

setSuperEdgeSets

public void setSuperEdgeSets()

setSuperGraphs

public void setSuperGraphs()

getAbstractNodes

public Iterator getAbstractNodes()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractNodes read.

Specified by:
getAbstractNodes in interface ReaderInterface
Returns:
an iterator.

getAbstractEdges

public Iterator getAbstractEdges()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractEdges read.

Specified by:
getAbstractEdges in interface ReaderInterface
Returns:
an iterator.

getAbstractNodeSets

public Iterator getAbstractNodeSets()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractNodeSets read.

Specified by:
getAbstractNodeSets in interface ReaderInterface
Returns:
an iterator.

getAbstractEdgeSets

public Iterator getAbstractEdgeSets()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractEdgeSets read.

Specified by:
getAbstractEdgeSets in interface ReaderInterface
Returns:
an iterator.

getAbstractChains

public Iterator getAbstractChains()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractChains read.

Specified by:
getAbstractChains in interface ReaderInterface
Returns:
an iterator.

getAbstractGraphs

public Iterator getAbstractGraphs()
Description copied from interface: ReaderInterface
Gives an iterator on AbstractGraphs read.

Specified by:
getAbstractGraphs in interface ReaderInterface
Returns:
an iterator.

getAllObjects

public Iterator getAllObjects()
Description copied from interface: ReaderInterface
Gives an iterator on other objects. We can imagine that some reader and writer implements the store of some special objects. This method provides a way to get this object via a generic method.

Specified by:
getAllObjects in interface ReaderInterface
Returns:
an iterator.