|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxsmeral.pipe.AbstractObjectProcessor
xsmeral.pipe.LocalObjectSink<Statement>
xsmeral.semnet.sink.SesameWriter
@ObjectProcessorInterface(in=org.openrdf.model.Statement.class) public class SesameWriter
Writes Statements to a Sesame database.
The connection to database is configured using a configured RepositoryFactory
implementation.
The configuration is read from a Properties file that should contain fields:
connFactory
- with a value of fully-qualified name of a
RepositoryFactory implementationRepositoryFactory.PROP_WORKING_DIR
is set to the value of current working directory (used by implementations
that use file system to resolve relative file names).
bootstrap
initialization parameter, like in the following example:
<processor ...bootstrap="file1.rdf:RDFXML,file2.n3:N3"...>...or more generally
file[:type][,file[:type]...]where
type
refers to a constant defined in Sesame's RDFFormat
.
If the type is not specified, it is guessed from the file name extension.
RepositoryFactory
conf
- Name of Properties file containing configuration of Repositorybootstrap
- (Optional) Names of files (comma-separated) containing statements that should be added
to the database prior to running. Format for the parameter specified in description
of this class.bootBase
- (Optional) Only applies if bootstrap is used; specifies the base
URI for any relative URIs in the bootstrapped files. Default is a reference to
runtime directory.Nested Class Summary |
---|
Nested classes/interfaces inherited from interface xsmeral.pipe.interfaces.ObjectProcessor |
---|
xsmeral.pipe.interfaces.ObjectProcessor.Status |
Field Summary | |
---|---|
static String |
BOOTSTRAP_OLD_SUFFIX
|
Fields inherited from class xsmeral.pipe.LocalObjectSink |
---|
prev |
Fields inherited from class xsmeral.pipe.AbstractObjectProcessor |
---|
canStart, context, status |
Constructor Summary | |
---|---|
SesameWriter()
|
|
SesameWriter(RepositoryConnection conn)
Initializes with the specified connection. |
Method Summary | |
---|---|
protected void |
initPostContext()
Reads the supplied configuration (Properties) file, sets working directory, initializes repository factory. |
protected void |
postRun()
Closes the connection. |
protected void |
process()
Adds a read statement to the database. |
Methods inherited from class xsmeral.pipe.LocalObjectSink |
---|
getPrev, handleStoppedSource, prev, read, requestStop |
Methods inherited from class xsmeral.pipe.AbstractObjectProcessor |
---|
canStart, failStart, failStart, failStart, getContext, getInType, getOutType, getParams, getStatus, initContext, initContextSet, initialize, initializeInternal, initWithContext, preRun, run, setContext, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface xsmeral.pipe.interfaces.ObjectSink |
---|
getInType |
Field Detail |
---|
public static final String BOOTSTRAP_OLD_SUFFIX
Constructor Detail |
---|
public SesameWriter()
public SesameWriter(RepositoryConnection conn)
Method Detail |
---|
protected void initPostContext()
initPostContext
in class xsmeral.pipe.AbstractObjectProcessor
RepositoryFactory
protected void process() throws xsmeral.pipe.ProcessorStoppedException
process
in class xsmeral.pipe.LocalObjectSink<Statement>
xsmeral.pipe.ProcessorStoppedException
protected void postRun()
postRun
in class xsmeral.pipe.AbstractObjectProcessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |