����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* ARC2 MicroRDF Serializer
*
* @author Benjamin Nowack
* @license <http://arc.semsol.org/license>
* @homepage <http://arc.semsol.org/>
* @package ARC2
* @version 2010-11-16
*/
ARC2::inc('RDFSerializer');
class ARC2_MicroRDFSerializer extends ARC2_RDFSerializer {
function __construct($a, &$caller) {
parent::__construct($a, $caller);
}
function __init() {
parent::__init();
$this->content_header = 'text/html';
$this->label_store = $this->v('label_store', '', $this->a);
}
/* */
function getLabel($res, $ps = '') {
if (!$ps) $ps = array();
foreach ($ps as $p => $os) {
if (preg_match('/[\/\#](name|label|summary|title|fn)$/i', $p)) {
return $os[0]['value'];
}
}
if (preg_match('/^\_\:/', $res)) return "An unnamed resource";
return $this->extractTermLabel($res);
return preg_replace("/^(.*[\/\#])([^\/\#]+)$/", '\\2', str_replace('_', ' ', $res));
}
function getSerializedIndex($index, $res = '') {
$r = '';
$n = "\n";
if ($res) $index = array($res => $index[$res]);
//return Trice::dump($index);
$types = $this->v($this->expandPName('rdf:type'), array(), $index);
$main_type = $types ? $types[0]['value'] : '';
foreach ($index as $s => $ps) {
/* node */
$r .= '
<div class="rdf-item" ' . $this->mdAttrs($s, $main_type) . '>
<h3 class="rdf-itemlabel"><a href="' . $s . '">' . ucfirst($this->getLabel($s, $ps)) . '</a></h3>
';
/* arcs */
foreach ($ps as $p => $os) {
$p_cls = strtolower($this->getPName($p));
$p_cls = str_replace(':', '-', $p_cls);
$r .= '
<div class="rdf-prop ' . $p_cls . '">
<a class="rdf-proplabel" href="' . $p . '">' . ucfirst($this->getLabel($p)) . ':</a>
<ul class="rdf-values">
';
$oc = count($os);
foreach ($os as $i => $o) {
$val = $this->getObjectValue($o, $p);
$cls = '';
if ($i == 0) $cls .= ($cls ? ' ' : '') . 'first';
if ($i == $oc - 1) $cls .= ($cls ? ' ' : '') . 'last';
$r .= $n . '<li' . ($cls ? ' class="' . $cls . '"' : '') . '>' . $val . '</li>';
}
$r .= '
</ul>
<div class="clb"></div>
</div>
';
}
/* /node */
$r .= '
<div class="clb"></div>
</div>
';
}
return $r;
}
function getObjectValue($o, $p) {
if ($o['type'] == 'uri') {
if (preg_match('/(jpe?g|gif|png)$/i', $o['value'])) {
return $this->getImageObjectValue($o, $p);
}
return $this->getURIObjectValue($o, $p);
}
if ($o['type'] == "bnode") {
return $this->getBNodeObjectValue($o, $p);
}
return $this->getLiteralObjectValue($o, $p);
}
function getImageObjectValue($o, $p) {
return '<img class="rdf-value" itemprop="' . $p. '" src="' . htmlspecialchars($o['value']) . '" alt="img" />';
}
function getURIObjectValue($o, $p) {
$id = htmlspecialchars($o['value']);
$label = $this->getObjectLabel($o['value']);
/* differing href */
$href = htmlspecialchars($this->v('href', $o['value'], $o));
if ($id != $href) {
return '<a class="rdf-value" itemprop="' . $p. '" href="' . $id . '" onclick="location.href=\'' . $href . '\';return false">' . $label . '</a>';
}
return '<a class="rdf-value" itemprop="' . $p. '" href="' . $id . '">' . $label . '</a>';
//$label = $o['value'];
//$label = preg_replace('/^https?\:\/\/(www\.)?/', '', $label);
}
function getBNodeObjectValue($o, $p) {
return '<div class="rdf-value" itemprop="' . $p. '" itemscope="">' . $o['value'] . '</div>';
return '<div class="rdf-value" itemprop="' . $p. '" itemscope="">An unnamed resource</div>';
}
function getLiteralObjectValue($o, $p) {
return '<div class="rdf-value" itemprop="' . $p. '">' . $o['value'] . '</div>';
}
/* */
function getObjectLabel($id) {
$r = $this->extractTermLabel($id);
if (!$this->label_store) return $r;
$q = '
SELECT ?val WHERE {
<' . $id . '> ?p ?val .
FILTER(REGEX(str(?p), "(label|title|name|summary)$"))
} LIMIT 1
';
$row = $this->label_store->query($q, 'row');
return $row ? $row['val'] : $r;
}
/* */
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ARC2_LegacyHTMLSerializer.php | File | 2.84 KB | 0604 |
|
| ARC2_LegacyJSONSerializer.php | File | 1.33 KB | 0604 |
|
| ARC2_LegacyXMLSerializer.php | File | 1.36 KB | 0604 |
|
| ARC2_MicroRDFSerializer.php | File | 4.23 KB | 0604 |
|
| ARC2_NTriplesSerializer.php | File | 6.78 KB | 0604 |
|
| ARC2_POSHRDFSerializer.php | File | 2.57 KB | 0604 |
|
| ARC2_RDFJSONSerializer.php | File | 2.61 KB | 0604 |
|
| ARC2_RDFSerializer.php | File | 1.19 KB | 0604 |
|
| ARC2_RDFXMLSerializer.php | File | 5.87 KB | 0604 |
|
| ARC2_RSS10Serializer.php | File | 589 B | 0604 |
|
| ARC2_TurtleSerializer.php | File | 3.4 KB | 0604 |
|