code: protected boolean isBNodeReferenced(BNode object) {
  	Collection<HashMap<QualifiedName, List<Statement>>> contexts = collators.values();
  	for (HashMap<QualifiedName, List<Statement>> context : contexts) {
  	    for (QualifiedName subject : context.keySet()) {
  		List<Statement> statements = context.get(subject);
  		for (Statement statement : statements) {
  		    Value value = statement.getObject();
  		    QualifiedName pred = convertURIToQualifiedName(statement.getPredicate());
  		    if (QUAL_PREDS.contains(pred)) {
  			continue;
  		    }
  
  		    if (value instanceof BNode) {
  			if (value.equals(object)) {
  			    return true;
  			}
  		    } /* else if (value instanceof javax.xml.namespace.qualifiedName) {
  			javax.xml.namespace.qualifiedName qualifiedName = (javax.xml.namespace.qualifiedName) value;
  			if (qualifiedName.getNamespaceURI().equals(BNODE_NS)
  				&& qualifiedName.getLocalPart().equals(object.getID())) {
  			    return true;
  			}
  		    } */  else if (value instanceof QualifiedName) {
  			QualifiedName qualifiedName = (QualifiedName) value;
  			if (qualifiedName.getNamespaceURI().equals(BNODE_NS)
  				&& qualifiedName.getLocalPart().equals(object.getID())) {
  			    return true;
  			}
  		    } else if (value instanceof Resource) {
  			QualifiedName qualifiedName = convertResourceToQualifiedName((Resource) value);
  			if (qualifiedName.getNamespaceURI().equals(BNODE_NS)
  				&& qualifiedName.getLocalPart().equals(object.getID())) {
  			    return true;
  			}
  		    } else {	
  			
  		    }
  		}
  	    }
  	}
  
  	return false;
      }
docs: /* Utility functions