Reputation: 81
I have very little knowledge about Jena. How should I create a method to get resources of a specific type?
public static String[] getResourcesOfType(String typeName)
{
...
}
Upvotes: 2
Views: 867
Reputation: 16630
SELECT * { ?x a <typeURI> }
where "a" is the short form of rdf:type.
Or use
model.listStatements(null, RDF.type, <ResourceForTheType>)
Upvotes: 3