org.openrdf.sesame.sailimpl.nativerdf
Class NativeRdfRepositoryConfig

java.lang.Object
  extended byorg.openrdf.sesame.config.SailConfig
      extended byorg.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepositoryConfig
All Implemented Interfaces:
Cloneable

public class NativeRdfRepositoryConfig
extends SailConfig

Extension of SailConfig offering specific utility methods for configuring an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail.


Constructor Summary
NativeRdfRepositoryConfig()
          Creates a new and unconfigured NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail.
NativeRdfRepositoryConfig(String dataDir)
          Creates a new NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail that uses the specified directory for storing its data.
NativeRdfRepositoryConfig(String dataDir, String indexSpec)
          Creates a new NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail that uses the specified directory for storing its data and the specified indexes for searching triples.
 
Method Summary
 String getDataDir()
          Gets the fully qualified name of the data directory.
 String getTripleIndexes()
          Gets the triple index specification to be used by the native RDF repository.
 void setDataDir(String dataDir)
          Sets the data directory for the native RDF repository.
 void setTripleIndexes(String indexSpec)
          Specifies which triple indexes the native RDF repository should use.
 
Methods inherited from class org.openrdf.sesame.config.SailConfig
clone, equals, getConfigParameters, getParameter, getSailClass, hashCode, hasParameter, removeParameter, setConfigParameters, setParameter, setParameterKey, setParameterValue, setSailClass
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeRdfRepositoryConfig

public NativeRdfRepositoryConfig()
Creates a new and unconfigured NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail. A data directory should be specified before using this configuration object.

See Also:
setDataDir(java.lang.String)

NativeRdfRepositoryConfig

public NativeRdfRepositoryConfig(String dataDir)
Creates a new NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail that uses the specified directory for storing its data.

Parameters:
dataDir - The data directory.

NativeRdfRepositoryConfig

public NativeRdfRepositoryConfig(String dataDir,
                                 String indexSpec)
Creates a new NativeRdfRepositoryConfig object for an org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository Sail that uses the specified directory for storing its data and the specified indexes for searching triples.

Parameters:
dataDir - The data directory.
indexSpec - A set of comma/whitespace-separated field sequences, e.g. "spo, pos". See setTripleIndexes(java.lang.String) for a description of the string format.
Method Detail

setDataDir

public void setDataDir(String dataDir)
Sets the data directory for the native RDF repository.

Parameters:
dataDir - The data directory.

getDataDir

public String getDataDir()
Gets the fully qualified name of the data directory.


setTripleIndexes

public void setTripleIndexes(String indexSpec)
Specifies which triple indexes the native RDF repository should use. Each index consists of three fields: subject, predicate and object. The order of these fields determines the usability of an index on a specific triple query pattern: searching triples with a specific subject in an index that has the subject as the first field is a lot faster than searching these triples in an index where the subject field is second or third.

This method allows one to specify which indexes to use. The subject-, predicate- and object fields are represented by the characters 's', 'p' and 'o', respectively. Indexes can be specified by creating 3-letter words from these three characters. Multiple indexes can be specified by separating these words with comma's, spaces and/or tabs. E.g.: the string "spo, pos" specifies two indexes; a subject-predicate-object index and a predicate-object-subject index.

Parameters:
indexSpec - A set of comma/whitespace-separated field sequences, e.g. "spo, pos".

getTripleIndexes

public String getTripleIndexes()
Gets the triple index specification to be used by the native RDF repository.

See Also:
setTripleIndexes(java.lang.String)


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.