UNPKG

@qudtlib/core

Version:

Data model for QUDTLib

30 lines (29 loc) 1.02 kB
export declare class Namespace { readonly abbreviationPrefix: string; readonly baseIri: string; constructor(baseIri: string, abbreviationPrefix: string); /** * Returns an abbreviated IRI if the specified iri starts with the baseIri; the unchanged input * String otherwise; * * @param iri * @return */ abbreviate(iri: string): string; getLocalnameIfFullNamespaceIri(iri: string): string; expand(abbreviatedIri: string): string; /** * Returns true if the specified abbreviatedIri starts with the namespace's abbreviation prefix. */ isAbbreviatedNamespaceIri(abbreviatedIri: string): boolean; /** Returns true if the specified iri starts with the namespace's baseIri. */ isFullNamespaceIri(iri: string): boolean; /** * Prepends the namespace's baseIri to the specified localName. * * @param localName * @return */ makeIriInNamespace(localName: string): string; } //# sourceMappingURL=namespace.d.ts.map