de.fuberlin.wiwiss.d2rq
Class SystemLoader

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.SystemLoader

public class SystemLoader
extends Object

Factory for MappingGenerators, ModelD2RQs and the like. Many of these artifacts can be configured in multiple ways (from the command line, from configuration files, etc.), and creating one may require that others are previously created and configured correctly. This class helps setting everything up correctly. TODO: MapParser.absolutizeURI(String) and ConfigLoader.toAbsoluteURI(String) and {WebappInitListener#absolutize} need to be consolidated and/or folded into this class

Author:
Richard Cyganiak (richard@cyganiak.de)

Field Summary
static String DEFAULT_BASE_URI
           
static String DEFAULT_JDBC_URL
           
 
Constructor Summary
SystemLoader()
           
 
Method Summary
 void closeMappingGenerator()
           
 ClassMapLister getClassMapLister()
           
 D2RServer getD2RServer()
           
 GraphD2RQ getGraphD2RQ()
           
 JettyLauncher getJettyLauncher()
           
 Mapping getMapping()
           
 Model getMappingModel()
           
 ModelD2RQ getModelD2RQ()
           
 int getPort()
           
 String getResourceBaseURI()
           
 ConfigLoader getServerConfig()
           
 String getSystemBaseURI()
           
 MappingGenerator openMappingGenerator()
          Returns a mapping generator.
 void resetMappingFile()
           
 void setFastMode(boolean flag)
           
 void setFilter(Filter filter)
           
 void setGenerateW3CDirectMapping(boolean flag)
           
 void setJDBCDriverClass(String driver)
           
 void setJdbcURL(String jdbcURL)
           
 void setMappingFileOrJdbcURL(String value)
           
 void setMappingURL(String mappingURL)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setResourceStem(String value)
          By default, the base URI for resolving relative URIs in data is the same as the system base URI where the server is assumed to run.
 void setResultSizeLimit(int value)
           
 void setStartupSQLScript(String sqlFile)
           
 void setSystemBaseURI(String baseURI)
           
 void setUsername(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BASE_URI

public static final String DEFAULT_BASE_URI
See Also:
Constant Field Values

DEFAULT_JDBC_URL

public static final String DEFAULT_JDBC_URL
See Also:
Constant Field Values
Constructor Detail

SystemLoader

public SystemLoader()
Method Detail

setUsername

public void setUsername(String username)

setPassword

public void setPassword(String password)

setFilter

public void setFilter(Filter filter)

setJDBCDriverClass

public void setJDBCDriverClass(String driver)

setStartupSQLScript

public void setStartupSQLScript(String sqlFile)

setGenerateW3CDirectMapping

public void setGenerateW3CDirectMapping(boolean flag)

setJdbcURL

public void setJdbcURL(String jdbcURL)

setMappingFileOrJdbcURL

public void setMappingFileOrJdbcURL(String value)

setSystemBaseURI

public void setSystemBaseURI(String baseURI)

setResourceStem

public void setResourceStem(String value)
By default, the base URI for resolving relative URIs in data is the same as the system base URI where the server is assumed to run. The resource stem can be set to something like resource/ in order to put the resources into a subdirectory of the system base.

Parameters:
value - A string relative to the system base URI

getSystemBaseURI

public String getSystemBaseURI()
Returns:
Base URI where the server is assumed to run

getResourceBaseURI

public String getResourceBaseURI()
Returns:
Base URI for making relative URIs in the RDF data absolute

setPort

public void setPort(int port)

getPort

public int getPort()

setFastMode

public void setFastMode(boolean flag)

setMappingURL

public void setMappingURL(String mappingURL)

setResultSizeLimit

public void setResultSizeLimit(int value)

openMappingGenerator

public MappingGenerator openMappingGenerator()
Returns a mapping generator. Needs to be explicitly closed using closeMappingGenerator().


closeMappingGenerator

public void closeMappingGenerator()

getMappingModel

public Model getMappingModel()

getMapping

public Mapping getMapping()

getModelD2RQ

public ModelD2RQ getModelD2RQ()

getGraphD2RQ

public GraphD2RQ getGraphD2RQ()

getClassMapLister

public ClassMapLister getClassMapLister()

getJettyLauncher

public JettyLauncher getJettyLauncher()

getServerConfig

public ConfigLoader getServerConfig()

getD2RServer

public D2RServer getD2RServer()

resetMappingFile

public void resetMappingFile()