code: function(input, subjects, bnodes)
  {
     if(input === null)
     {
        // nothing to collect
     }
     else if(input.constructor === Array)
     {
        for(var i in input)
        {
           _collectSubjects(input[i], subjects, bnodes);
        }
     }
     else if(input.constructor === Object)
     {
        if('@id' in input)
        {
           // graph literal/disjoint graph
           if(input['@id'].constructor == Array)
           {
              _collectSubjects(input['@id'], subjects, bnodes);
           }
           // named subject
           else if(_isSubject(input))
           {
              subjects[input['@id']] = input;
           }
        }
        // unnamed blank node
        else if(_isBlankNode(input))
        {
           bnodes.push(input);
        }
        
        // recurse through subject properties
        for(var key in input)
        {
           _collectSubjects(input[key], subjects, bnodes);
        }
     }
  }
docs: Populates a map of all named subjects from the given input and an array
  of all unnamed bnodes (includes embedded ones).
  
  @param input the input (must be expanded, no context).
  @param subjects the subjects map to populate.
  @param bnodes the bnodes array to populate.