You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2012/09/09 15:07:07 UTC

[jira] [Created] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Claude Warren created JENA-319:
----------------------------------

             Summary: If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
                 Key: JENA-319
                 URL: https://issues.apache.org/jira/browse/JENA-319
             Project: Apache Jena
          Issue Type: Bug
            Reporter: Claude Warren


If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.

JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne resolved JENA-319.
--------------------------------

    Resolution: Not A Problem
      Assignee: Andy Seaborne

This is not a bug.

Jena does not resolve URIs through the API (it's expensive for one thing if proper checking is done - the Jena IRI library exists because of the need for a good checking library).  API calls can be made at frequency.

<uri> in the query string is a relative URI and is resolved relative to the base of the query (defaults to the current working directory of the process).

dataset.addNamedModel("uri", m) puts in an absolute (and badly formed) URI.

GRAPH <uri> { ... }
is 
GRAPH <file:///dir/uri> { ... }
after parsing.

try looking at the output of "qparse -print=op 'SELECT * { GRAPH <uri> { ?s ?p ?o }}'

                
> If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-319
>                 URL: https://issues.apache.org/jira/browse/JENA-319
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>         Attachments: DatasetGraphNameTest.java
>
>
> If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.
> JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451625#comment-13451625 ] 

Andy Seaborne commented on JENA-319:
------------------------------------

I think this is a good point for JENA-189 (Jena3 /technical).

None of the API calls resolve IRIs nor require absolute IRIs.  It's historical - addNamedModel simply follows what all the API calls do.

The same happens with

SELECT * { <s> ?p ?o }

SPARQL parsing will resolve <s>, but createResource("s") does not.

Resolving isn't complete straight forward (or cheap).  API calls can be expected to be much higher frequence than SPARQL queries.

Requiring absolute IRIs in the first place as a policy is one design to follow and personally, I favour using an IRI object, not strings, which requires absolute IRIs.  Resolution relative to the current local directory isn't very webby.

                
> If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-319
>                 URL: https://issues.apache.org/jira/browse/JENA-319
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>         Attachments: DatasetGraphNameTest.java
>
>
> If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.
> JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Posted by "Claude Warren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claude Warren updated JENA-319:
-------------------------------

    Attachment: DatasetGraphNameTest.java

Test case that shows failure in specified case.
                
> If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-319
>                 URL: https://issues.apache.org/jira/browse/JENA-319
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Claude Warren
>         Attachments: DatasetGraphNameTest.java
>
>
> If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.
> JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-319.
------------------------------

    
> If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-319
>                 URL: https://issues.apache.org/jira/browse/JENA-319
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>         Attachments: DatasetGraphNameTest.java
>
>
> If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.
> JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-319) If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.

Posted by "Claude Warren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451612#comment-13451612 ] 

Claude Warren commented on JENA-319:
------------------------------------

If  dataset.addNamedModel(uri, m)  resolves the URI relatvie to the base URI should not the query do the same thing?

I found it disconcerting that the dataset would accept a "uri" but when trying to retrieve the same uri in a query it failed.

Perhaps the addNamedModel() should ensure that the uri is valid?
                
> If the URI for the named graph in a Dataset does not contain a colon ":" it is accepted but can not be retrieved.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-319
>                 URL: https://issues.apache.org/jira/browse/JENA-319
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>         Attachments: DatasetGraphNameTest.java
>
>
> If dataset.addNamedModel(uri, m) is called and 'uri' does not have a colon the query select * { graph <uri> { ?s ?o ?p }} does not return any results even though select ?g { graph ?g { ?s ?o ?p }} will return the uri as ?g.
> JUnit based test case attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira