|
From: Richard C. <ri...@cy...> - 2005-09-15 19:45:34
|
Hi Saf,
On 15 Sep 2005, at 11:07, Saf Hulou wrote:
> Hi,
>
> New to RDF and PHP
Welcome!
> so this may be a simple syntax issue:
>
> Having consulted the tutorials and class details for statements, I'm
> still unclear as to how to set the label of a statement. I don't want
> to use the system-generated numbers e.g. by reifying a whole model - I
> just want to give my statements names of my choice.
Okay. If you reify a statement, you say that a *resource* represents
the statement.
Let me repeat: A reified statement is not a "label" for a statement,
it's a resource representing the statement. So it can be a URI or a
blank node, but not a simple string.
> e.g.
> <a><b><c> reify as: 'Matilda'
> results in:
> <Matilda><type><statement>
> <Matilda><subj><a>
> <Matilda><pred><b>
> <Matilda><obj><c>
'Matilda' is a string. A reified statement can be a URI or a blank
node, but not a string.
> I keep getting an error message regarding not being able to pass
> parameter 1 e.g. 'Matilda' whenever I use
> $statement_x->reify("Matilda");
You have to pass a model or a blank node. Passing a string doesn't work.
> Please could someone provide a worked example?
>
> I'm assuming 'Matilda' will be regarded as both a uri and url for this
> statement resource, like any other type of resource. Is this true?
You really have to be more clear about the difference between URIs
and simple strings.
If you want to assign a simple string as a label to a reified
statement, you can create an RDF graph like this:
_:blank rdf:type rdf:Statement .
_:blank rdf:subject :a .
_:blank rdf:predicate :b .
_:blank rdf:object :c .
_:blank rdfs:label "Matilda" .
(This is Turtle syntax)
_:blank is the blank node representing the statement. All the other
things with ":" in them are URIs (abbreviated as QNames). The
rdfs:label triple assigns a label to the reified statement.
That said, the reification support in RAP is clunky. Apparently
there's no way to create a reified statement from a URI, you have to
use a blank node. That's a limitation of RAP; RDF allows it.
I probably caused more confusion than clarity with this response.
Sorry about that!
All the best,
Richard
>
> Thanks
>
> Saf
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Rdfapi-php-interest mailing list
> Rdf...@li...
> https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest
>
>
|