leila.patterns
Class LinkageFile

java.lang.Object
  extended by leila.patterns.LinkageFile
All Implemented Interfaces:
java.lang.Iterable<Linkage>, java.util.Iterator<Linkage>

public class LinkageFile
extends java.lang.Object
implements java.lang.Iterable<Linkage>, java.util.Iterator<Linkage>

This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).

LinkageFile.java represents an LGO-file (Link Grammar Output). This class provides an Iterator over the Linkages.


Field Summary
protected  Document document
          Holds the currect document context
protected  java.io.BufferedReader in
          Holds the Reader
 
Constructor Summary
LinkageFile(java.io.File inf)
          Constructs a LinkageFile from a file
 
Method Summary
 boolean hasNext()
          TRUE if there is another Linkage
 java.util.Iterator<Linkage> iterator()
          Returns this
static java.io.File lgiFile(java.io.File f)
          Returns the LGI-filename for an HTML-filename
static java.io.File lgoFile(java.io.File f)
          Returns the LGO-filename for an HTML-filename
static void main(java.lang.String[] argv)
          Test routine
 Linkage next()
          Returns next Linkage
 void remove()
          Does nothing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected java.io.BufferedReader in
Holds the Reader


document

protected Document document
Holds the currect document context

Constructor Detail

LinkageFile

public LinkageFile(java.io.File inf)
            throws java.lang.Exception
Constructs a LinkageFile from a file

Throws:
java.lang.Exception
Method Detail

hasNext

public boolean hasNext()
TRUE if there is another Linkage

Specified by:
hasNext in interface java.util.Iterator<Linkage>

remove

public void remove()
Does nothing

Specified by:
remove in interface java.util.Iterator<Linkage>

next

public Linkage next()
Returns next Linkage

Specified by:
next in interface java.util.Iterator<Linkage>

iterator

public java.util.Iterator<Linkage> iterator()
Returns this

Specified by:
iterator in interface java.lang.Iterable<Linkage>

lgoFile

public static java.io.File lgoFile(java.io.File f)
Returns the LGO-filename for an HTML-filename


lgiFile

public static java.io.File lgiFile(java.io.File f)
Returns the LGI-filename for an HTML-filename


main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Test routine

Throws:
java.lang.Exception