[ 
https://issues.apache.org/jira/browse/JENA-702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne updated JENA-702:
-------------------------------

    Description: 
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.

  was:
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:

// 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");
}

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.


> 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
>
> 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)

Reply via email to