-
Notifications
You must be signed in to change notification settings - Fork 1
add typescript classes created with script for review #13
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
Open
tgra
wants to merge
2
commits into
main
Choose a base branch
from
feature/add-auto-objects
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class AccessControlPolicy extends TermWrapper { | ||
|
|
||
| get type(): Set<string> { | ||
| return this.objects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { AcpAccessControl } from './AcpAccessControl.js'; | ||
| import { TermWrapper, ValueMapping, TermMapping, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class AccessControlResource extends TermWrapper { | ||
|
|
||
| get accessControl(): Set<AcpAccessControl> { | ||
| return this.objects("http://www.w3.org/ns/solid/acp#accessControl", ObjectMapping.as(AcpAccessControl), ObjectMapping.as(AcpAccessControl)); | ||
| } | ||
| get resource(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/ns/solid/acp#resource", ValueMapping.iriToString); | ||
| } | ||
| set resource(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/ns/solid/acp#resource", value, TermMapping.stringToIri); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { AccessControlPolicy } from './AccessControlPolicy.js'; | ||
| import { TermWrapper, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class AcpAccessControl extends TermWrapper { | ||
|
|
||
| get apply(): Set<AccessControlPolicy> { | ||
| return this.objects("http://www.w3.org/ns/solid/acp#apply", ObjectMapping.as(AccessControlPolicy), ObjectMapping.as(AccessControlPolicy)); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class AcpMatcher extends TermWrapper { | ||
|
|
||
| get agent(): Set<string> { | ||
| return this.objects("http://www.w3.org/ns/solid/acp#agent", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class Address extends TermWrapper { | ||
|
|
||
| get streetAddress(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#street-address", ValueMapping.literalToString); | ||
| } | ||
| set streetAddress(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#street-address", value, TermMapping.stringToLiteral); | ||
| } | ||
| get locality(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#locality", ValueMapping.literalToString); | ||
| } | ||
| set locality(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#locality", value, TermMapping.stringToLiteral); | ||
| } | ||
| get postalCode(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#postal-code", ValueMapping.literalToString); | ||
| } | ||
| set postalCode(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#postal-code", value, TermMapping.stringToLiteral); | ||
| } | ||
| get region(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#region", ValueMapping.literalToString); | ||
| } | ||
| set region(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#region", value, TermMapping.stringToLiteral); | ||
| } | ||
| get countryName(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#country-name", ValueMapping.literalToString); | ||
| } | ||
| set countryName(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#country-name", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class AddressBook extends TermWrapper { | ||
|
|
||
| get formattedName(): Set<string> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#fn", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get nameEmailIndex(): Set<string> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#nameEmailIndex", ValueMapping.iriToString, TermMapping.stringToIri); | ||
| } | ||
| get groupIndex(): string { | ||
| return this.singular("http://www.w3.org/2006/vcard/ns#groupIndex", ValueMapping.iriToString); | ||
| } | ||
| set groupIndex(value: string) { | ||
| this.overwrite("http://www.w3.org/2006/vcard/ns#groupIndex", value, TermMapping.stringToIri); | ||
| } | ||
| get includesGroup(): Set<string> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#includesGroup", ValueMapping.iriToString, TermMapping.stringToIri); | ||
| } | ||
| get inAddressBook(): string { | ||
| return this.singular("http://www.w3.org/2006/vcard/ns#inAddressBook", ValueMapping.iriToString); | ||
| } | ||
| set inAddressBook(value: string) { | ||
| this.overwrite("http://www.w3.org/2006/vcard/ns#inAddressBook", value, TermMapping.stringToIri); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class Bookmark extends TermWrapper { | ||
|
|
||
| get label(): Set<string> { | ||
| return this.objects("http://www.w3.org/2000/01/rdf-schema#label", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get url(): Set<string> { | ||
| return this.objects("http://www.w3.org/2002/01/bookmark#recalls", ValueMapping.iriToString, TermMapping.stringToIri); | ||
| } | ||
| get topic(): Set<string> { | ||
| return this.objects("http://www.w3.org/2002/01/bookmark#hasTopic", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get description(): Set<string> { | ||
| return this.objects("http://www.w3.org/2000/01/rdf-schema#comment", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ChatAction extends TermWrapper { | ||
|
|
||
| get type(): Set<string> { | ||
| return this.objects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get agent(): string | undefined { | ||
| return this.singularNullable("https://schema.org/agent", ValueMapping.literalToString); | ||
| } | ||
| set agent(value: string | undefined) { | ||
| this.overwriteNullable("https://schema.org/agent", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { ChatSharedPreferences } from './ChatSharedPreferences.js'; | ||
| import { Participation } from './Participation.js'; | ||
| import { TermWrapper, ValueMapping, TermMapping, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ChatChannel extends TermWrapper { | ||
|
|
||
| get type(): Set<string> { | ||
| return this.objects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get author(): Set<string> { | ||
| return this.objects("http://purl.org/dc/elements/1.1/author", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get title(): string { | ||
| return this.singular("http://purl.org/dc/elements/1.1/title", ValueMapping.literalToString); | ||
| } | ||
| set title(value: string) { | ||
| this.overwrite("http://purl.org/dc/elements/1.1/title", value, TermMapping.stringToLiteral); | ||
| } | ||
| get createdDate(): Date { | ||
| return this.singular("http://purl.org/dc/elements/1.1/created", ValueMapping.literalToDate); | ||
| } | ||
| set createdDate(value: Date) { | ||
| this.overwrite("http://purl.org/dc/elements/1.1/created", value, TermMapping.dateToLiteral); | ||
| } | ||
| get sharedPreferences(): Set<ChatSharedPreferences> { | ||
| return this.objects("http://www.w3.org/ns/ui#sharedPreferences", ObjectMapping.as(ChatSharedPreferences), ObjectMapping.as(ChatSharedPreferences)); | ||
| } | ||
| get participation(): Set<Participation> { | ||
| return this.objects("http://www.w3.org/2005/01/wf/flow#participation", ObjectMapping.as(Participation), ObjectMapping.as(Participation)); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ChatMessage extends TermWrapper { | ||
|
|
||
| get createdDate(): Date { | ||
| return this.singular("http://purl.org/dc/terms/created", ValueMapping.literalToDate); | ||
| } | ||
| set createdDate(value: Date) { | ||
| this.overwrite("http://purl.org/dc/terms/created", value, TermMapping.dateToLiteral); | ||
| } | ||
| get author(): string { | ||
| return this.singular("http://xmlns.com/foaf/0.1/maker", ValueMapping.literalToString); | ||
| } | ||
| set author(value: string) { | ||
| this.overwrite("http://xmlns.com/foaf/0.1/maker", value, TermMapping.stringToLiteral); | ||
| } | ||
| get content(): string { | ||
| return this.singular("http://rdfs.org/sioc/ns#content", ValueMapping.literalToString); | ||
| } | ||
| set content(value: string) { | ||
| this.overwrite("http://rdfs.org/sioc/ns#content", value, TermMapping.stringToLiteral); | ||
| } | ||
| get relatedChatChannel(): Set<string> { | ||
| return this.objects("n3-52", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } | ||
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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ChatSharedPreferences extends TermWrapper { | ||
|
|
||
| get expandImagesInline(): boolean | undefined { | ||
| return this.singularNullable("http://www.w3.org/ns/solid/terms#expandImagesInline", ValueMapping.literalToString); | ||
| } | ||
| set expandImagesInline(value: boolean | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/ns/solid/terms#expandImagesInline", value, TermMapping.stringToLiteral); | ||
| } | ||
| get inlineImageHeight(): number | undefined { | ||
| return this.singularNullable("http://www.w3.org/ns/solid/terms#inlineImageHeightEms", ValueMapping.literalToNumber); | ||
| } | ||
| set inlineImageHeight(value: number | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/ns/solid/terms#inlineImageHeightEms", value, TermMapping.numberToLiteral); | ||
| } | ||
| get newestFirst(): boolean | undefined { | ||
| return this.singularNullable("http://www.w3.org/ns/solid/terms#newestFirst", ValueMapping.literalToString); | ||
| } | ||
| set newestFirst(value: boolean | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/ns/solid/terms#newestFirst", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { Address } from './Address.js'; | ||
| import { EmailWithType } from './EmailWithType.js'; | ||
| import { Telephone } from './Telephone.js'; | ||
| import { TermWrapper, ValueMapping, TermMapping, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ContactDetailsOrganization extends TermWrapper { | ||
|
|
||
| get organizationType(): Set<string> { | ||
| return this.objects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get name(): Set<string> { | ||
| return this.objects("http://schema.org/name", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get homepageURL(): Set<string> { | ||
| return this.objects("http://schema.org/url", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get hasAddress(): Set<Address> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasAddress", ObjectMapping.as(Address), ObjectMapping.as(Address)); | ||
| } | ||
| get hasEmailAddress(): Set<EmailWithType> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasEmail", ObjectMapping.as(EmailWithType), ObjectMapping.as(EmailWithType)); | ||
| } | ||
| get hasTelephoneNumber(): Set<Telephone> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasTelephone", ObjectMapping.as(Telephone), ObjectMapping.as(Telephone)); | ||
| } | ||
| get notes(): Set<string> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#note", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { Address } from './Address.js'; | ||
| import { EmailWithType } from './EmailWithType.js'; | ||
| import { Telephone } from './Telephone.js'; | ||
| import { TermWrapper, ValueMapping, TermMapping, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ContactDetailsPerson extends TermWrapper { | ||
|
|
||
| get fullName(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#fn", ValueMapping.literalToString); | ||
| } | ||
| set fullName(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#fn", value, TermMapping.stringToLiteral); | ||
| } | ||
| get role(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#role", ValueMapping.literalToString); | ||
| } | ||
| set role(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#role", value, TermMapping.stringToLiteral); | ||
| } | ||
| get organizationName(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#organization-name", ValueMapping.literalToString); | ||
| } | ||
| set organizationName(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#organization-name", value, TermMapping.stringToLiteral); | ||
| } | ||
| get address(): Set<Address> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasAddress", ObjectMapping.as(Address), ObjectMapping.as(Address)); | ||
| } | ||
| get email(): Set<EmailWithType> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasEmail", ObjectMapping.as(EmailWithType), ObjectMapping.as(EmailWithType)); | ||
| } | ||
| get telephone(): Set<Telephone> { | ||
| return this.objects("http://www.w3.org/2006/vcard/ns#hasTelephone", ObjectMapping.as(Telephone), ObjectMapping.as(Telephone)); | ||
| } | ||
| get dateOfBirth(): Date | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#bday", ValueMapping.literalToDate); | ||
| } | ||
| set dateOfBirth(value: Date | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#bday", value, TermMapping.dateToLiteral); | ||
| } | ||
| get notes(): string | undefined { | ||
| return this.singularNullable("http://www.w3.org/2006/vcard/ns#note", ValueMapping.literalToString); | ||
| } | ||
| set notes(value: string | undefined) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#note", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { TermWrapper, ValueMapping, TermMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class ContactOrganization extends TermWrapper { | ||
|
|
||
| get name(): string | undefined { | ||
| return this.singularNullable("http://schema.org/name", ValueMapping.literalToString); | ||
| } | ||
| set name(value: string | undefined) { | ||
| this.overwriteNullable("http://schema.org/name", value, TermMapping.stringToLiteral); | ||
| } | ||
| get homepageURL(): Set<string> { | ||
| return this.objects("http://schema.org/url", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| get typeCategory(): Set<string> { | ||
| return this.objects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", ValueMapping.literalToString, TermMapping.stringToLiteral); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string used as predicate looks like a blank node label. I'm sure this is unintentional. It would not work.
It probably highlights some fundamental parser/generator problem in the converter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unresolved - the SHACL shape property from SolidOS uses
[ sh:path [ sh:inversePath flow:message ]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for all your feedback @langsamu :-)