/** * Copyright 2020 Inrupt Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the * Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import { NamedNode, Literal } from "rdf-js"; import { Thing, Url, UrlString } from "../interfaces"; /** * @param thing The [[Thing]] to read a URL value from. * @param predicate The given Predicate for which you want the URL value. * @returns A URL value for the given Predicate, if present, or null otherwise. */ export declare function getUrlOne(thing: Thing, predicate: Url | UrlString): UrlString | null; /** @hidden Alias of [[getUrlOne]] for those who prefer IRI terminology. */ export declare const getIriOne: typeof getUrlOne; /** * @param thing The [[Thing]] to read the URL values from. * @param predicate The given Predicate for which you want the URL values. * @returns The URL values for the given Predicate. */ export declare function getUrlAll(thing: Thing, predicate: Url | UrlString): UrlString[]; /** @hidden Alias of [[getUrlAll]] for those who prefer IRI terminology. */ export declare const getIriAll: typeof getUrlAll; /** * @param thing The [[Thing]] to read a boolean value from. * @param predicate The given Predicate for which you want the boolean value. * @returns A boolean value for the given Predicate, if present, or null otherwise. */ export declare function getBooleanOne(thing: Thing, predicate: Url | UrlString): boolean | null; /** * @param thing The [[Thing]] to read the boolean values from. * @param predicate The given Predicate for which you want the boolean values. * @returns The boolean values for the given Predicate. */ export declare function getBooleanAll(thing: Thing, predicate: Url | UrlString): boolean[]; /** * @param thing The [[Thing]] to read a datetime value from. * @param predicate The given Predicate for which you want the datetime value. * @returns A datetime value for the given Predicate, if present, or null otherwise. */ export declare function getDatetimeOne(thing: Thing, predicate: Url | UrlString): Date | null; /** * @param thing The [[Thing]] to read the datetime values from. * @param predicate The given Predicate for which you want the datetime values. * @returns The datetime values for the given Predicate. */ export declare function getDatetimeAll(thing: Thing, predicate: Url | UrlString): Date[]; /** * @param thing The [[Thing]] to read a decimal value from. * @param predicate The given Predicate for which you want the decimal value. * @returns A decimal value for the given Predicate, if present, or null otherwise. */ export declare function getDecimalOne(thing: Thing, predicate: Url | UrlString): number | null; /** * @param thing The [[Thing]] to read the decimal values from. * @param predicate The given Predicate for which you want the decimal values. * @returns The decimal values for the given Predicate. */ export declare function getDecimalAll(thing: Thing, predicate: Url | UrlString): number[]; /** * @param thing The [[Thing]] to read an integer value from. * @param predicate The given Predicate for which you want the integer value. * @returns An integer value for the given Predicate, if present, or null otherwise. */ export declare function getIntegerOne(thing: Thing, predicate: Url | UrlString): number | null; /** * @param thing The [[Thing]] to read the integer values from. * @param predicate The given Predicate for which you want the integer values. * @returns The integer values for the given Predicate. */ export declare function getIntegerAll(thing: Thing, predicate: Url | UrlString): number[]; /** * @param thing The [[Thing]] to read a localised string value from. * @param predicate The given Predicate for which you want the localised string value. * @param locale The desired locale for the string value. * @returns A localised string value for the given Predicate, if present in `locale`, or null otherwise. */ export declare function getStringInLocaleOne(thing: Thing, predicate: Url | UrlString, locale: string): string | null; /** * @param thing The [[Thing]] to read the localised string values from. * @param predicate The given Predicate for which you want the localised string values. * @param locale The desired locale for the string values. * @returns The localised string values for the given Predicate. */ export declare function getStringInLocaleAll(thing: Thing, predicate: Url | UrlString, locale: string): string[]; /** * @param thing The [[Thing]] to read a string value from. * @param predicate The given Predicate for which you want the string value. * @returns A string value for the given Predicate, if present, or null otherwise. */ export declare function getStringUnlocalizedOne(thing: Thing, predicate: Url | UrlString): string | null; /** * @param thing The [[Thing]] to read the string values from. * @param predicate The given Predicate for which you want the string values. * @returns The string values for the given Predicate. */ export declare function getStringUnlocalizedAll(thing: Thing, predicate: Url | UrlString): string[]; /** * @param thing The [[Thing]] to read a NamedNode value from. * @param predicate The given Predicate for which you want the NamedNode value. * @returns A NamedNode value for the given Predicate, if present, or null otherwise. * @ignore This should not be needed due to the other get*One() functions. If you do find yourself needing it, please file a feature request for your use case. */ export declare function getNamedNodeOne(thing: Thing, predicate: Url | UrlString): NamedNode | null; /** * @param thing The [[Thing]] to read the NamedNode values from. * @param predicate The given Predicate for which you want the NamedNode values. * @returns The NamedNode values for the given Predicate. * @ignore This should not be needed due to the other get*One() functions. If you do find yourself needing it, please file a feature request for your use case. */ export declare function getNamedNodeAll(thing: Thing, predicate: Url | UrlString): NamedNode[]; /** * @param thing The [[Thing]] to read a Literal value from. * @param predicate The given Predicate for which you want the Literal value. * @returns A Literal value for the given Predicate, if present, or null otherwise. * @ignore This should not be needed due to the other get*One() functions. If you do find yourself needing it, please file a feature request for your use case. */ export declare function getLiteralOne(thing: Thing, predicate: Url | UrlString): Literal | null; /** * @param thing The [[Thing]] to read the Literal values from. * @param predicate The given Predicate for which you want the Literal values. * @returns The Literal values for the given Predicate. * @ignore This should not be needed due to the other get*All() functions. If you do find yourself needing it, please file a feature request for your use case. */ export declare function getLiteralAll(thing: Thing, predicate: Url | UrlString): Literal[];