-
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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); | ||
| } | ||
| } | ||
tgra marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { AcpAccessControl } from './AcpAccessControl'; | ||
|
||
| import { ValueMapping, TermMapping, TermWrapper, 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) { | ||
tgra marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| this.overwriteNullable("http://www.w3.org/ns/solid/acp#resource", value, TermMapping.stringToIri); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { AccessControlPolicy } from './AccessControlPolicy'; | ||
| import { ValueMapping, TermMapping, 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)); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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) { | ||
| 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) { | ||
| 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) { | ||
| 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) { | ||
| 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) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#country-name", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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); | ||
| } | ||
| } |
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } from "rdfjs-wrapper"; | ||
|
|
||
| export class Agent extends TermWrapper { | ||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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) { | ||
| this.overwriteNullable("https://schema.org/agent", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { ChatSharedPreferences } from './ChatSharedPreferences'; | ||
| import { Participation } from './Participation'; | ||
| import { ValueMapping, TermMapping, TermWrapper, 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)); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unresolved - the SHACL shape property from SolidOS uses
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for all your feedback @langsamu :-) |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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) { | ||
| 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) { | ||
| 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) { | ||
| this.overwriteNullable("http://www.w3.org/ns/solid/terms#newestFirst", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { Address } from './Address'; | ||
| import { EmailWithType } from './EmailWithType'; | ||
| import { Telephone } from './Telephone'; | ||
| import { ValueMapping, TermMapping, TermWrapper, 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); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { Address } from './Address'; | ||
| import { EmailWithType } from './EmailWithType'; | ||
| import { Telephone } from './Telephone'; | ||
| import { ValueMapping, TermMapping, TermWrapper, 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) { | ||
| 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) { | ||
| 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) { | ||
| 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) { | ||
| 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) { | ||
| this.overwriteNullable("http://www.w3.org/2006/vcard/ns#note", value, TermMapping.stringToLiteral); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { ValueMapping, TermMapping, TermWrapper, ObjectMapping } 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) { | ||
| 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); | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.