Anonymous

Main Page: Difference between revisions

From geokb
Line 502: Line 502:


== Prefixes/Namespaces ==
== Prefixes/Namespaces ==
SPARQL queries and work with RDF in general requires uses the concept of a short prefix string representing a URI to resolve an identifier. Prefix declaration in a query lets us use the short strings in place of constantly putting in a fully qualified and resolvable path. The wikibase.cloud folks have taken the stance that prefixes should always be explicitly declared as opposed to being in the default configuration for queries, which is good practice but a bit of a pain. Here is a rundown of the full set of prefixes for this Wikibase instance. You'll see the applicable prefixes from this exhaustive list in the query examples.
SPARQL queries and work with RDF in general uses the concept of a short prefix string representing a URI to resolve an identifier, creating the ability to refer to different resolvable knowledge representations with a short string. Prefix declaration in a query lets us use the short strings in place of constantly putting in a fully qualified and resolvable path. The wikibase.cloud instances all use a standard set of built-in prefixes and resolvers, some of which are well known and in common use.
 
They also include the standard wikidata prefixes referring to Wikidata resolution paths. Initially, in this Wikibase instance, we were documenting queries in a way that might be confusing in that we use the same standard "wd" prefixes but declared them as this Wikibase. We've since changed that convention, but you may still find references that point to the older style than the conventions shown below.


<sparql>
<sparql>
Line 515: Line 517:
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix wd: <https://geokb.wikibase.cloud/entity/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix data: <https://geokb.wikibase.cloud/wiki/Special:EntityData/> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix s: <https://geokb.wikibase.cloud/entity/statement/> .
@prefix wdt: <https://www.wikidata.org/prop/direct/> .
@prefix ref: <https://geokb.wikibase.cloud/reference/> .
@prefix gkd: <https://geokb.wikibase.cloud/entity/> .
@prefix v: <https://geokb.wikibase.cloud/value/> .
@prefix gkdata: <https://geokb.wikibase.cloud/wiki/Special:EntityData/> .
@prefix wdt: <https://geokb.wikibase.cloud/prop/direct/> .
@prefix gks: <https://geokb.wikibase.cloud/entity/statement/> .
@prefix wdtn: <https://geokb.wikibase.cloud/prop/direct-normalized/> .
@prefix gkref: <https://geokb.wikibase.cloud/reference/> .
@prefix p: <https://geokb.wikibase.cloud/prop/> .
@prefix gkv: <https://geokb.wikibase.cloud/value/> .
@prefix ps: <https://geokb.wikibase.cloud/prop/statement/> .
@prefix gkwdt: <https://geokb.wikibase.cloud/prop/direct/> .
@prefix psv: <https://geokb.wikibase.cloud/prop/statement/value/> .
@prefix gkwdtn: <https://geokb.wikibase.cloud/prop/direct-normalized/> .
@prefix psn: <https://geokb.wikibase.cloud/prop/statement/value-normalized/> .
@prefix gkp: <https://geokb.wikibase.cloud/prop/> .
@prefix pq: <https://geokb.wikibase.cloud/prop/qualifier/> .
@prefix gkps: <https://geokb.wikibase.cloud/prop/statement/> .
@prefix pqv: <https://geokb.wikibase.cloud/prop/qualifier/value/> .
@prefix gkpsv: <https://geokb.wikibase.cloud/prop/statement/value/> .
@prefix pqn: <https://geokb.wikibase.cloud/prop/qualifier/value-normalized/> .
@prefix gkpsn: <https://geokb.wikibase.cloud/prop/statement/value-normalized/> .
@prefix pr: <https://geokb.wikibase.cloud/prop/reference/> .
@prefix gkpq: <https://geokb.wikibase.cloud/prop/qualifier/> .
@prefix prv: <https://geokb.wikibase.cloud/prop/reference/value/> .
@prefix gkpqv: <https://geokb.wikibase.cloud/prop/qualifier/value/> .
@prefix prn: <https://geokb.wikibase.cloud/prop/reference/value-normalized/> .
@prefix gkpqn: <https://geokb.wikibase.cloud/prop/qualifier/value-normalized/> .
@prefix wdno: <https://geokb.wikibase.cloud/prop/novalue/> .
@prefix gkpr: <https://geokb.wikibase.cloud/prop/reference/> .
@prefix gkprv: <https://geokb.wikibase.cloud/prop/reference/value/> .
@prefix gkprn: <https://geokb.wikibase.cloud/prop/reference/value-normalized/> .
@prefix gkno: <https://geokb.wikibase.cloud/prop/novalue/> .
</sparql>
</sparql>