Created
July 10, 2012 22:17
-
-
Save kierdavis/3086568 to your computer and use it in GitHub Desktop.
Prototype of template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template OnlineAccount(?label, ?accountName, ?accountServiceHomepage, ?accountProfilePage) is { | |
a foaf:OnlineAccount | |
rdfs:label ?label | |
foaf:accountName ?accountName | |
foaf:accountServiceHomepage ?accountServiceHomepage | |
foaf:isPrimaryTopicOf ?accountProfilePage | |
} | |
me { a foaf:Person | |
foaf:account OnlineAccount("My del.icio.us account", "kierdavis", | |
<http://www.delicious.com/>, | |
<http://www.delicious.com/kierdavis>) | |
foaf:account OnlineAccount("My Facebook account", "kier.davis", | |
<http://www.facebook.com/>, | |
<http://www.facebook.com/kier.davis>) | |
} |
Hmmm, just doing:
foaf:account me/accounts/delicious OnlineAccount(...)
would probably confuse the parser, since "OnlineAccount" looks like it should be the start of the next predicate.
Maybe something along the lines of normal descriptions:
foaf:account me/accounts/delicious {OnlineAccount("My del.icio.us account", "kierdavis", <http://www.delicious.com/>, http://www.delicious.com/kierdavis>)}
But that looks a little clumsy. Maybe drop the parenthesises (parentheses? parenthesi? whatever):
foaf:account me/accounts/delicious {OnlineAccount: "My del.icio.us account", "kierdavis", <http://www.delicious.com/>, http://www.delicious.com/kierdavis>}
But the pattern is suffixed with ( which no object can be in the syntax surely?
I'm not sure about the lookahead capabilities of the parser (will it be
able to see the '(' which is 2 or 3 tokens ahead, or will it assume its a
predicate and then cough up a syntax error?).
It would also mean that I would have to drop the RDF list syntax too (which
isn't implemented yet anyway and probably never will be unless there's
demand for it)
…On 10 July 2012 23:34, Ian Davis < ***@***.*** > wrote:
But the pattern is suffixed with ( which no object can be in the syntax
surely?
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/3086568
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very similar to my attempt. https://gist.github.com/3086533
What about the URIs of the foaf:accounts?