Module: @@api/labels-parsing

Human readable label parsing logic
Source:

Members

(static, constant) fetchLabels

Fetches labels for entities provided by their URLs.
Source:

Methods

(async, inner) downloadHumanReadableData(url, prefixToIri, iriToPrefix) → {Promise.<({}|{})>}

Downloads human readable data by accessing the IRIs directly and looking for entity descriptions in the RDF schema.
Parameters:
Name Type Description
url
prefixToIri
iriToPrefix
Source:
Returns:
Type
Promise.<({}|{})>

(inner) getData(quads, prefixes) → {Object}

Aggregates data for entity ids by language and key.
Parameters:
Name Type Description
quads
prefixes
Source:
Returns:
Type
Object

(inner) getFullIri(prefixes, iri) → {string|*}

Unwraps prefixed IRI into an absolute one.
Parameters:
Name Type Description
prefixes
iri
Source:
Returns:
Type
string | *

(async, inner) getHumanReadableDataForUrls(urls, prefixToIri, iriToPrefix) → {Promise.<*>}

Returns human readable data for provided URLs.
Parameters:
Name Type Description
urls
prefixToIri
iriToPrefix
Source:
Returns:
Type
Promise.<*>

(inner) tryParseTTL(txt) → {Promise.<unknown>}

Tries to parse RDF in TTL format.
Parameters:
Name Type Description
txt
Source:
Returns:
Type
Promise.<unknown>

(inner) tryParseXML(txt) → {Promise.<unknown>}

Tries to parse RDF in XML format.
Parameters:
Name Type Description
txt
Source:
Returns:
Type
Promise.<unknown>