code: public void writeReferences() throws RDFHandlerException {
  		Iterator<Reference> referenceIterator = this.referenceQueue.iterator();
  		for (Resource resource : this.referenceSubjectQueue) {
  			final Reference reference = referenceIterator.next();
  			if (this.declaredReferences.add(resource)) {
  				writeReference(reference, resource);
  			}
  		}
  		this.referenceSubjectQueue.clear();
  		this.referenceQueue.clear();
  
  		this.snakRdfConverter.writeAuxiliaryTriples();
  	}
docs: Writes references that have been added recently. Auxiliary triples that
  are generated for serializing snaks in references will be written right
  afterwards. This will also trigger any other auxiliary triples to be
  written that the snak converter object may have buffered.
  
  @throws RDFHandlerException
  if there was a problem writing the restrictions