Prefixes/namespaces: preferred way to define?

7 views
Skip to first unread message

Richard Walker

unread,
Aug 14, 2017, 11:59:33 PM8/14/17
to linked-data-api-discuss
It seems that to add a prefix/namespace to results, I can either:

(a) use the api:prefixMapping predicate, e.g.:

my:vocab a api:API ;
  # etc. etc.
  api:prefixMapping [ api:prefix "time" ; api:namespace "http://www.w3.org/2006/time#" ]
  .

(b) define the prefix at the top level, like any other prefix:

@prefix time: <http://www.w3.org/2006/time#> .

The com.epimorphics.lda.specs.ExtractPrefixMapping class picks up both types of definition.

Is there a view as to which is "better"?

chris dollin

unread,
Aug 22, 2017, 8:49:44 AM8/22/17
to linked-data-api-discuss
Neither is automatically better than the other.

The @prefixes are automatically global, ie shared by
all the specs within a given config. And they're availble
within the spec itself.

The api:prefixMapping declarations apply only to
the spec they're attached to.

Chris







On 15 August 2017 at 04:59, Richard Walker
> --
> You received this message because you are subscribed to the Google Groups
> "linked-data-api-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linked-data-api-d...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Chris "allusive" Dollin

Richard Walker

unread,
Aug 22, 2017, 7:14:24 PM8/22/17
to linked-data-api-discuss
On Tuesday, August 22, 2017 at 10:49:44 PM UTC+10, chris wrote:

Three excellent points.

Reply all
Reply to author
Forward
0 new messages