commit 55416f9d0386b4620012bd3cc5dfae75f8a83df3
parent b0faf03111747afdd3b68de212073b019e7190db
Author: Dan Callaghan <djc@djc.id.au>
Date: Mon, 16 Nov 2009 23:35:29 +1000
generics in new Jena, yay
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/java/au/com/miskinhill/rdftemplate/selector/TypePredicate.java b/src/main/java/au/com/miskinhill/rdftemplate/selector/TypePredicate.java
@@ -1,7 +1,5 @@
package au.com.miskinhill.rdftemplate.selector;
-import java.util.Set;
-
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
@@ -26,7 +24,6 @@ public class TypePredicate implements Predicate {
return localName;
}
- @SuppressWarnings("unchecked")
@Override
public boolean evaluate(RDFNode node) {
if (!node.isResource()) {
@@ -34,7 +31,7 @@ public class TypePredicate implements Predicate {
}
Resource resource = (Resource) node;
Resource type = resource.getModel().createResource(namespace + localName);
- for (Statement statement: (Set<Statement>) resource.listProperties(RDF.type).toSet()) {
+ for (Statement statement: resource.listProperties(RDF.type).toSet()) {
if (statement.getObject().equals(type))
return true;
}