import { DataService } from '@openhps/core'; import { Property, IriString, SerializableThing, Observation } from '@openhps/rdf'; import { SolidProfileObject } from './SolidProfileObject'; import { SolidDataDriver } from './SolidDataDriver'; import { SolidService, SolidSession } from './SolidService'; import { Node } from '../models/tree'; import { Collection } from '../models/tree/Collection'; /** * Solid property service. This is a service that allows you to store *observations* in a Solid Pod. * The service will handle the creation of the necessary containers and resources to store the observations. * Behind the scenes, LDES is used to fragment the data over multiple containers (based on LDESinLDP). * * Please note that this service is still experimental. * @see {@link https://openhps.org/publications/2022/ipin2022/ Properties and observations to Solid} * @see {@link https://woutslabbinck.github.io/LDESinLDP/ LDES structuring in LDP containers} */ export declare class SolidPropertyService extends DataService { protected driver: SolidDataDriver; protected filter: (node: Node) => boolean; /** * Create a new Solid property service * @param filter Filter function to determine if a node should be used as the parent node */ constructor(filter?: (node: Node) => boolean); get session(): SolidSession; set service(service: SolidService); get service(): SolidService; /** * Fetch all properties linked to a profile * This function will return an array of properties that are linked to the profile * using the `ssn:hasProperty` predicate. * @param {SolidSession} session Solid session * @param {SolidProfileObject} profile Profile object * @returns {Promise} Property promise */ fetchProperties(session: SolidSession, profile: SolidProfileObject): Promise; /** * Create a new property on the profile * @param {SolidSession} session Solid session * @param {Property} property Property to create * @returns {Promise} Property URL */ createProperty(session: SolidSession, property: Property): Promise; protected createTreeNode(session: SolidSession, node: Node, collection?: Collection): Promise; protected fetchTreeNode(session: SolidSession, node: SerializableThing, collection?: IriString): Promise; /** * Find the root TREE node of a property. * @param session Solid session * @param property Property * @returns {Promise} Root node */ findRootNode(session: SolidSession, property: Property): Promise; protected getPropertyContainer(property: Property): URL; /** * Add an observation to a property * @param {SolidSession} session Solid session to get the data from * @param property * @param observation * @returns */ addObservation(session: SolidSession, property: Property, observation: Observation): Promise; /** * Fetch all observations for a property * @param session * @param property * @param options Observation fetch options * @returns */ fetchObservations(session: SolidSession, property: Property, options?: ObservationFetchOptions): Promise; } export interface ObservationFetchOptions { after?: Date; limit?: number; } //# sourceMappingURL=SolidPropertyService.d.ts.map