Wikibase
MediaWiki Wikibase extension
|
RDF vocabulary for use in mapping for wikibase data model. More...
Public Member Functions | |
__construct (array $conceptUris, array $dataUris, EntitySourceDefinitions $entitySourceDefinitions, array $rdfTurtleNodePrefixes, array $rdfTurtlePredicatePrefixes, array $canonicalLanguageCodes=[], array $dataTypeUris=[], array $pagePropertyDefs=[], string $licenseUrl='http://creativecommons.org/publicdomain/zero/1.0/') | |
getNamespaces () | |
Returns a map of namespace names (prefixes) to URIs. More... | |
getNamespaceURI ( $ns) | |
Returns the base URI for a given namespace (aka prefix). More... | |
getEntityLName (EntityId $entityId) | |
Returns a local name for the given entity using the given prefix. More... | |
getEntityRepositoryName (EntityId $entityId) | |
getStatementLName (Statement $statement) | |
Returns a qname for the given statement using the given prefix. More... | |
getEntityTypeName ( $type) | |
Returns a qname for the given entity type. More... | |
getDataTypeURI (string $dataTypeId) | |
Get Wikibase property data type Uri for ontology. More... | |
getValueTypeName (DataValue $val) | |
Get Wikibase value type name for ontology. More... | |
getMediaFileURI ( $file) | |
Create Commons URL from filename value. More... | |
getGeoShapeURI ( $file) | |
Create data entry point URL for geo shapes. More... | |
getTabularDataURI ( $file) | |
Create data entry point URL for tabular data. More... | |
getCanonicalLanguageCode ( $languageCode) | |
getPagePropertyDefs () | |
Get the map of configured page properties. More... | |
getLicenseUrl () | |
Static Public Member Functions | |
static | getOntologyURI () |
Return current ontology version URI. More... | |
Private Member Functions | |
getConceptNamespaces ( $nodeNamespacePrefix, $predicateNamespacePrefix, $baseUri, $dataUri) | |
Generates mapping of concept namespaces (including the prefix) to URIs using the given URI base. More... | |
getConceptUriBase ( $baseUri) | |
Returns the base part of concept URIs. More... | |
Private Attributes | |
const | ONTOLOGY_VERSION = '1.0' |
const | ONTOLOGY_BASE_URI = 'http://wikiba.se/ontology' |
const | SKOS_URI = 'http://www.w3.org/2004/02/skos/core#' |
const | SCHEMA_ORG_URI = 'http://schema.org/' |
const | CC_URI = 'http://creativecommons.org/ns#' |
const | MEDIA_URI = 'http://commons.wikimedia.org/wiki/Special:FilePath/' |
const | COMMONS_DATA_URI = 'http://commons.wikimedia.org/data/main/' |
const | GEO_URI = 'http://www.opengis.net/ont/geosparql#' |
const | PROV_URI = 'http://www.w3.org/ns/prov#' |
const | GREGORIAN_CALENDAR = 'http://www.wikidata.org/entity/Q1985727' |
const | JULIAN_CALENDAR = 'http://www.wikidata.org/entity/Q1985786' |
$namespaces = [] | |
$canonicalLanguageCodes | |
$dataTypeUris | |
$pagePropertyDefs | |
$licenseUrl | |
$sourceNameByEntityType | |
Static Private Attributes | |
static | $canonicalLanguageCodeCache = [] |
RDF vocabulary for use in mapping for wikibase data model.
Wikibase\Repo\Rdf\RdfVocabulary::__construct | ( | array | $conceptUris, |
array | $dataUris, | ||
EntitySourceDefinitions | $entitySourceDefinitions, | ||
array | $rdfTurtleNodePrefixes, | ||
array | $rdfTurtlePredicatePrefixes, | ||
array | $canonicalLanguageCodes = [] , |
||
array | $dataTypeUris = [] , |
||
array | $pagePropertyDefs = [] , |
||
string | $licenseUrl = 'http://creativecommons.org/publicdomain/zero/1.0/' |
||
) |
string[] | $conceptUris | Associative array mapping repository names to base URIs for entity concept URIs. |
string[] | $dataUris | Associative array mapping source/repository names to base URIs for entity description URIs. |
EntitySourceDefinitions | $entitySourceDefinitions | |
string[] | $rdfTurtleNodePrefixes | |
string[] | $rdfTurtlePredicatePrefixes | |
string[] | $canonicalLanguageCodes | Mapping of non-standard to canonical language codes. |
string[] | $dataTypeUris | Mapping of property data type IDs to their URIs, if different from the default mapping. |
string[][] | $pagePropertyDefs | Mapping of page props, e.g.: pageProp => [ 'name' => wikibase predicate, 'type' => integer ] All predicates will be prefixed with wikibase: |
string | $licenseUrl |
Wikibase\Repo\Rdf\RdfVocabulary::getCanonicalLanguageCode | ( | $languageCode | ) |
string | $languageCode | Any non-standard or canonical language code |
|
private |
Generates mapping of concept namespaces (including the prefix) to URIs using the given URI base.
string | $nodeNamespacePrefix | |
string | $predicateNamespacePrefix | |
string | $baseUri | |
string | $dataUri |
|
private |
Returns the base part of concept URIs.
string | $baseUri |
Wikibase\Repo\Rdf\RdfVocabulary::getDataTypeURI | ( | string | $dataTypeId | ) |
Get Wikibase property data type Uri for ontology.
string | $dataTypeId |
Wikibase\Repo\Rdf\RdfVocabulary::getEntityLName | ( | EntityId | $entityId | ) |
Returns a local name for the given entity using the given prefix.
EntityId | $entityId |
Wikibase\Repo\Rdf\RdfVocabulary::getEntityRepositoryName | ( | EntityId | $entityId | ) |
EntityId | $entityId |
Wikibase\Repo\Rdf\RdfVocabulary::getEntityTypeName | ( | $type | ) |
Returns a qname for the given entity type.
For well known types, these qnames refer to classes from the Wikibase ontology.
string | $type |
Wikibase\Repo\Rdf\RdfVocabulary::getGeoShapeURI | ( | $file | ) |
Create data entry point URL for geo shapes.
string | $file |
Wikibase\Repo\Rdf\RdfVocabulary::getLicenseUrl | ( | ) |
Wikibase\Repo\Rdf\RdfVocabulary::getMediaFileURI | ( | $file | ) |
Create Commons URL from filename value.
string | $file |
Wikibase\Repo\Rdf\RdfVocabulary::getNamespaces | ( | ) |
Returns a map of namespace names (prefixes) to URIs.
Wikibase\Repo\Rdf\RdfVocabulary::getNamespaceURI | ( | $ns | ) |
Returns the base URI for a given namespace (aka prefix).
string | $ns | The namespace name |
OutOfBoundsException | if $ns is not a known namespace |
|
static |
Return current ontology version URI.
Wikibase\Repo\Rdf\RdfVocabulary::getPagePropertyDefs | ( | ) |
Get the map of configured page properties.
Wikibase\Repo\Rdf\RdfVocabulary::getStatementLName | ( | Statement | $statement | ) |
Returns a qname for the given statement using the given prefix.
Statement | $statement |
Wikibase\Repo\Rdf\RdfVocabulary::getTabularDataURI | ( | $file | ) |
Create data entry point URL for tabular data.
string | $file |
Wikibase\Repo\Rdf\RdfVocabulary::getValueTypeName | ( | DataValue | $val | ) |
Get Wikibase value type name for ontology.
DataValue | $val |
|
staticprivate |
|
private |
Wikibase\Repo\Rdf\RdfVocabulary::$claimToValue = [] |
Wikibase\Repo\Rdf\RdfVocabulary::$claimToValueNormalized = [] |
Wikibase\Repo\Rdf\RdfVocabulary::$dataNamespaceNames = [] |
|
private |
Wikibase\Repo\Rdf\RdfVocabulary::$entityNamespaceNames = [] |
|
private |
|
private |
Wikibase\Repo\Rdf\RdfVocabulary::$normalizedPropertyValueNamespace = [] |
|
private |
Wikibase\Repo\Rdf\RdfVocabulary::$propertyNamespaceNames = [] |
|
private |
Wikibase\Repo\Rdf\RdfVocabulary::$statementNamespaceNames = [] |
|
private |
|
private |
const Wikibase\Repo\Rdf\RdfVocabulary::FORMAT_VERSION = '1.0.0' |
|
private |
|
private |
|
private |
|
private |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_CC = 'cc' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_DATA = 'data' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_ENTITY = '' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_GEO = 'geo' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_ONTOLOGY = 'wikibase' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_PROV = 'prov' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_REFERENCE = 'ref' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_SCHEMA_ORG = 'schema' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_SKOS = 'skos' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_STATEMENT = 's' |
const Wikibase\Repo\Rdf\RdfVocabulary::NS_VALUE = 'v' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_CLAIM = 'p' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_CLAIM_STATEMENT = 'ps' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_CLAIM_VALUE = 'psv' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_CLAIM_VALUE_NORM = 'psn' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_DIRECT_CLAIM = 't' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_DIRECT_CLAIM_NORM = 'tn' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_NOVALUE = 'no' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_QUALIFIER = 'pq' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_QUALIFIER_VALUE = 'pqv' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_QUALIFIER_VALUE_NORM = 'pqn' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_REFERENCE = 'pr' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_REFERENCE_VALUE = 'prv' |
const Wikibase\Repo\Rdf\RdfVocabulary::NSP_REFERENCE_VALUE_NORM = 'prn' |
const Wikibase\Repo\Rdf\RdfVocabulary::ONE_ENTITY = 'http://www.wikidata.org/entity/Q199' |
URI for unit "1" See: https://phabricator.wikimedia.org/T105432.
|
private |
|
private |
|
private |
const Wikibase\Repo\Rdf\RdfVocabulary::RANK_MAP |
|
private |
|
private |
const Wikibase\Repo\Rdf\RdfVocabulary::WIKIBASE_RANK_BEST = 'BestRank' |