org.d2rq
Class SystemLoader
java.lang.Object
org.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: D2RQReader.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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
SystemLoader
public SystemLoader()
loadMapping
public static CompiledMapping loadMapping(String mappingFileNameOrURL,
String baseIRI)
createMapping
public static CompiledMapping createMapping(Model mappingModel,
String baseIRI)
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)
setUseServerConfig
public void setUseServerConfig(boolean flag)
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)
setMappingFile
public void setMappingFile(String mappingFile)
getSQLConnection
public SQLConnection getSQLConnection()
getMappingGenerator
public MappingGenerator getMappingGenerator()
setMappingModel
public void setMappingModel(Model mapModel)
getMappingModel
public Model getMappingModel()
getMapping
public CompiledMapping getMapping()
getR2RMLReader
public R2RMLReader getR2RMLReader()
getModelD2RQ
public Model getModelD2RQ()
getGraphD2RQ
public Graph getGraphD2RQ()
getJettyLauncher
public JettyLauncher getJettyLauncher()
getServerConfig
public ConfigLoader getServerConfig()
getD2RServer
public D2RServer getD2RServer()
resetMappingFile
public void resetMappingFile()
close
public void close()
- Closes any created
SQLConnection
s and any other created resources.