Пример #1
0
 public function actionJsonrdfd3()
 {
     /* for test */
     //        return '{"nodes":[{"name":"g:visualRDF\/","uri":"http:\/\/graves.cl\/visualRDF\/","type":"uri"},{"name":"http:\/\/alvaro.graves.cl","uri":"http:\/\/alvaro.graves.cl","type":"uri"},{"name":"http:\/\/github.com\/alangrafu\/visualRDF","uri":"http:\/\/github.com\/alangrafu\/visualRDF","type":"uri"},{"name":"g:visualRDF\/css\/bootstrap-responsive.min.css","uri":"http:\/\/graves.cl\/visualRDF\/css\/bootstrap-responsive.min.css","type":"uri"},{"name":"g:visualRDF\/css\/bootstrap.min.css","uri":"http:\/\/graves.cl\/visualRDF\/css\/bootstrap.min.css","type":"uri"}],"links":[{"source":0,"target":1,"name":"dc:creator","value":10},{"source":0,"target":2,"name":"dc:source","value":10},{"source":0,"target":3,"name":"xhtml:stylesheet","value":10},{"source":0,"target":4,"name":"xhtml:stylesheet","value":10}],"literals":{"g:visualRDF\/":[{"p":"dc:title","o":"Visual RDF","l":"","d":""},{"p":"dc:modified","o":"2012-05-18","l":"","d":""}]}}';
     //        return '{"nodes":['
     //                . '{"name":"g:visualRDF\/","uri":"http:\/\/graves.cl\/visualRDF\/","type":"uri"},'
     //                . '{"name":"http:\/\/alvaro.graves.cl","uri":"http:\/\/alvaro.graves.cl","type":"uri"},'
     //                . '{"name":"http:\/\/github.com\/alangrafu\/visualRDF","uri":"http:\/\/github.com\/alangrafu\/visualRDF","type":"uri"},'
     //                . '{"name":"g:visualRDF\/css\/bootstrap-responsive.min.css","uri":"http:\/\/graves.cl\/visualRDF\/css\/bootstrap-responsive.min.css","type":"uri"},'
     //                . '{"name":"g:visualRDF\/css\/bootstrap.min.css","uri":"http:\/\/graves.cl\/visualRDF\/css\/bootstrap.min.css","type":"uri"}'
     //                . '],'
     //                . '"links":['
     //                . '{"source":0,"target":1,"name":"dc:creator","value":10},'
     //                . '{"source":0,"target":2,"name":"dc:source","value":10},'
     //                . '{"source":0,"target":3,"name":"xhtml:stylesheet","value":10},'
     //                . '{"source":0,"target":4,"name":"xhtml:stylesheet","value":10}'
     //                . '],'
     //                . '"literals":{'
     //                . '"g:visualRDF\/":['
     //                . '{"p":"dc:title","o":"Visual RDF","l":"","d":""},'
     //                . '{"p":"dc:modified","o":"2012-05-18","l":"","d":""}'
     //                . ']}}';
     $model = new \frontend\models\ManagerSW();
     $tree = \frontend\models\Utils::conver2D3($model->swlistdataset());
     \Yii::$app->response->format = 'json';
     return $tree;
     return $this->render('listdataset', ['model' => $model]);
 }
Пример #2
0
 public function validateIDDataset($attribute, $params)
 {
     if ($this->dataset) {
         $this->dataset = Utils::clean2uri($this->dataset);
     } else {
         $this->addError($attribute, 'The country must be either "USA" or "Web".');
     }
 }