[
https://issues.apache.org/jira/browse/JENA-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16270620#comment-16270620
]
ASF GitHub Bot commented on JENA-1430:
--------------------------------------
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/314#discussion_r153758968
--- Diff:
jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetAssembler.java
---
@@ -57,28 +65,31 @@ public Dataset createDataset(Assembler a, Resource
root, Mode mode) {
else
// Assembler description did not define one.
dftModel = GraphFactory.makeDefaultModel() ;
- Dataset ds = DatasetFactory.create(dftModel) ;
- // -------- Named graphs
- List<RDFNode> nodes = GraphUtils.multiValue(root,
DatasetAssemblerVocab.pNamedGraph) ;
- for ( RDFNode n : nodes ) {
- if ( !(n instanceof Resource) )
- throw new DatasetAssemblerException(root, "Not a resource:
" + FmtUtils.stringForRDFNode(n));
- Resource r = (Resource)n;
+ Dataset ds = DatasetFactory.create(dftModel);
- String gName = GraphUtils.getAsStringValue(r,
DatasetAssemblerVocab.pGraphName);
- Resource g = GraphUtils.getResourceValue(r,
DatasetAssemblerVocab.pGraph);
- if ( g == null ) {
- g = GraphUtils.getResourceValue(r,
DatasetAssemblerVocab.pGraphAlt);
- if ( g != null ) {
- Log.warn(this, "Use of old vocabulary: use :graph not
:graphData");
- } else {
- throw new DatasetAssemblerException(root, "no graph
for: " + gName);
+ Txn.executeWrite(ds, () -> {
--- End diff --
Side note: Because the general dataset can't support abort, a `Txn` is nice
but of little help; if anything goes wrong assembling, it's broken.
> Quad loading for in-memory assemblers
> -------------------------------------
>
> Key: JENA-1430
> URL: https://issues.apache.org/jira/browse/JENA-1430
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Reporter: A. Soroka
> Assignee: A. Soroka
>
> In-memory dataset Assemblers should support loading quad files.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)