Class MaterializeRDFViewFromRML
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.jena.cmd.ArgDeclprotected final org.apache.jena.cmd.ArgDeclprotected final org.apache.jena.cmd.ArgDeclprotected final arq.cmdline.ModLangOutputprotected final arq.cmdline.ModTimeFields inherited from class arq.cmdline.CmdARQ
cmdStrictMode, modContextFields inherited from class org.apache.jena.cmd.CmdGeneral
cmdName, modGeneral, modVersionFields inherited from class org.apache.jena.cmd.CmdLineArgs
argMap, args, positionals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMaterializeRDFViewFromRML(String[] argv) Constructor that initializes the command-line tool with necessary argument modules for output format and timing options and defines command-line options for the RML mapping file, output destination and base IRI. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexec()Parses command-line arguments and prepares execution parameters for the RML materialization process.protected voidexec(org.apache.jena.rdf.model.Model rmlDescr, org.apache.jena.graph.Node baseIRI, OutputStream out) Executes the RML materialization process.protected StringReturns the usage summary string of the command, showing the required and optional arguments.static voidMain entry point of the tool, accepting command-line arguments to specify the mapping details and output format options.Methods inherited from class arq.cmdline.CmdARQ
getCommandName, processModulesAndArgsMethods inherited from class org.apache.jena.cmd.CmdGeneral
add, addModule, getUsage, help, isDebug, isQuiet, isVerbose, printHelp, usage, usageMethods inherited from class org.apache.jena.cmd.CmdArgModule
processMethods inherited from class org.apache.jena.cmd.CmdMain
cmdError, cmdError, mainAndExit, mainMethod, mainRun, mainRun, mainRunMethods inherited from class org.apache.jena.cmd.CmdLineArgs
add, add, add, addArg, addArg, addPositional, clear, contains, contains, containsMultiple, containsMultiple, getArg, getArg, getNumPositional, getPositional, getPositionalArg, getPositionalOrStdin, getValue, getValue, getValues, getValues, handleUnrecognizedArg, hasArg, hasArg, hasArgs, hasPositional, hasValueOfFalse, hasValueOfTrue, indirect, indirect, matchesIndirect, matchesIndirect, removeArg, removeArg, removeArgAll, reset, toStringMethods inherited from class org.apache.jena.cmd.CommandLineBase
apply, getArg, getArgList, setArgs
-
Field Details
-
modTime
protected final arq.cmdline.ModTime modTime -
modLangOut
protected final arq.cmdline.ModLangOutput modLangOut -
argRdfFile
protected final org.apache.jena.cmd.ArgDecl argRdfFile -
argOutputToFile
protected final org.apache.jena.cmd.ArgDecl argOutputToFile -
argBaseIRI
protected final org.apache.jena.cmd.ArgDecl argBaseIRI
-
-
Constructor Details
-
MaterializeRDFViewFromRML
Constructor that initializes the command-line tool with necessary argument modules for output format and timing options and defines command-line options for the RML mapping file, output destination and base IRI.- Parameters:
argv- Command-line arguments.
-
-
Method Details
-
main
Main entry point of the tool, accepting command-line arguments to specify the mapping details and output format options.- Parameters:
args- Command-line arguments.
-
getSummary
Returns the usage summary string of the command, showing the required and optional arguments.- Specified by:
getSummaryin classorg.apache.jena.cmd.CmdGeneral- Returns:
- A string that describes the usage of the command.
-
exec
protected void exec()Parses command-line arguments and prepares execution parameters for the RML materialization process.This includes loading the RML mapping file into a Jena Model, determining the base IRI and configuring the output destination. The actual materialization logic is delegated to
exec(Model, Node, OutputStream).- Specified by:
execin classorg.apache.jena.cmd.CmdMain
-
exec
protected void exec(org.apache.jena.rdf.model.Model rmlDescr, org.apache.jena.graph.Node baseIRI, OutputStream out) Executes the RML materialization process.The method performs the full pipeline of reading an RDF file containing RML triples maps, converting each triples map into a mapping expression, combining all expressions into a single union expression and evaluating the resulting mapping against a fixed JSON data source.
The evaluation result is transformed into an RDF dataset, which is then serialized and written either to standard output or to a user-specified file. Optionally, a base IRI can be provided for the mapping process; otherwise, a default base IRI is used.
-