Exemplo n.º 1
0
 /**
  * Serialize the model and write the contents to a file.
  *
  * @param   LibRDF_Serializer   $serializer The serializer to use
  * @param   string              $file_name  The name of the file to which to write
  * @param   string              $base_uri   The base URI to use
  * @return  void
  * @throws  LibRDF_Error        If unable to serialize the model
  * @access  public
  */
 public function serializeStatementsToFile(LibRDF_Serializer $serializer, $file_name, $base_uri = NULL)
 {
     if ($base_uri) {
         $base_uri = new LibRDF_URI($base_uri);
     }
     $ret = librdf_serializer_serialize_model_to_file($serializer->getSerializer(), $file_name, $base_uri ? $base_uri->getURI() : $base_uri, $this->model);
     if ($ret) {
         throw new LibRDF_Error("Error serializing model to file");
     }
 }