org.semanticweb.elk.loading
Class Owl2ParserLoader

java.lang.Object
  extended by org.semanticweb.elk.loading.AbstractAxiomLoader
      extended by org.semanticweb.elk.loading.Owl2ParserLoader
All Implemented Interfaces:
AxiomLoader
Direct Known Subclasses:
Owl2StreamLoader

public class Owl2ParserLoader
extends AbstractAxiomLoader
implements AxiomLoader

An AxiomLoader that loads an ontology using a provided Owl2Parser.

Author:
"Yevgeny Kazakov"

Field Summary
protected  ElkLoadingException exception
          the exception created if something goes wrong
 
Constructor Summary
Owl2ParserLoader(Owl2Parser owlParser)
          Creating an Owl2ParserLoader, which loads axioms generated using Owl2Parser.
Owl2ParserLoader(Owl2Parser owlParser, int batchLength)
          Creating an Owl2ParserLoader, which loads axioms generated using Owl2Parser.
 
Method Summary
 void dispose()
          Close resources used by this AxiomLoader
protected  void disposeParserResources()
          A hook to free resources used by the parser
 boolean isLoadingFinished()
           
 void load(ElkAxiomProcessor axiomInserter, ElkAxiomProcessor axiomDeleter)
          Loads pending axioms using the provided axiomInserter for inserting axioms and axiomDeleter for deleting axioms; if called twice, the already loaded axioms will not be processed again
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exception

protected volatile ElkLoadingException exception
the exception created if something goes wrong

Constructor Detail

Owl2ParserLoader

public Owl2ParserLoader(Owl2Parser owlParser,
                        int batchLength)
Creating an Owl2ParserLoader, which loads axioms generated using Owl2Parser. The axioms generated by the parser are stored in a buffer of the given bufferSize.

Parameters:
owlParser - the parser used to load the ontology
batchLength - the size of the batch for exchanging axioms

Owl2ParserLoader

public Owl2ParserLoader(Owl2Parser owlParser)
Creating an Owl2ParserLoader, which loads axioms generated using Owl2Parser.

Parameters:
owlParser - the parser used to load the ontology
Method Detail

load

public void load(ElkAxiomProcessor axiomInserter,
                 ElkAxiomProcessor axiomDeleter)
          throws ElkLoadingException
Description copied from interface: AxiomLoader
Loads pending axioms using the provided axiomInserter for inserting axioms and axiomDeleter for deleting axioms; if called twice, the already loaded axioms will not be processed again

Specified by:
load in interface AxiomLoader
Specified by:
load in class AbstractAxiomLoader
Parameters:
axiomInserter - an ElkAxiomProcessor that inserts the axioms that were added
axiomDeleter - an ElkAxiomProcessor that deletes the axioms that were removed
Throws:
ElkLoadingException - if loading cannot be completed successfully

dispose

public void dispose()
Description copied from interface: AxiomLoader
Close resources used by this AxiomLoader

Specified by:
dispose in interface AxiomLoader
Overrides:
dispose in class AbstractAxiomLoader

isLoadingFinished

public boolean isLoadingFinished()
Specified by:
isLoadingFinished in interface AxiomLoader
Specified by:
isLoadingFinished in class AbstractAxiomLoader
Returns:
true if the loading is finished, i.e., calling AxiomLoader.load(ElkAxiomProcessor, ElkAxiomProcessor) will have no effect

disposeParserResources

protected void disposeParserResources()
A hook to free resources used by the parser



Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.