Package se.liu.ida.hefquin.cli
Class MaterializeRDFViewOfLPG
java.lang.Object
org.apache.jena.cmd.CommandLineBase
org.apache.jena.cmd.CmdLineArgs
org.apache.jena.cmd.CmdMain
org.apache.jena.cmd.CmdArgModule
org.apache.jena.cmd.CmdGeneral
arq.cmdline.CmdARQ
se.liu.ida.hefquin.cli.MaterializeRDFViewOfLPG
public class MaterializeRDFViewOfLPG
extends arq.cmdline.CmdARQ
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Collects the emitted triples into a graph and writes this graph to the givenOutputStream
upon calling theMaterializeRDFViewOfLPG.MyCachingStreamRDF.finish()
function. -
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.jena.cmd.ArgDecl
protected final arq.cmdline.ModLangOutput
protected final ModLPG2RDFConfiguration
protected final arq.cmdline.ModTime
Fields inherited from class arq.cmdline.CmdARQ
cmdStrictMode, modContext
Fields inherited from class org.apache.jena.cmd.CmdGeneral
cmdName, modGeneral, modVersion
Fields inherited from class org.apache.jena.cmd.CmdLineArgs
argMap, args, positionals
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
exec()
protected List<TableRecord>
execQuery
(CypherQuery query, String neo4jEndpointURI) protected String
static void
protected org.apache.jena.riot.system.StreamRDF
setupOutputStream
(OutputStream outStreamBase) protected void
writeTriplesForEdges
(List<TableRecord> edgesResponse, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) protected void
writeTriplesForNodes
(List<TableRecord> nodesResponse, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) protected void
writeTriplesForProperties
(org.apache.jena.graph.Node subject, PropertyMap properties, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) Creates and writes a triple for each of the properties of the givenPropertyMap
using the given subject for these triples.Methods inherited from class arq.cmdline.CmdARQ
getCommandName, processModulesAndArgs
Methods inherited from class org.apache.jena.cmd.CmdGeneral
add, addModule, getUsage, help, isDebug, isQuiet, isVerbose, printHelp, usage, usage
Methods inherited from class org.apache.jena.cmd.CmdArgModule
process
Methods inherited from class org.apache.jena.cmd.CmdMain
cmdError, cmdError, mainAndExit, mainMethod, mainRun, mainRun, mainRun
Methods inherited from class org.apache.jena.cmd.CmdLineArgs
add, add, add, addArg, addArg, addPositional, 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, toString
Methods 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 -
modLPG2RDFConfiguration
-
argEndpointURI
protected final org.apache.jena.cmd.ArgDecl argEndpointURI
-
-
Constructor Details
-
MaterializeRDFViewOfLPG
-
-
Method Details
-
main
-
getSummary
- Specified by:
getSummary
in classorg.apache.jena.cmd.CmdGeneral
-
exec
protected void exec()- Specified by:
exec
in classorg.apache.jena.cmd.CmdMain
-
buildGetNodesQuery
-
buildGetEdgesQuery
-
execQuery
-
writeTriplesForNodes
protected void writeTriplesForNodes(List<TableRecord> nodesResponse, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) -
writeTriplesForEdges
protected void writeTriplesForEdges(List<TableRecord> edgesResponse, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) -
writeTriplesForProperties
protected void writeTriplesForProperties(org.apache.jena.graph.Node subject, PropertyMap properties, LPG2RDFConfiguration l2rConf, org.apache.jena.riot.system.StreamRDF rdfOutStream) Creates and writes a triple for each of the properties of the givenPropertyMap
using the given subject for these triples.- Parameters:
subject
- - used as subject of the created triplesproperties
- - the properties for which the triples are createdl2rConf
- - LPG-to-RDF configuration that specifies the IRIs for the property namesrdfOutStream
- - stream to which the created triples are written
-
setupOutputStream
-