File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { DatasetWrapper } from "rdfjs-wrapper"
2- import { AccessControlResource } from "../class/AccessControlResource.js" ;
2+ import { AccessControlResource } from "../class/acp/ AccessControlResource.js" ;
33import { ACP } from "../vocabulary/acp.js" ;
44
55export class AcrDataset extends DatasetWrapper {
66 get acr ( ) : AccessControlResource | undefined {
77 const subjects = new Set ( [
8- ...this . instancesOf ( AccessControlResource , ACP . AccessControlResource ) ,
9- ...this . subjectsOf ( AccessControlResource , ACP . resource ) ,
10- ...this . subjectsOf ( AccessControlResource , ACP . accessControl ) ,
11- ...this . subjectsOf ( AccessControlResource , ACP . memberAccessControl )
8+ ...this . instancesOf ( ACP . AccessControlResource , AccessControlResource ) ,
9+ ...this . subjectsOf ( ACP . resource , AccessControlResource ) ,
10+ ...this . subjectsOf ( ACP . accessControl , AccessControlResource ) ,
11+ ...this . subjectsOf ( ACP . memberAccessControl , AccessControlResource )
1212 ] )
1313
1414 for ( const subject of subjects ) {
1515 return subject
1616 }
17+
18+ return
1719 }
1820}
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ export class ContainerDataset extends DatasetWrapper {
66 // TODO: Consider that this might be undefined if there are no contained resources. We might need different matching.
77 get container ( ) : Container | undefined {
88 // Return the first container in the dataset
9- for ( const s of this . subjectsOf ( Container , LDP . contains ) ) {
10- return s ;
9+ for ( const s of this . subjectsOf ( LDP . contains , Container ) ) {
10+ return s
1111 }
12+
13+ return
1214 }
1315}
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ export class WebIdDataset extends DatasetWrapper{
77 // TODO: Fix with FOAF: Primary topic either via Inrupt or spec because this does not work with Inrupt WebID
88 // TODO: do the isPrimaryTopicOf route and the primaryTopic (maybe)
99 // Or not because all WebIDs will have an issuer (otherwise also needs to restrict to the document URL as subject or object to realise the benefit)
10- for ( const s of this . subjectsOf ( Agent . , SOLID . oidcIssuer ) ) {
11- return s ;
10+ for ( const s of this . subjectsOf ( SOLID . oidcIssuer , Agent ) ) {
11+ return s
1212 }
13+
14+ return
1315 }
1416}
You can’t perform that action at this time.
0 commit comments