org.openrdf.sesame.sailimpl.memory
Class RdfSourceConfig

java.lang.Object
  extended byorg.openrdf.sesame.config.SailConfig
      extended byorg.openrdf.sesame.sailimpl.memory.RdfSourceConfig
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
RdfRepositoryConfig

public class RdfSourceConfig
extends SailConfig

Extension of SailConfig offering specific utility methods for configuring an org.openrdf.sesame.sailimpl.memory.RdfSource Sail. This class can be used to configure a memory Sail that wraps an RDF data file.


Constructor Summary
RdfSourceConfig(String file)
          Creates a new RdfSourceConfig object for an org.openrdf.sesame.sailimpl.memory.RdfSource Sail that will contain the XML-encoded RDF data from specified file.
RdfSourceConfig(String file, RDFFormat dataFormat)
          Creates a new RdfSourceConfig object for an org.openrdf.sesame.sailimpl.memory.RdfSource Sail that will contain the data from specified file.
 
Method Summary
 RDFFormat getDataFormat()
          Gets the data format of the data in the data file that has been configured for the Sail.
 String getFile()
          Gets the data file that has been configured for the Sail.
 void setDataFormat(RDFFormat dataFormat)
          Sets the format of the data in the data file.
 void setFile(String file)
          Sets the data file for the Sail.
 
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

RdfSourceConfig

public RdfSourceConfig(String file)
Creates a new RdfSourceConfig object for an org.openrdf.sesame.sailimpl.memory.RdfSource Sail that will contain the XML-encoded RDF data from specified file.

Parameters:
file - The data file.

RdfSourceConfig

public RdfSourceConfig(String file,
                       RDFFormat dataFormat)
Creates a new RdfSourceConfig object for an org.openrdf.sesame.sailimpl.memory.RdfSource Sail that will contain the data from specified file.

Parameters:
file - The data file.
dataFormat - The format of the data in the data file. Legal values are RDFFormat.RDFXML, RDFFormat.NTRIPLES and RDFFormat.TURTLE.
Method Detail

setFile

public void setFile(String file)
Sets the data file for the Sail.


getFile

public String getFile()
Gets the data file that has been configured for the Sail.

Returns:
The file.

setDataFormat

public void setDataFormat(RDFFormat dataFormat)
Sets the format of the data in the data file.

Parameters:
dataFormat - One of RDFFormat.RDFXML, RDFFormat.NTRIPLES and RDFFormat.TURTLE.

getDataFormat

public RDFFormat getDataFormat()
Gets the data format of the data in the data file that has been configured for the Sail.

Returns:
The data format, or null if no data format has been configured.


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