Using ARC2 to create a URI for a resource

60 views
Skip to first unread message

Flyon

unread,
May 4, 2012, 7:19:39 AM5/4/12
to arc-dev
Hi, sorry if this is a silly question, but I just can't seem to figure
it out.

Is ARC also build to deal with the making of URI's for resources?

As in ... say I want to add a resource with label 'test' to my
store...

so I can use INSERT to add
my_resource rdf:type rdfs:Resource
my_resource rdfs:label test

but what do I put for my_resource?

Do I need to bundle ARC with other software to do this?

Cheers!

Stéphane Corlosquet

unread,
May 4, 2012, 11:51:36 AM5/4/12
to arc...@googlegroups.com
Hi,

On Fri, May 4, 2012 at 7:19 AM, Flyon <rpwve...@gmail.com> wrote:
Hi, sorry if this is a silly question, but I just can't seem to figure
it out.

Is ARC also build to deal with the making of URI's for resources?

No, you have mint URIs (or reuse existing one). It's generally pretty easy to mint URIs, and depending on what framework you're using, you might already have a URI defined (or have the elements to mint it), like the page URI. so in your query below you have to replace my_resource with something like <http://yourdomain.com/make/something/up/1>. It can be a URI containing a random path, it's up to you how you want to mint. It is best Linked Data practice to also ensure these URIs are dereferenceable.

Steph.

Craig Dietrich

unread,
May 4, 2012, 11:59:00 AM5/4/12
to arc...@googlegroups.com
Hi all,

For my uses, finding the appropriate string (URI) to place into the
subject was difficult. As we're building a CMS that can be installed
(and moved) from server to server (particularly dev to production
server), locking the subjects into a specific URI
(http://SERVER-1/resource) became problematic -- if moved to the
production server, for example, did we need to run a query renaming
all of the URIs to reflect to the new domain?

Our workaround (or solution) was to use URN instead. Rather than
store a URL (http://...) we construct a URN
(urn:our_project:version:1234). This requires the addition of another
table in our database (we have a few additions, but for the sake of
argument...), which houses the versions for each page. The row ID is
the number that get's placed into the URN, and we have a field for
"slug" which reflects the URL of the page being called (the URL
segment of the page without mention of the domain name). So, for
example, given a specific page, we grab its row from the versions
table based on the slug field, return the version ID, then grab its
metadata from ARC using the newly constructed URN based on that
version ID.

Hopefully helpful,
Craig

Stéphane Corlosquet

unread,
May 4, 2012, 12:07:19 PM5/4/12
to arc...@googlegroups.com
Hi Craig,

Thanks for your insight. I agree for a dev-staging-production workflow, URIs can get in the way. One could also use UUID in to mint URNs, that's what I had in mind when I said 'random path'. URIs become more useful once you're in production in the context of the global Web (dereferenceable linked data etc.).

Steph.
Reply all
Reply to author
Forward
0 new messages