5 * @author Benjamin Nowack
6 * @license <http://arc.semsol.org/license>
7 * @homepage <http://arc.semsol.org/>
14 class ARC2_RDFSerializer extends ARC2_Class {
16 function __construct($a = '', &$caller) {
17 parent::__construct($a, $caller);
20 function ARC2_RDFSerializer($a = '', &$caller) {/* ns */
21 $this->__construct($a, $caller);
26 foreach ($this->ns as $k => $v) {
33 function xgetPName($v) {/* moved to merged getPName in ARC2_CLass */
34 if (preg_match('/^([a-z0-9\_\-]+)\:([a-z\_][a-z0-9\_\-]*)$/i', $v, $m) && isset($this->ns[$m[1]])) {
35 $this->used_ns = !in_array($this->ns[$m[1]], $this->used_ns) ? array_merge($this->used_ns, array($this->ns[$m[1]])) : $this->used_ns;
38 if (preg_match('/^(.*[\/\#])([a-z\_][a-z0-9\-\_]*)$/i', $v, $m)) {
39 return $this->getPrefix($m[1]) . ':' . $m[2];
46 function getSerializedTriples($triples, $raw = 0) {
47 $index = ARC2::getSimpleIndex($triples, 0);
48 return $this->getSerializedIndex($index, $raw);
51 function getSerializedIndex() {