function to_tripod_view_array($docId,$context)
    {
        $subjects = $this->get_subjects();
        $contextAlias = $this->_labeller->uri_to_alias($context);

        // view
        $doc = array();
        $doc["_id"] = array(_ID_RESOURCE=>$docId,_ID_CONTEXT=>$contextAlias);
        $doc["value"] = array();
        $doc["value"][_IMPACT_INDEX] = $subjects;
        $doc["value"][_GRAPHS] = array();
        foreach ($subjects as $subject)
        {
            $graph = $this->get_subject_subgraph($subject);
            $doc["value"][_GRAPHS][] = $this->index_to_tarray($graph,$contextAlias);
        }
        return $doc;
    }
function to_tripod_view_array($docId,$context)
    {
        $subjects = $this->get_subjects();
        $contextAlias = $this->_labeller->uri_to_alias($context);

        // view
        $doc = array();
        $doc["_id"] = array(_ID_RESOURCE=>$docId,_ID_CONTEXT=>$contextAlias);
        $doc["value"] = array();
        $doc["value"][_IMPACT_INDEX] = $subjects;
        $doc["value"][_GRAPHS] = array();
        foreach ($subjects as $subject)
        {
            $graph = $this->get_subject_subgraph($subject);
            $doc["value"][_GRAPHS][] = $this->index_to_tarray($graph,$contextAlias);
        }
        return $doc;
    }
function to_tripod_view_array ( $ docId , $ context ) { $ subjects = $ this -> get_subjects ( ) ; $ contextAlias = $ this -> _labeller -> uri_to_alias ( $ context ) ; // view $ doc = array ( ) ; $ doc [ "_id" ] = array ( _ID_RESOURCE => $ docId , _ID_CONTEXT => $ contextAlias ) ; $ doc [ "value" ] = array ( ) ; $ doc [ "value" ] [ _IMPACT_INDEX ] = $ subjects ; $ doc [ "value" ] [ _GRAPHS ] = array ( ) ; foreach ( $ subjects as $ subject ) { $ graph = $ this -> get_subject_subgraph ( $ subject ) ; $ doc [ "value" ] [ _GRAPHS ] [ ] = $ this -> index_to_tarray ( $ graph , $ contextAlias ) ; } return $ doc ; }
Returns a mongo-ready doc for views, which can have multiple graphs in the same doc
@param $docId
@param $context
@return array
Returns a mongo - ready doc for views which can have multiple graphs in the same doc