org.openrdf.sesame.config.handlers
Class SystemConfigFileHandler

java.lang.Object
  extended byorg.openrdf.sesame.config.handlers.SystemConfigFileHandler
All Implemented Interfaces:
SystemConfigHandler

public class SystemConfigFileHandler
extends Object
implements SystemConfigHandler


Constructor Summary
SystemConfigFileHandler()
           
 
Method Summary
 Set getParameterNames()
          Get the names of the parameters this handler requires.
 SystemConfig loadConfig()
          Load the system configuration.
static SystemConfig readConfiguration(InputStream inputStream)
          Reads a system configuration from the supplied InputStream.
static SystemConfig readConfiguration(Reader reader)
          Reads a system configuration from the supplied Reader.
 void setParameters(Map parameters)
          Set the parameters for this handler.
 void storeConfig(SystemConfig config)
          Store the system configuration.
static void writeConfiguration(SystemConfig config, OutputStream outputStream)
          Writes the specified system configuration to the supplied OutputStream.
static void writeConfiguration(SystemConfig config, Writer writer)
          Writes the specified system configuration to the supplied Writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemConfigFileHandler

public SystemConfigFileHandler()
Method Detail

setParameters

public void setParameters(Map parameters)
Description copied from interface: SystemConfigHandler
Set the parameters for this handler.

Specified by:
setParameters in interface SystemConfigHandler
Parameters:
parameters - a map of parameter names to their values
See Also:
SystemConfigHandler.getParameterNames()

getParameterNames

public Set getParameterNames()
Description copied from interface: SystemConfigHandler
Get the names of the parameters this handler requires.

Specified by:
getParameterNames in interface SystemConfigHandler

loadConfig

public SystemConfig loadConfig()
                        throws IOException
Description copied from interface: SystemConfigHandler
Load the system configuration.

Specified by:
loadConfig in interface SystemConfigHandler
Returns:
the SystemConfig
Throws:
IOException

storeConfig

public void storeConfig(SystemConfig config)
                 throws IOException
Description copied from interface: SystemConfigHandler
Store the system configuration.

Specified by:
storeConfig in interface SystemConfigHandler
Parameters:
config - the SystemConfig
Throws:
IOException

readConfiguration

public static SystemConfig readConfiguration(InputStream inputStream)
                                      throws IOException
Reads a system configuration from the supplied InputStream. Before calling this method, one should set the system property org.xml.sax.driver to the name of a class that implements the interface org.xml.sax.XMLReader. This method does not close the supplied InputStream, this is the responsibility of the caller.

Throws:
IOException

readConfiguration

public static SystemConfig readConfiguration(Reader reader)
                                      throws IOException
Reads a system configuration from the supplied Reader. Before calling this method, one should set the system property org.xml.sax.driver to the name of a class that implements the interface org.xml.sax.XMLReader. This method does not close the supplied Reader, this is the responsibility of the caller.

Throws:
IOException

writeConfiguration

public static void writeConfiguration(SystemConfig config,
                                      OutputStream outputStream)
                               throws IOException
Writes the specified system configuration to the supplied OutputStream. This method does not close the supplied OutputStream, this is the responsibility of the caller.

Throws:
IOException

writeConfiguration

public static void writeConfiguration(SystemConfig config,
                                      Writer writer)
                               throws IOException
Writes the specified system configuration to the supplied Writer. This method does not close the supplied Writer, this is the responsibility of the caller.

Throws:
IOException


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