in short, yes.
On Sat, Nov 12, 2016 at 3:14 PM, kumar rohit wrote:
> So it means if we have to get instances of Student, both methods can be
> used.?
>
> On Sat, Nov 12, 2016 at 4:15 PM, Claude Warren wrote:
>
> > Your statement
> >
> >
So it means if we have to get instances of Student, both methods can be
used.?
On Sat, Nov 12, 2016 at 4:15 PM, Claude Warren wrote:
> Your statement
>
> model.listResourcesWithProperty(RDF.type, std)
>
> will list all the studen resources in the graph
>
> the statement:
>
>
Kumar,
> Thank you Lorenz.
>
> I have *OntClass std = model.getOntClass(ns + "Student");*
>
> for (Iterator i = model.listResourcesWithProperty(RDF.type, std);
> i.hasNext();) {
>model.listStatements(null,RDF.type, "Student");
Again, classes in RDF are identified by URIs,
Your statement
model.listResourcesWithProperty(RDF.type, std)
will list all the studen resources in the graph
the statement:
model.listStatements(null,RDF.type, "Student");
will probably list nothing given what I think you have in the graph as you
probably don't have any statements where the
Thank you Lorenz.
I have *OntClass std = model.getOntClass(ns + "Student");*
for (Iterator i = model.listResourcesWithProperty(RDF.type, std);
i.hasNext();) {
model.listStatements(null,RDF.type, "Student");
System.out.println("Student: " + i.next());
}
I read
On 10/11/16 15:58, kumar rohit wrote:
Thank you Chris and Soroka.
I have read this and could not understand it properly, that is why I asked
the question here. I will be happy if some one give an example with
model.listResourcesWithProperty()
used in it.
What didn't you understand?
It's
On 10/11/16 15:32, kumar rohit wrote:
What is mean my model.listResourcesWithProperty()?
What it accepts as parameters and what it returns as output?
Read the javadoc.
Or look at the source.
Chris
--
"We are on the brink of a new era, if only --" /The Beiderbeck Affair/