owltools.gaf
Class GafObjectsBuilder
java.lang.Object
owltools.gaf.GafObjectsBuilder
public class GafObjectsBuilder
- extends Object
The class builds GafDocument
a gaf file.
By default it read the whole gaf file and builds the GAFDocument.
If a GAF file is large enough, e.g. uniport file, it cannot be loaded as whole into memory,
so in such cases the file is needed to be split into small units that only one unit will be loaded into memory. This
class has built-in this split functionality. By creating the instance of this class through the constructor with int parameter (split size)
enable the split methodology of building the gaf document. See GafObjectsBuilderTest
class for details how to build GafDocument
object from this class.
- Author:
- Shahid Manzoor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GafObjectsBuilder
public GafObjectsBuilder()
GafObjectsBuilder
public GafObjectsBuilder(int splitSize)
getSplitSize
public int getSplitSize()
getGafDocument
public GafDocument getGafDocument()
getParser
public GAFParser getParser()
buildDocument
public GafDocument buildDocument(Reader reader,
String docId,
String path)
throws IOException
- Throws:
IOException
buildDocument
public GafDocument buildDocument(String fileName,
String docId,
String path)
throws IOException,
URISyntaxException
- Throws:
IOException
URISyntaxException
getNextSplitDocument
public GafDocument getNextSplitDocument()
throws IOException
- when this variable reaches at splitSize then the algorithm in the getNextSplitDocument method stops calling next method of the GafParser and return the GafDocument object build with the number of rows
- Returns:
-
- Throws:
IOException
isDocumentSplitted
public boolean isDocumentSplitted()
buildDocument
public GafDocument buildDocument(File gafFilePath)
throws IOException
- Throws:
IOException
buildDocument
public GafDocument buildDocument(String gafFile)
throws IOException,
URISyntaxException
- Throws:
IOException
URISyntaxException
Copyright © 2010-2012. All Rights Reserved.