import type { RdfResource, ResourceFactory } from '@tpluscode/rdfine'; import type { AnyContext, AnyPointer } from 'clownface'; import type { DatasetCore, NamedNode } from 'rdf-js'; import type { HydraResource } from './Resources'; declare type MaybeExtendedResource> = HydraResource | (HydraResource & T) | null; export interface ResourceRepresentation = HydraResource> extends Iterable> { /** * Gets the root of the representation or undefined if it cannot be determined */ root: MaybeExtendedResource; /** * Gets the number of resource within this representation */ length: number; /** * Indexer to look up any arbitrary resource by its id within the representation */ get(uri: string): (T & HydraResource) | undefined; /** * Gets all resources of given RDF type from the representation * @param {string} classId RDF class identifier * @returns {Array} */ ofType(classId: string | NamedNode): HydraResource[]; } export default class> implements ResourceRepresentation { private __graph; private __factory; private readonly rootNode; constructor(graph: AnyPointer, factory: ResourceFactory, rootResource: NamedNode); get(uri: string): (T & HydraResource) | undefined; get root(): (RdfResource> & HydraResource & import("@tpluscode/rdfine").ResourceIndexer, RdfResource>>) | (RdfResource> & HydraResource & T & import("@tpluscode/rdfine").ResourceIndexer, RdfResource>>); get length(): number; ofType(classId: string | NamedNode): (RdfResource> & HydraResource & import("@tpluscode/rdfine").ResourceIndexer, RdfResource>>)[]; [Symbol.iterator](): IterableIterator> & HydraResource & import("@tpluscode/rdfine").ResourceIndexer, RdfResource>>>; private _createEntity; } export {}; //# sourceMappingURL=ResourceRepresentation.d.ts.map