org.mindswap.pellet.jena.graph.loader
Interface GraphLoader

All Known Implementing Classes:
DefaultGraphLoader

public interface GraphLoader

Title:

Description:

Copyright: Copyright (c) 2008

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Method Summary
 void clear()
          Clear all internal caches (essentially used for mapping bnodes to ATerm structures)
 com.hp.hpl.jena.graph.Graph getGraph()
          Get the Jena graph used in the loader.
 java.util.Set<java.lang.String> getUnpportedFeatures()
          Returns the unsupported axioms ignored by the loader.
 boolean isLoadABox()
          Returns if the loader will load the Abox triples.
 boolean isPreprocessTypeTriples()
          Returns if the loader will preprocess rdf:type triples.
 void load(java.lang.Iterable<com.hp.hpl.jena.graph.Graph> graphs)
          Load the axioms from the Jena graphs to the given KB.
 aterm.ATermAppl node2term(com.hp.hpl.jena.graph.Node node)
          Translate the given graph node into an ATerm object.
 void preprocess()
          Do the preprocessing steps necessary to cache any information that will be used for loading.
 void setGraph(com.hp.hpl.jena.graph.Graph graph)
          Set the graph that will be used during loading.
 void setKB(KnowledgeBase kb)
           
 void setLoadABox(boolean loadABox)
          Sets the flag that tells the loader to skip ABox (instance) statements.
 void setPreprocessTypeTriples(boolean preprocessTypeTriples)
          This option forces the loader to process type triples before processing other triples.
 void setProgressMonitor(ProgressMonitor monitor)
          Set the progress monitor that will show the load progress.
 

Method Detail

clear

void clear()
Clear all internal caches (essentially used for mapping bnodes to ATerm structures)


getGraph

com.hp.hpl.jena.graph.Graph getGraph()
Get the Jena graph used in the loader.

Returns:

getUnpportedFeatures

java.util.Set<java.lang.String> getUnpportedFeatures()
Returns the unsupported axioms ignored by the loader.

Returns:

load

void load(java.lang.Iterable<com.hp.hpl.jena.graph.Graph> graphs)
          throws UnsupportedFeatureException
Load the axioms from the Jena graphs to the given KB.

Throws:
UnsupportedFeatureException

node2term

aterm.ATermAppl node2term(com.hp.hpl.jena.graph.Node node)
Translate the given graph node into an ATerm object.

Parameters:
node -
Returns:

preprocess

void preprocess()
Do the preprocessing steps necessary to cache any information that will be used for loading.


setGraph

void setGraph(com.hp.hpl.jena.graph.Graph graph)
Set the graph that will be used during loading.

Parameters:
graph -

isLoadABox

boolean isLoadABox()
Returns if the loader will load the Abox triples.

Returns:
boolean value indicating if ABox triples will be loaded
See Also:
setLoadABox(boolean)

setLoadABox

void setLoadABox(boolean loadABox)
Sets the flag that tells the loader to skip ABox (instance) statements. Only TBox (class) and RBox (property) axioms will be loaded. Improves loading performance even if there are no ABox statements because lets the loader to ignore annotations.

Parameters:
loadABox -

isPreprocessTypeTriples

boolean isPreprocessTypeTriples()
Returns if the loader will preprocess rdf:type triples.

Returns:
boolean value indicating if rdf:type triples will be preprocessed
See Also:
setPreprocessTypeTriples(boolean)

setPreprocessTypeTriples

void setPreprocessTypeTriples(boolean preprocessTypeTriples)
This option forces the loader to process type triples before processing other triples. Not preprocessing the type triples improves loading time 5% to 10% but might cause problems too. For example, without preprocessing the type triples a triple (s p "o") might be loaded as a datatype assertion (thinking s is an individual and p is a datatype property) whereas (s rdf:type owl:Class) and (p rdf:type owl:AnnotiationProperty) triples have not yet been processed. These problems depend on the order triples are processed and highly unpredictable. Loading the schema first with preprocessing and loading the instance data without preprocessing would be a viable option if schema and instance data are in separate files.


setProgressMonitor

void setProgressMonitor(ProgressMonitor monitor)
Set the progress monitor that will show the load progress.

Parameters:
monitor -

setKB

void setKB(KnowledgeBase kb)


Copyright © 2004 Evren Sirin. All Rights Reserved.