|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmascoptLib.io.graph.MGLReader
Read an MGL file. Developper's note: I (Yann Verhoeven) am perfectly conscient that a whole bunch of code of this class could have been factorized BUT, doing that, I would have been obliged to introduce a lot of "if" in that code. And I feel that maintaining such code is painful. If you don't think so please feel free to recode the class.
Constructor Summary | |
MGLReader(String streamname)
Creates a reader on an MGL file. |
|
MGLReader(String streamname,
boolean validate)
Creates a reader on an MGL stream validating the DTD or not. |
|
MGLReader(String streamname,
boolean validate,
MGLNodeFilter customnodefilter)
Creates a reader on an MGL stream validating the DTD or not. |
Method Summary | |
Iterator |
getAbstractChains()
Deprecated. Please now use getAbstractPaths() |
Iterator |
getAbstractEdges()
Returns an iterator on the AbstractEdges contained in
the file. |
Iterator |
getAbstractEdgeSets()
Returns an iterator on the AbstractEdgeSets
contained in the file. |
Iterator |
getAbstractGraphs()
Returns an iterator on the AbstractGraphs contained
in the file. |
Iterator |
getAbstractPaths()
Returns an iterator on the AbstractPath contained in
the file. |
Iterator |
getAbstractVertexSets()
Returns an iterator on the AbstractVertexSets contained
in the file. |
Iterator |
getAbstractVertices()
Returns an iterator on the AbstractVertex contained
in the file. |
Iterator |
getAllObjects()
Returns an iterator on all the objects contained in the file. |
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 |
setValidating(boolean validation)
Turn off/on the validation with Relax NG. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MGLReader(String streamname) throws FileNotFoundException, SecurityException
streamname
- -
the stream to be read.
FileNotFoundException
- If the specified stream is a file and this file is not found.
SecurityException
- Indicates a security violationpublic MGLReader(String streamname, boolean validate) throws FileNotFoundException, SecurityException
streamname
- -
the stream to be read.validate
- -
if true the DTD is validated.
FileNotFoundException
- If the specified stream is a file and this file is not found.
SecurityException
- Indicates a security violationpublic MGLReader(String streamname, boolean validate, MGLNodeFilter customnodefilter) throws FileNotFoundException, SecurityException
streamname
- -
the name of the stream to be read.validate
- -
if true the DTD is validated.customnodefilter
- -
the MGLNodeFilter
to be used.
FileNotFoundException
- If the specified stream is a file and this file is not found.
SecurityException
- Indicates a security violationMethod Detail |
public void parse() throws Exception
Exception
public Iterator getAbstractPaths()
AbstractPath
contained in
the file.
getAbstractPaths
in interface ReaderInterface
public Iterator getAbstractChains()
getAbstractPaths()
public Iterator getAbstractEdges()
AbstractEdges
contained in
the file.
getAbstractEdges
in interface ReaderInterface
public Iterator getAbstractEdgeSets()
AbstractEdgeSets
contained in the file.
getAbstractEdgeSets
in interface ReaderInterface
public Iterator getAbstractGraphs()
AbstractGraphs
contained
in the file.
getAbstractGraphs
in interface ReaderInterface
public Iterator getAbstractVertices()
AbstractVertex
contained
in the file.
getAbstractVertices
in interface ReaderInterface
public Iterator getAbstractVertexSets()
AbstractVertexSets
contained
in the file.
getAbstractVertexSets
in interface ReaderInterface
public Iterator getAllObjects()
getAllObjects
in interface ReaderInterface
public int getNumberOfGraphs()
public void setValidating(boolean validation)
validation
- a boolean.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |