コード例 #1
0
ファイル: ResModel.php プロジェクト: p4535992/programate
 /** 
  * Returns a new Model that is the set-union of the model with another model.
  * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
  *
  * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) 
  * is another graph, which we will call the merge of the graphs. 
  * Each of the original graphs is a subgraph of the merged graph. Notice that when forming 
  * a merged graph, two occurrences of a given uriref or literal as nodes in two different 
  * graphs become a single node in the union graph (since by definition they are the same 
  * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course 
  * never merged. In particular, this means that every blank node in a merged graph can be 
  * identified as coming from one particular graph in the original set of graphs.
  * 
  * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating 
  * their corresponding N-triples documents and constructing the graph described by the merged 
  * document, since if some of the documents use the same node identifiers, the merged document 
  * will describe a graph in which some of the blank nodes have been 'accidentally' merged. 
  * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or 
  * more documents, and to replace it with a distinct nodeID in each of them, before merging the 
  * documents. (Not implemented yet !!!!!!!!!!!)
  *
  * @param	object Model	$model
  * @return	object MemModel
  * @access	public
  * @throws phpErrpr
  *
  */
 function &unite(&$model)
 {
     if (is_a($model, 'ResModel')) {
         return $this->model->unite($model->getModel());
     }
     return $this->model->unite($model);
 }