You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/05/23 16:19:01 UTC
[jira] [Commented] (JENA-702) Issues with RDF API tutorial
[ https://issues.apache.org/jira/browse/JENA-702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007189#comment-14007189 ]
ASF subversion and git services commented on JENA-702:
------------------------------------------------------
Commit 1597100 from [~andy.seaborne] in branch 'site/trunk'
[ https://svn.apache.org/r1597100 ]
JENA-702 -- nextStatement() should be nextResource()
> Issues with RDF API tutorial
> ----------------------------
>
> Key: JENA-702
> URL: https://issues.apache.org/jira/browse/JENA-702
> Project: Apache Jena
> Issue Type: Documentation
> Reporter: cyyin
> Fix For: Jena 2.11.2
>
>
> The issue is found with the RDF API tutorial on http://jena.apache.org/tutorials/rdf_api.html.
> On the "Querying a Model" section, it illustrates code snippet like:
> {noformat}
> // select all the resources with a VCARD.FN property
> ResIterator iter = model.listSubjectsWithProperty(VCARD.FN);
> if (iter.hasNext()) {
> System.out.println("The database contains vcards for:");
> while (iter.hasNext()) {
> System.out.println(" " + iter.nextStatement()
> .getProperty(VCARD.FN)
> .getString());
> }
> } else {
> System.out.println("No vcards were found in the database");
> }
> {noformat}
> But it appears to me ResIterator doesn't have a nextStatement() method. I think it should be nextResource() instead. The tutorial code is correct though.
--
This message was sent by Atlassian JIRA
(v6.2#6252)