Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximvdw committed Jun 27, 2024
1 parent 18b2043 commit f1d604e
Show file tree
Hide file tree
Showing 9 changed files with 370 additions and 373 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@commitlint/config-conventional": "^19.2.2",
"@comunica/config-query-sparql": "^3.1.0",
"@openhps/core": ">=0.7.8",
"@openhps/rdf": ">=0.4.69",
"@openhps/rdf": ">=0.4.70",
"@types/chai": "^4.3.16",
"@types/cookie-session": "^2.0.49",
"@types/express": "^4.17.21",
Expand Down
6 changes: 4 additions & 2 deletions src/common/SolidPropertyService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataService } from '@openhps/core';
import { Property, RDFSerializer, dcterms, rdfs, sosa, ssn, IriString } from '@openhps/rdf';
import { Property, RDFSerializer, dcterms, rdfs, sosa, ssn, IriString, RDFBuilder } from '@openhps/rdf';
import { SolidProfileObject } from './SolidProfileObject';
import { SolidDataDriver } from './SolidDataDriver';
import { SolidService, SolidSession } from './SolidService';
Expand Down Expand Up @@ -67,7 +67,9 @@ export class SolidPropertyService extends DataService<string, any> {
*/
createProperty(session: SolidSession, property: Property): Promise<IriString> {
return new Promise((resolve, reject) => {
const thing = RDFSerializer.serialize(property);
this.service.getThing(session, session.info.webId).then((thing) => {
RDFBuilder.fromSerialized(thing)

Check failure on line 71 in src/common/SolidPropertyService.ts

View workflow job for this annotation

GitHub Actions / Build

Argument of type 'ThingPersisted' is not assignable to parameter of type 'Thing'.

Check failure on line 71 in src/common/SolidPropertyService.ts

View workflow job for this annotation

GitHub Actions / Build

Argument of type 'ThingPersisted' is not assignable to parameter of type 'Thing'.

Check failure on line 71 in src/common/SolidPropertyService.ts

View workflow job for this annotation

GitHub Actions / Build

Argument of type 'ThingPersisted' is not assignable to parameter of type 'Thing'.
});
// this.service.createThing(session, thing).then(() => {
// resolve(property.id as IriString);
// }).catch(reject);
Expand Down
8 changes: 3 additions & 5 deletions src/common/SolidService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type {
ISessionInfo,
} from '@inrupt/solid-client-authn-browser';
import type { Session as NodeSession } from '@inrupt/solid-client-authn-node';
import type { IStorage, ClientAuthentication, IClient } from '@inrupt/solid-client-authn-core';
import type { IStorage, ClientAuthentication } from '@inrupt/solid-client-authn-core';
import { SolidProfileObject } from './SolidProfileObject';
import {
getStringNoLocale,
Expand All @@ -28,8 +28,6 @@ import {
setThing,
SolidDataset,
createSolidDataset,
Thing,
ThingPersisted,
FetchError,
getPodUrlAll,
deleteContainer,
Expand All @@ -40,7 +38,7 @@ import { fetch } from 'cross-fetch';
import { vcard, Quad_Subject, DataFactory, Quad_Object, Quad, Store, IriString, foaf } from '@openhps/rdf';
import { DatasetSubscription } from './DatasetSubscription';
import { ISessionOptions } from '@inrupt/solid-client-authn-node';
import type { AccessModes } from '@inrupt/solid-client/dist/interfaces';
import type { AccessModes, Thing, ThingPersisted } from '@inrupt/solid-client/dist/interfaces';
import { StorageUtility } from '@inrupt/solid-client-authn-core';
import { ClientRegistrar } from './ClientRegistrar';
import { SessionManager } from './SessionManager';
Expand Down Expand Up @@ -427,7 +425,7 @@ export abstract class SolidService extends RemoteService {
* Get a thing from a session Pod
* @param {SolidSession} session Solid session to get a thing from
* @param {string} uri URI of the thing in the Solid Pod
* @returns {Promise<ThingPersisted>} Persisted thing
* @returns {Promise<Thing>} Persisted thing
*/
getThing(session: SolidSession, uri: string): Promise<ThingPersisted> {
return new Promise((resolve, reject) => {
Expand Down
432 changes: 216 additions & 216 deletions src/common/engine-default.js

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions src/terms/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import * as ldesImport from './ldes';
export const ldes = ldesImport;
import * as ldpImport from './ldp';
export const ldp = ldpImport;
import * as treeImport from './tree';
export const tree = treeImport;
import * as ldesImport from './ldes'; export const ldes = ldesImport;
import * as ldpImport from './ldp'; export const ldp = ldpImport;
import * as treeImport from './tree'; export const tree = treeImport;
24 changes: 12 additions & 12 deletions src/terms/ldes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type OtherIndividual = IriString; // eslint-disable-line

/**
* has retention policy
*
*
* Links to a retention policy.
*
* https://w3id.org/ldes#retentionPolicy
Expand All @@ -23,7 +23,7 @@ export const retentionPolicy: Property = 'https://w3id.org/ldes#retentionPolicy'

/**
* amount
*
*
* Amount of versions to keep.
*
* https://w3id.org/ldes#amount
Expand All @@ -32,7 +32,7 @@ export const amount: Property = 'https://w3id.org/ldes#amount';

/**
* point in time
*
*
* After this point in time members are kept.
*
* https://w3id.org/ldes#pointInTime
Expand All @@ -41,7 +41,7 @@ export const pointInTime: Property = 'https://w3id.org/ldes#pointInTime';

/**
* version key
*
*
* A list of SHACL property paths to compose a version key.
*
* https://w3id.org/ldes#versionKey
Expand All @@ -50,7 +50,7 @@ export const versionKey: Property = 'https://w3id.org/ldes#versionKey';

/**
* versionOf Path
*
*
* SHACL property path to the non-versioned identifier of the entity.
*
* https://w3id.org/ldes#versionOfPath
Expand All @@ -59,7 +59,7 @@ export const versionOfPath: Property = 'https://w3id.org/ldes#versionOfPath';

/**
* Timestamp Path
*
*
* SHACL property path to the timestamp when the version object entered the event stream.
*
* https://w3id.org/ldes#timestampPath
Expand All @@ -68,7 +68,7 @@ export const timestampPath: Property = 'https://w3id.org/ldes#timestampPath';

/**
* Version Materialization Of
*
*
* Links to the original LDES
*
* https://w3id.org/ldes#versionMaterializationOf
Expand All @@ -77,7 +77,7 @@ export const versionMaterializationOf: Property = 'https://w3id.org/ldes#version

/**
* Version Materialization Until
*
*
* Timestamp until versions were processed
*
* https://w3id.org/ldes#versionMaterializationUntil
Expand All @@ -86,7 +86,7 @@ export const versionMaterializationUntil: Property = 'https://w3id.org/ldes#vers

/**
* Event Stream
*
*
* An Event Stream is a tree:Collection containing immutable members.
*
* https://w3id.org/ldes#EventStream
Expand All @@ -95,7 +95,7 @@ export const EventStream: Class = 'https://w3id.org/ldes#EventStream';

/**
* The Linked Data Event Streams specification
*
*
* A hypermedia specification for maintaining a collection with immutable members.
*
* https://w3id.org/ldes#Vocabulary
Expand All @@ -104,12 +104,12 @@ export const Vocabulary: OtherIndividual = 'https://w3id.org/ldes#Vocabulary';

/**
* Retention Policy
*
*
* The abstract concept of a retention policy.
*
* https://w3id.org/ldes#RetentionPolicy
*/
export const RetentionPolicy: OtherIndividual = 'https://w3id.org/ldes#RetentionPolicy';

export const _BASE: IriString = 'https://w3id.org/ldes#';
export const _PREFIX: string = 'ldes';
export const _PREFIX: string = 'ldes';
Loading

0 comments on commit f1d604e

Please sign in to comment.