function dmdHeaderRDF(){ $app = Slim\Slim::getInstance(); ob_start(); $project = $_SESSION['project']; $format = $_SESSION['format']; $mimeType = array( 'xml' => 'text/xml', 'rdfxml' => 'application/rdf+xml', 'jsonld' => 'application/ld+json', 'turtle' => 'text/turtle', 'ntriples' => 'application/n-triples' ); if(!array_key_exists($format, $mimeType)){ $app->flash('error', '指定された出力形式が不正です。'); throw new RuntimeException('指定された出力形式が不正です。'); } $created = getYmd($project['dct:created']); if(!empty($project['dct:license'])){ $license_uri = getLincenseURI($project['dct:license'], $app->config('license')); }else{ $license_uri = ''; } $dataName = 'convertedData.' . $format; $dataType = $mimeType[$format]; ?> @prefix owl: <http://www.w3.org/2002/07/owl#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix dcterms: <http://purl.org/dc/terms/>. @prefix adms: <http://www.w3.org/ns/adms#>. @prefix dcat: <http://www.w3.org/ns/dcat#>. @prefix dmd: <http://imi.ipa.go.jp/ns/dmd#>. <http://example.org/imins/<?php echo $project['_id']; ?>> a adms:Asset ; dcterms:type dmd:DataModelDescription ; dcterms:issued "<?php echo $created; ?>"^^xsd:date ; dcterms:description "<?php if(!empty($project['dct:description'])){ echo htmlspecialchars($project['dct:description']); }?>"@ja ; dcterms:publisher "<?php echo htmlspecialchars($project['dct:creator']); ?>"@ja ; dcterms:title "<?php echo htmlspecialchars($project['rdfs:label']); ?>"@ja ; dcterms:license <<?php echo $license_uri; ?>> ; dcat:distribution <header.ttl> ; dcat:distribution <header.xml> ; dcat:distribution <schema.xsd> ; dcat:distribution <mapping.json> ; dcat:distribution <<?php echo $dataName; ?>> . <header.ttl> a adms:AssetDistribution ; dcat:mediaType "text/turtle" . <header.xml> a adms:AssetDistribution ; dcat:mediaType "text/xml" . <schema.xsd> a adms:AssetDistribution ; dcat:mediaType "text/xml" . <mapping.json> a adms:AssetDistribution ; dcat:mediaType "application.json" . <<?php echo $dataName; ?>> a adms:AssetDistribution ; dcat:mediaType "<?php echo $dataType; ?>" . <?php $rdf = ob_get_contents(); ob_end_clean(); return $rdf; }
</ul> <?php if (!empty($project['dct:license'])): ?> <p class="dct_rights"> <a href="<?php echo $data['static_path']; ?>?license=<?php echo urlencode($project['dct:license']); ?>"> <?php echo getCCicons($project['dct:license']); ?> </a> </p> <?php endif; if (!empty($project['dct:created'])): ?> <p class="dct_created"> 作成日: <?php echo getYmd($project['dct:created']); ?> </p> <?php endif; ?> <? if(isset($project['eg:headerLabel'])): ?> <p>ヘッダラベル</p> <? foreach((array)$project['eg:headerLabel'] as $v):; ?> <span class="label label-default"><?php echo htmlspecialchars($v, ENT_QUOTES, 'UTF-8'); ?></span> <?php endforeach; endif; ?> </div>
?license=<?php echo urlencode($value['dct:license']); ?> "> <?php echo getCCicons($value['dct:license']); ?> </a> </p> <?php } if (!empty($value['dct:created'])) { ?> <p class="dct_created"> 作成日: <?php echo getYmd($value['dct:created']); ?> </p> <?php } ?> </div> <? if(isset($value['eg:headerLabel'])): ?> <div class="col-md-2"> <div class="btn-group btn-block download"> <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <span class="glyphicon glyphicon-download-alt"></span> 入力フォームのダウンロード </button>