uk.ac.open.kmi.skos
Class SKOSChunkParser

java.lang.Object
  extended byuk.ac.open.kmi.skos.SKOSParser
      extended byuk.ac.open.kmi.skos.SKOSChunkParser

public class SKOSChunkParser
extends SKOSParser

SKOSChunkParser parses the SKOS file in chunks. It allows the similarity algorithm to iterate through the SKOS file without building a large ontology in the memory.


Field Summary
 
Fields inherited from class uk.ac.open.kmi.skos.SKOSParser
language
 
Constructor Summary
SKOSChunkParser(java.lang.String fileName)
          Constructor of the parser
SKOSChunkParser(java.lang.String fileName, java.lang.String language)
          Constructor of the parser
 
Method Summary
 int getConceptNumber()
           
 org.semanticweb.owl.model.OWLOntology getNextChunk()
          Get a chunk from the SKOS file and return the OWLOntology representation.
 boolean hasNextChunk()
          Determine if there are more chunks that needs to be loaded from the SKOS file
 void setChunkSize(int chunkSize)
          Set how many concepts should be added into the OWLOntology in one iteration.
 
Methods inherited from class uk.ac.open.kmi.skos.SKOSParser
getBaseURI, getConcept, getDutchRDFDescription, getRDFDescription, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SKOSChunkParser

public SKOSChunkParser(java.lang.String fileName)
                throws SKOSParserException
Constructor of the parser

Parameters:
fileName - SKOS file name
Throws:
SKOSParserException

SKOSChunkParser

public SKOSChunkParser(java.lang.String fileName,
                       java.lang.String language)
                throws SKOSParserException
Constructor of the parser

Parameters:
fileName - SKOS file name
language - xml:lang tags that will be loaded into the ontology
Throws:
SKOSParserException
Method Detail

hasNextChunk

public boolean hasNextChunk()
Determine if there are more chunks that needs to be loaded from the SKOS file

Returns:
true if there are more chunks, false otherwise

getNextChunk

public org.semanticweb.owl.model.OWLOntology getNextChunk()
                                                   throws SKOSParserException
Get a chunk from the SKOS file and return the OWLOntology representation.

Returns:
OWLOntology
Throws:
SKOSParserException

setChunkSize

public void setChunkSize(int chunkSize)
Set how many concepts should be added into the OWLOntology in one iteration.

Parameters:
chunkSize -

getConceptNumber

public int getConceptNumber()