|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mindswap.pellet.KBLoader
public abstract class KBLoader
A generic class that allows the creation of Pellet KnowledgeBase instances and load ontologies. The actual parsing and loading operations is implemented by the concrete extensions of this class where each implementation uses a different parser and loader, e.g. Jena or OWLAPI.
Loading to a KnowledgeBase instance is typically a two-phase process. First the ontology is parsed into a representation supported by the loader, e.g. Jena Model or OWLAPI Ontology. Then this object is processed by Pellet and loaded to the KnowledgeBase class.
This class provides fined-grained control over how parsing and loading is done along with a convenience function to do everything at once. Concrete implementations of this class provides access to the ontology object used by the underlying loader.
| Field Summary | |
|---|---|
static java.util.logging.Logger |
log
|
| Constructor Summary | |
|---|---|
KBLoader()
|
|
| Method Summary | |
|---|---|
abstract void |
clear()
Resets the loader and clear any previously loaded ontologies. |
KnowledgeBase |
createKB(java.lang.String... fileNameRegexList)
Convenience function to clear, parse, load, and getKB(). |
abstract KnowledgeBase |
getKB()
Returns the KB instance associated with the loader. |
abstract void |
load()
Load any previously parsed ontologies |
void |
parse(java.lang.String... fileNameRegexList)
Parse one or more files to the internal representation supported by this loader. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.logging.Logger log
| Constructor Detail |
|---|
public KBLoader()
| Method Detail |
|---|
public abstract void clear()
public KnowledgeBase createKB(java.lang.String... fileNameRegexList)
clear, parse, load, and getKB().
fileNameRegexList - list of regular expressions representing file URIs
FileUtils.getFileURIs(String...)public abstract KnowledgeBase getKB()
load() should be called beforehand.
public abstract void load()
public void parse(java.lang.String... fileNameRegexList)
fileNameRegexList - list of regular expressions representing file URIsFileUtils.getFileURIs(String...)public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||