commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMMONSRDF-66) JenaDatasetImpl.toString() throws RIOT exception
Date Tue, 31 Oct 2017 01:19:00 GMT

    [ https://issues.apache.org/jira/browse/COMMONSRDF-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226090#comment-16226090
] 

ASF GitHub Bot commented on COMMONSRDF-66:
------------------------------------------

Github user christopher-johnson commented on a diff in the pull request:

    https://github.com/apache/commons-rdf/pull/42#discussion_r147875892
  
    --- Diff: jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java ---
    @@ -149,7 +149,7 @@ public long size() {
         @Override
         public String toString() {
             final StringWriter sw = new StringWriter();
    -        RDFDataMgr.write(sw, graph, Lang.NT);
    --- End diff --
    
    right.  would something like this be ok?  
    ```java
        private final DatasetGraph dg;
    
        JenaDatasetImpl(final DatasetGraph datasetGraph, final UUID salt) {
            this.dg = datasetGraph;
            this.salt = salt;
            this.factory = new JenaRDF(salt);
        }
    ```
    so `dg` is the private variable, and `datasetGraph` is only used in the constructor to
match InternalJenaFactory.


> JenaDatasetImpl.toString() throws RIOT exception
> ------------------------------------------------
>
>                 Key: COMMONSRDF-66
>                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-66
>             Project: Apache Commons RDF
>          Issue Type: Bug
>          Components: jena
>    Affects Versions: 0.3.0
>            Reporter: Christopher Johnson
>
> Occurs from this method [https://github.com/apache/commons-rdf/blob/master/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java#L152]
on instantiation:
> The exception message is "No dataset writer for N-Triples/utf-8".
> The source is RDFWriterRegistry that builds a registryDataset HashMap of 17 +Dataset+
RDFFormats that does not include this serialization.  The registryGraph HashMap has 25 RDFFormats
that does include "N-Triples/utf-8".
> No exception is thrown if Lang.NQUADS is set in the toString() method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message