Skip to content

Instantly share code, notes, and snippets.

@kierdavis
Created July 10, 2012 22:17
Show Gist options
  • Save kierdavis/3086568 to your computer and use it in GitHub Desktop.
Save kierdavis/3086568 to your computer and use it in GitHub Desktop.
Prototype of template
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>)
}
@iand
Copy link

iand commented Jul 10, 2012

Very similar to my attempt. https://gist.github.com/3086533

What about the URIs of the foaf:accounts?

@kierdavis
Copy link
Author

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>}

@iand
Copy link

iand commented Jul 10, 2012

But the pattern is suffixed with ( which no object can be in the syntax surely?

@kierdavis
Copy link
Author

kierdavis commented Jul 10, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment