Package org.aksw.jenax.engine.qlever
Class RDFDatabaseBuilderQlever<X extends RDFDatabaseBuilderQlever<X>>
java.lang.Object
org.aksw.jenax.engine.qlever.RDFDatabaseBuilderQlever<X>
- All Implemented Interfaces:
org.aksw.commons.util.obj.HasSelf<X>,HasProperties<X>,RDFDatabaseBuilder<X>
public class RDFDatabaseBuilderQlever<X extends RDFDatabaseBuilderQlever<X>>
extends Object
implements RDFDatabaseBuilder<X>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord to capture arguments passed to this builderstatic final recordRecord to capture a set of files that make up a Qlever database. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<RDFDatabaseBuilderQlever.FileLoadEntry> protected QleverIndexBuilderConfigprotected StringBase path within the container where to mount any named pipes.protected org.aksw.commons.util.docker.ContainerPathResolverA resolver for host paths if the database builder is used from within docker (dind).protected org.aksw.jenax.arq.util.prefix.ShortNameMgrMapping from absolute file paths on the host names to file names.static final List<org.apache.jena.riot.Lang> static final List<org.apache.jena.riot.Lang> Langs supported by this database builder.protected org.aksw.shellgebra.exec.SysRuntime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPath(String source, org.apache.jena.riot.Lang lang, org.apache.jena.graph.Node g, Boolean splittable) protected voidaddPath(Path source, org.apache.jena.graph.Node graph, List<String> encodings, org.apache.jena.riot.Lang lang, Boolean splittable) build()Determine the types of arguments: If all files are directly nq or ttl then use them as file arguments.Build for 'v1' command line using IndexBuilderMainprotected List<org.aksw.shellgebra.algebra.cmd.arg.CmdArg> buildFileEntryArgs(Supplier<Path> hostTempPathSupp, org.aksw.shellgebra.algebra.cmd.arg.CmdArg cmdArg, org.apache.jena.graph.Node graph, org.apache.jena.riot.Lang lang) protected List<org.aksw.shellgebra.algebra.cmd.arg.CmdArg> buildInputSpec(Supplier<Path> hostTempPath) org.aksw.shellgebra.algebra.cmd.arg.CmdArg<T> TgetProperty(String key) The content types supported by the backend.protected StringlangToFormat(org.apache.jena.riot.Lang lang) setDockerImageName(String dockerImageName) setDockerImageTag(String dockerImageTag) setIndexName(String name) setOutputFolder(Path outputFolder) setParserBufferSize(String bufferSize) setProperty(String key, Object value) setStxxlMemory(String stxxlMemory) setSysRuntime(org.aksw.shellgebra.exec.SysRuntime sysRuntime) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.jenax.dataaccess.sparql.creator.HasProperties
setPropertiesMethods inherited from interface org.aksw.commons.util.obj.HasSelf
selfMethods inherited from interface org.aksw.jenax.dataaccess.sparql.creator.RDFDatabaseBuilder
addPath, addPath, addPath, addPath
-
Field Details
-
supportedInputLangs
Langs supported by this database builder. The builder may convert e.g. rdf/xml to ntriples for the backend. -
supportedBackendLangs
-
config
-
shortNameMgr
protected org.aksw.jenax.arq.util.prefix.ShortNameMgr shortNameMgrMapping from absolute file paths on the host names to file names. -
sysRuntime
protected org.aksw.shellgebra.exec.SysRuntime sysRuntime -
args
-
errorCollector
-
containerFifoPath
Base path within the container where to mount any named pipes. Must end with '/'. -
containerPathResolver
protected org.aksw.commons.util.docker.ContainerPathResolver containerPathResolverA resolver for host paths if the database builder is used from within docker (dind).
-
-
Constructor Details
-
RDFDatabaseBuilderQlever
public RDFDatabaseBuilderQlever()
-
-
Method Details
-
getSupportedBackendContentTypes
The content types supported by the backend. -
setSysRuntime
-
setDockerImageName
-
getDockerImageName
-
setDockerImageTag
-
getDockerImageTag
-
setName
- Specified by:
setNamein interfaceRDFDatabaseBuilder<X extends RDFDatabaseBuilderQlever<X>>
-
setIndexName
-
setOutputFolder
- Specified by:
setOutputFolderin interfaceRDFDatabaseBuilder<X extends RDFDatabaseBuilderQlever<X>>
-
setStxxlMemory
-
getStxxlMemory
-
setParserBufferSize
-
getParserBufferSize
-
addPath
public X addPath(String source, org.apache.jena.riot.Lang lang, org.apache.jena.graph.Node g, Boolean splittable) throws IOException - Specified by:
addPathin interfaceRDFDatabaseBuilder<X extends RDFDatabaseBuilderQlever<X>>- Throws:
IOException
-
addPath
-
convertArgToOp
public org.aksw.shellgebra.algebra.cmd.arg.CmdArg convertArgToOp(RDFDatabaseBuilderQlever.FileLoadEntry loadEntry) -
buildInputSpec
protected List<org.aksw.shellgebra.algebra.cmd.arg.CmdArg> buildInputSpec(Supplier<Path> hostTempPath) throws NoSuchFileException - Throws:
NoSuchFileException
-
buildFileEntryArgs
protected List<org.aksw.shellgebra.algebra.cmd.arg.CmdArg> buildFileEntryArgs(Supplier<Path> hostTempPathSupp, org.aksw.shellgebra.algebra.cmd.arg.CmdArg cmdArg, org.apache.jena.graph.Node graph, org.apache.jena.riot.Lang lang) throws NoSuchFileException - Throws:
NoSuchFileException
-
langToFormat
-
getFinalIndexName
-
build
Determine the types of arguments: If all files are directly nq or ttl then use them as file arguments. Otherwise, build a stream from the argument: - A mix of nq and ttl is not supported. - Use cat or a codec to decode files - Use a flag whether to use process substitution or command grouping.- Specified by:
buildin interfaceRDFDatabaseBuilder<X extends RDFDatabaseBuilderQlever<X>>- Returns:
- Throws:
IOExceptionInterruptedException
-
build
public RdfDatabaseQlever build(String finalImageName, String indexBuilderCommand) throws IOException, InterruptedException Build for 'v1' command line using IndexBuilderMain- Throws:
IOExceptionInterruptedException
-
setProperty
- Specified by:
setPropertyin interfaceHasProperties<X extends RDFDatabaseBuilderQlever<X>>
-
getProperty
- Specified by:
getPropertyin interfaceHasProperties<X extends RDFDatabaseBuilderQlever<X>>
-