Example #1
0
 static Set<BlankNode> getBNodes(Collection<Triple> s) {
   Set<BlankNode> result = new HashSet<BlankNode>();
   for (Triple triple : s) {
     if (triple.getSubject() instanceof BlankNode) {
       result.add((BlankNode) triple.getSubject());
     }
     if (triple.getObject() instanceof BlankNode) {
       result.add((BlankNode) triple.getObject());
     }
   }
   return result;
 }
Example #2
0
 private static boolean isGrounded(Triple triple) {
   if (triple.getSubject() instanceof BlankNode) {
     return false;
   }
   if (triple.getObject() instanceof BlankNode) {
     return false;
   }
   return true;
 }