Class N3Serializer

Description

An abstract object.

Root object with some general methods, that should be overloaded.

  • version: $Id: N3Serializer.html,v 1.15 2006/06/26 12:34:21 tgauss Exp $
  • author: Chris Bizer <chris@bizer.de>

Located in /syntax/N3Serializer.php (line 34)

Object
   |
   --N3Serializer
Variable Summary
mixed $anon
mixed $debug
mixed $done
mixed $model
mixed $prefixes
mixed $res
Method Summary
N3Serializer N3Serializer ()
void addNSPrefix ( $ns,  $prefix, string $s)
void doNamespaces ( &$n, array $n)
boolean doResource ( &$r, object Resource $r)
void doURI ( &$r,  &$out, string $s)
void fixAnon ( $t, string $a, string $s)
void reset (void 0)
boolean saveAs ( &$model, string $filename, object MemModel $model)
string &serialize ( &$m, object Model $model)
Variables
mixed $anon (line 45)
mixed $debug (line 36)
mixed $done (line 40)
mixed $model (line 43)
mixed $prefixes (line 38)
mixed $res (line 44)
mixed $resourcetext (line 41)
mixed $resourcetext_taken (line 42)
Methods
Constructor N3Serializer (line 52)

Constructor

  • access: public
N3Serializer N3Serializer ()
addNSPrefix (line 65)

Adds a new namespace prefix to use.

Unknown namespaces will become ns0, ns1 etc.

  • access: public
void addNSPrefix ( $ns,  $prefix, string $s)
  • string $s
  • $ns
  • $prefix
doNamespaces (line 223)

Makes ns0, ns1 etc. prefixes for unknown prefixes.

Outputs @prefix lines.

  • access: private
void doNamespaces ( &$n, array $n)
  • array $n
  • &$n
doResource (line 246)

Fill in $resourcetext for a single resource.

Will recurse into Objects of triples, but should never look ? (really?)

  • access: private
boolean doResource ( &$r, object Resource $r)
  • object Resource $r
  • &$r
doURI (line 356)

Format a single URI

  • access: private
void doURI ( &$r,  &$out, string $s)
  • string $s
  • &$r
  • &$out
fixAnon (line 377)

Fix the resourcetext for a blanknode where the _: construct was used

  • access: private
void fixAnon ( $t, string $a, string $s)
  • string $s
  • string $a
  • $t
reset (line 206)

Readies this object for serializing another model

  • access: private
void reset (void 0)
  • void 0
saveAs (line 180)

Serializes a model and saves it into a file.

Returns FALSE if the model couldn't be saved to the file.

  • access: public
boolean saveAs ( &$model, string $filename, object MemModel $model)
  • object MemModel $model
  • string $filename
  • &$model
serialize (line 76)

Serializes a model to N3 syntax.

  • access: public
string &serialize ( &$m, object Model $model)
  • object Model $model
  • &$m

Inherited Methods

Inherited From Object

Object::toString()

Documentation generated on Mon, 26 Jun 2006 14:25:42 +0200 by phpDocumentor 1.3.0RC6