@faubulous/mentor-rdf
Version:
A library for working with RDF vocabularies with support for basic RDFS and OWL inference.
30 lines (29 loc) • 1.08 kB
TypeScript
/**
* A helper class for working with URI string.
*/
export declare class Uri {
/**
* Get the portion of a URI after the first occurance of '#' or the last occurance of '/'.
* @param uri A URI.
* @returns The label portion of the URI.
*/
static getLocalPart(uri: string): string | undefined;
/**
* Get the portion of a URI after the first occurance of '#' or the last occurance of '/'.
* @param uri A URI.
* @returns The namespace portion of the URI.
*/
static getNamespaceIri(uri: string): string;
/**
* Get a transformed version of the URI that can be used as a JSON identifier which only contains letters, numbers and dots.
* @param uri A URI.
* @returns A transformed version which only contains letters, numbers and dots.
*/
static toJsonId(uri: string): string | undefined;
/**
* Get a normalized version of the URI which removes any trailing slashes or hashes.
* @param uri A URI.
* @returns A normalized URI.
*/
static getNormalizedUri(uri: string): string;
}