-
Notifications
You must be signed in to change notification settings - Fork 1
Replace deprecated rdfjs-wrapper with @rdfjs/wrapper
#16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| import { TermWrapper } from "rdfjs-wrapper" | ||
| import { TermAs, TermFrom } from "@rdfjs/wrapper" | ||
| import { Policy } from "./Policy.js" | ||
| import { ACP } from "../vocabulary/mod.js" | ||
| import { Typed } from "./Typed.js"; | ||
|
|
||
| export class AccessControl extends Typed { | ||
| get apply(): Set<Policy> { | ||
| return this.objects(ACP.apply, TermWrapper.as(Policy), TermWrapper.as(Policy)) | ||
| return this.objects(ACP.apply, TermAs.instance(Policy), TermFrom.instance) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| import { ValueMappings, TermMappings, TermWrapper } from "rdfjs-wrapper" | ||
| import { NamedNodeAs, NamedNodeFrom, TermAs, TermFrom } from "@rdfjs/wrapper" | ||
| import { AccessControl } from "./AccessControl.js" | ||
| import { ACP } from "../vocabulary/mod.js" | ||
| import { Typed } from "./Typed.js"; | ||
|
|
||
| export class AccessControlResource extends Typed { | ||
| get accessControl(): Set<AccessControl> { | ||
| return this.objects(ACP.accessControl, TermWrapper.as(AccessControl), TermWrapper.as(AccessControl)) | ||
| return this.objects(ACP.accessControl, TermAs.instance(AccessControl), TermFrom.instance) | ||
| } | ||
|
|
||
| get resource(): string | undefined { | ||
| return this.singularNullable(ACP.resource, ValueMappings.iriToString) | ||
| return this.singularNullable(ACP.resource, NamedNodeAs.string) | ||
| } | ||
|
|
||
| set resource(v: string) { | ||
| this.overwriteNullable(ACP.resource, v, TermMappings.stringToIri) | ||
| this.overwriteNullable(ACP.resource, v, NamedNodeFrom.string) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| import { TermMappings, ValueMappings } from "rdfjs-wrapper" | ||
| import { NamedNodeAs, NamedNodeFrom } from "@rdfjs/wrapper" | ||
| import { ACP } from "../vocabulary/mod.js" | ||
| import { Typed } from "./Typed.js"; | ||
|
|
||
| export class Matcher extends Typed { | ||
| get agent(): Set<string> { | ||
| return this.objects(ACP.agent, ValueMappings.iriToString, TermMappings.stringToIri) | ||
| return this.objects(ACP.agent, NamedNodeAs.string, NamedNodeFrom.string) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| import { TermMappings, ValueMappings, TermWrapper } from "rdfjs-wrapper" | ||
| import { NamedNodeAs, NamedNodeFrom, TermAs, TermFrom } from "@rdfjs/wrapper" | ||
| import { Matcher } from "./Matcher.js" | ||
| import { ACP } from "../vocabulary/mod.js" | ||
| import { Typed } from "./Typed.js"; | ||
|
|
||
| export class Policy extends Typed { | ||
| get allow(): Set<string> { | ||
| return this.objects(ACP.allow, ValueMappings.iriToString, TermMappings.stringToIri) | ||
| return this.objects(ACP.allow, NamedNodeAs.string, NamedNodeFrom.string) | ||
| } | ||
|
|
||
| get anyOf(): Set<Matcher> { | ||
| return this.objects(ACP.anyOf, TermWrapper.as(Matcher), TermWrapper.as(Matcher)) | ||
| return this.objects(ACP.anyOf, TermAs.instance(Matcher), TermFrom.instance) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import { TermMappings, ValueMappings, TermWrapper } from "rdfjs-wrapper" | ||
| import { TermWrapper, NamedNodeAs, NamedNodeFrom } from "@rdfjs/wrapper" | ||
| import { RDF } from "../vocabulary/mod.js" | ||
|
|
||
| export class Typed extends TermWrapper { | ||
| get type(): Set<string> { | ||
| return this.objects(RDF.type, ValueMappings.iriToString, TermMappings.stringToIri) | ||
| return this.objects(RDF.type, NamedNodeAs.string, NamedNodeFrom.string) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| import { TermWrapper } from "rdfjs-wrapper" | ||
| import { TermAs, TermFrom } from "@rdfjs/wrapper" | ||
| import { Resource } from "./Resource.js" | ||
| import { LDP } from "../vocabulary/mod.js" | ||
|
|
||
| export class Container extends Resource { | ||
| public get contains(): Set<Resource> { | ||
| return this.objects(LDP.contains, TermWrapper.as(Resource), TermWrapper.as(Resource)) | ||
| return this.objects(LDP.contains, TermAs.instance(Resource), TermFrom.instance) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| import { TermWrapper, ValueMappings, TermMappings } from 'rdfjs-wrapper'; | ||
| import { TermWrapper, LiteralAs, LiteralFrom, NamedNodeAs, NamedNodeFrom } from '@rdfjs/wrapper'; | ||
| import { VCARD, RDF } from '../vocabulary/mod.js'; | ||
|
|
||
| export class Email extends TermWrapper { | ||
| get emailAddress(): string { | ||
| return this.singular(VCARD.value, ValueMappings.literalToString); | ||
| return this.singular(VCARD.value, LiteralAs.string); | ||
| } | ||
|
|
||
| set emailAddress(value: string) { | ||
| this.overwrite(VCARD.value, value, TermMappings.stringToLiteral); | ||
| this.overwrite(VCARD.value, value, LiteralFrom.string); | ||
| } | ||
|
|
||
| get emailType(): string | undefined { | ||
| return this.singularNullable(RDF.type, ValueMappings.iriToString); | ||
| return this.singularNullable(RDF.type, NamedNodeAs.string); | ||
| } | ||
|
|
||
| set emailType(value: string | undefined) { | ||
| this.overwriteNullable(RDF.type, value, TermMappings.stringToIri); | ||
| this.overwriteNullable(RDF.type, value, NamedNodeFrom.string); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| import { TermWrapper, ValueMappings, TermMappings } from 'rdfjs-wrapper'; | ||
| import { TermWrapper, LiteralAs, LiteralFrom, NamedNodeAs, NamedNodeFrom } from '@rdfjs/wrapper'; | ||
| import { VCARD } from '../vocabulary/mod.js'; | ||
|
|
||
| export class Telephone extends TermWrapper { | ||
| get phoneNumber(): string { | ||
| return this.singular(VCARD.hasValue, ValueMappings.literalToString); | ||
| return this.singular(VCARD.hasValue, LiteralAs.string); | ||
| } | ||
|
|
||
| set phoneNumber(value: string) { | ||
| this.overwrite(VCARD.hasValue, value, TermMappings.stringToLiteral); | ||
| this.overwrite(VCARD.hasValue, value, LiteralFrom.string); | ||
| } | ||
|
|
||
| get phoneType(): string | undefined { | ||
| return this.singularNullable(VCARD.telephoneType, ValueMappings.iriToString); | ||
| return this.singularNullable(VCARD.telephoneType, NamedNodeAs.string); | ||
| } | ||
|
|
||
| set phoneType(value: string | undefined) { | ||
| this.overwriteNullable(VCARD.telephoneType, value, TermMappings.stringToIri); | ||
| this.overwriteNullable(VCARD.telephoneType, value, NamedNodeFrom.string); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.