@twin.org/standards-foaf 0.0.3-next.53 → 0.0.3-next.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ import { JsonLdProcessor } from "@twin.org/data-json-ld";
5
5
  import { FoafContexts } from "../models/foafContexts.js";
6
6
  import { FoafTypes } from "../models/foafTypes.js";
7
7
  import AgentSchema from "../schemas/FoafAgent.json" with { type: "json" };
8
+ import ContextTypeSchema from "../schemas/FoafContextType.json" with { type: "json" };
8
9
  import DocumentSchema from "../schemas/FoafDocument.json" with { type: "json" };
9
10
  import GroupSchema from "../schemas/FoafGroup.json" with { type: "json" };
10
11
  import ImageSchema from "../schemas/FoafImage.json" with { type: "json" };
@@ -48,6 +49,10 @@ export class FoafDataTypes {
48
49
  {
49
50
  type: FoafTypes.Person,
50
51
  schema: PersonSchema
52
+ },
53
+ {
54
+ type: "ContextType",
55
+ schema: ContextTypeSchema
51
56
  }
52
57
  ];
53
58
  DataTypeHelper.registerTypes(FoafContexts.Namespace, FoafContexts.JsonLdContext, types);
@@ -1 +1 @@
1
- {"version":3,"file":"foafDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/foafDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,cAAc,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChF,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,kBAAkB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,YAAY,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,OAAgB,aAAa;IAClC;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC9B,eAAe,CAAC,WAAW,CAAC,mCAAmC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,QAAQ;gBACxB,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,YAAY;gBAC5B,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,MAAM;gBACtB,MAAM,EAAE,YAAY;aACpB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACxF,cAAc,CAAC,aAAa,CAC3B,YAAY,CAAC,mBAAmB,EAChC,YAAY,CAAC,aAAa,EAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC7D,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { FoafContexts } from \"../models/foafContexts.js\";\nimport { FoafTypes } from \"../models/foafTypes.js\";\nimport AgentSchema from \"../schemas/FoafAgent.json\" with { type: \"json\" };\nimport DocumentSchema from \"../schemas/FoafDocument.json\" with { type: \"json\" };\nimport GroupSchema from \"../schemas/FoafGroup.json\" with { type: \"json\" };\nimport ImageSchema from \"../schemas/FoafImage.json\" with { type: \"json\" };\nimport OrganizationSchema from \"../schemas/FoafOrganization.json\" with { type: \"json\" };\nimport PersonSchema from \"../schemas/FoafPerson.json\" with { type: \"json\" };\n\n/**\n * Data Type registration for FOAF\n */\nexport abstract class FoafDataTypes {\n\t/**\n\t * Register redirects for FOAF namespace to enable offline JSON-LD processing.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/xmlns.com\\/foaf\\/0.1\\//, FoafContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Agent,\n\t\t\t\tschema: AgentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Document,\n\t\t\t\tschema: DocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Group,\n\t\t\t\tschema: GroupSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Image,\n\t\t\t\tschema: ImageSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Organization,\n\t\t\t\tschema: OrganizationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Person,\n\t\t\t\tschema: PersonSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(FoafContexts.Namespace, FoafContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tFoafContexts.JsonSchemaNamespace,\n\t\t\tFoafContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Foaf${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"foafDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/foafDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,iBAAiB,MAAM,iCAAiC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,cAAc,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChF,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,WAAW,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,kBAAkB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,YAAY,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,OAAgB,aAAa;IAClC;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC9B,eAAe,CAAC,WAAW,CAAC,mCAAmC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC9F,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,QAAQ;gBACxB,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,YAAY;gBAC5B,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,MAAM;gBACtB,MAAM,EAAE,YAAY;aACpB;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,iBAAiB;aACzB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACxF,cAAc,CAAC,aAAa,CAC3B,YAAY,CAAC,mBAAmB,EAChC,YAAY,CAAC,aAAa,EAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC7D,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { FoafContexts } from \"../models/foafContexts.js\";\nimport { FoafTypes } from \"../models/foafTypes.js\";\nimport AgentSchema from \"../schemas/FoafAgent.json\" with { type: \"json\" };\nimport ContextTypeSchema from \"../schemas/FoafContextType.json\" with { type: \"json\" };\nimport DocumentSchema from \"../schemas/FoafDocument.json\" with { type: \"json\" };\nimport GroupSchema from \"../schemas/FoafGroup.json\" with { type: \"json\" };\nimport ImageSchema from \"../schemas/FoafImage.json\" with { type: \"json\" };\nimport OrganizationSchema from \"../schemas/FoafOrganization.json\" with { type: \"json\" };\nimport PersonSchema from \"../schemas/FoafPerson.json\" with { type: \"json\" };\n\n/**\n * Data Type registration for FOAF\n */\nexport abstract class FoafDataTypes {\n\t/**\n\t * Register redirects for FOAF namespace to enable offline JSON-LD processing.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/xmlns.com\\/foaf\\/0.1\\//, FoafContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Agent,\n\t\t\t\tschema: AgentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Document,\n\t\t\t\tschema: DocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Group,\n\t\t\t\tschema: GroupSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Image,\n\t\t\t\tschema: ImageSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Organization,\n\t\t\t\tschema: OrganizationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: FoafTypes.Person,\n\t\t\t\tschema: PersonSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ContextType\",\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(FoafContexts.Namespace, FoafContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tFoafContexts.JsonSchemaNamespace,\n\t\t\tFoafContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Foaf${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"foafContextType.js","sourceRoot":"","sources":["../../../src/models/foafContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { FoafContexts } from \"./foafContexts.js\";\n\n/**\n * The FOAF JSON-LD context type.\n */\nexport type FoafContextType =\n\t| typeof FoafContexts.Context\n\t| [typeof FoafContexts.Context]\n\t| [...IJsonLdContextDefinitionElement[], typeof FoafContexts.Context];\n"]}
1
+ {"version":3,"file":"foafContextType.js","sourceRoot":"","sources":["../../../src/models/foafContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { FoafContexts } from \"./foafContexts.js\";\n\n/**\n * The FOAF JSON-LD context type.\n */\nexport type FoafContextType =\n\t| typeof FoafContexts.Context\n\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof FoafContexts.Context>;\n"]}
@@ -1,66 +1,32 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafAgent",
4
+ "title": "FoafAgent",
4
5
  "description": "A FOAF Agent.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
11
+ },
12
+ "@type": {
9
13
  "anyOf": [
10
14
  {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
15
+ "const": "Agent"
13
16
  },
14
17
  {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
18
+ "const": "Person"
22
19
  },
23
20
  {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
21
+ "const": "Organization"
22
+ },
23
+ {
24
+ "const": "Group"
25
+ },
26
+ {
27
+ "type": "string"
35
28
  }
36
- ]
37
- },
38
- "@id": {
39
- "type": "string",
40
- "description": "The unique identifier for the FOAF object."
41
- },
42
- "name": {
43
- "type": "string",
44
- "description": "A name for some thing."
45
- },
46
- "title": {
47
- "type": "string",
48
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
49
- },
50
- "mbox": {
51
- "type": "string",
52
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
53
- },
54
- "homepage": {
55
- "type": "string",
56
- "description": "A homepage for some thing."
57
- },
58
- "depiction": {
59
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
60
- "description": "A depiction of some thing."
61
- },
62
- "@type": {
63
- "type": "string",
29
+ ],
64
30
  "description": "Type."
65
31
  },
66
32
  "age": {
@@ -68,7 +34,6 @@
68
34
  "description": "The age in years of some agent."
69
35
  },
70
36
  "made": {
71
- "description": "Object or array data type",
72
37
  "anyOf": [
73
38
  {
74
39
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
@@ -79,7 +44,8 @@
79
44
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
80
45
  }
81
46
  }
82
- ]
47
+ ],
48
+ "description": "Something that was made by this agent."
83
49
  },
84
50
  "weblog": {
85
51
  "$ref": "https://schema.twindev.org/foaf/FoafDocument",
@@ -100,5 +66,10 @@
100
66
  },
101
67
  "required": [
102
68
  "@type"
69
+ ],
70
+ "allOf": [
71
+ {
72
+ "$ref": "https://schema.twindev.org/foaf/FoafBaseObject"
73
+ }
103
74
  ]
104
75
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/foaf/FoafContextType",
4
+ "title": "FoafContextType",
5
+ "description": "The FOAF JSON-LD context type.",
6
+ "anyOf": [
7
+ {
8
+ "const": "https://xmlns.com/foaf/0.1/"
9
+ },
10
+ {
11
+ "type": "array",
12
+ "items": {
13
+ "anyOf": [
14
+ {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
16
+ },
17
+ {
18
+ "const": "https://xmlns.com/foaf/0.1/"
19
+ }
20
+ ]
21
+ },
22
+ "contains": {
23
+ "const": "https://xmlns.com/foaf/0.1/"
24
+ },
25
+ "minContains": 1,
26
+ "maxContains": 1,
27
+ "minItems": 1
28
+ }
29
+ ]
30
+ }
@@ -1,69 +1,22 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafDocument",
4
+ "title": "FoafDocument",
4
5
  "description": "A FOAF Document",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
11
+ },
12
+ "@type": {
9
13
  "anyOf": [
10
14
  {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
15
+ "const": "Document"
13
16
  },
14
17
  {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
18
+ "const": "Image"
35
19
  }
36
- ]
37
- },
38
- "@id": {
39
- "type": "string",
40
- "description": "The unique identifier for the FOAF object."
41
- },
42
- "name": {
43
- "type": "string",
44
- "description": "A name for some thing."
45
- },
46
- "title": {
47
- "type": "string",
48
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
49
- },
50
- "mbox": {
51
- "type": "string",
52
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
53
- },
54
- "homepage": {
55
- "type": "string",
56
- "description": "A homepage for some thing."
57
- },
58
- "depiction": {
59
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
60
- "description": "A depiction of some thing."
61
- },
62
- "@type": {
63
- "type": "string",
64
- "enum": [
65
- "Document",
66
- "Image"
67
20
  ],
68
21
  "description": "Type."
69
22
  },
@@ -72,7 +25,6 @@
72
25
  "description": "A topic of some page or document."
73
26
  },
74
27
  "primaryTopic": {
75
- "description": "Object or array data type",
76
28
  "anyOf": [
77
29
  {
78
30
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
@@ -83,7 +35,8 @@
83
35
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
84
36
  }
85
37
  }
86
- ]
38
+ ],
39
+ "description": "The primary topic of some page or document."
87
40
  },
88
41
  "sha1": {
89
42
  "type": "string",
@@ -92,5 +45,10 @@
92
45
  },
93
46
  "required": [
94
47
  "@type"
48
+ ],
49
+ "allOf": [
50
+ {
51
+ "$ref": "https://schema.twindev.org/foaf/FoafBaseObject"
52
+ }
95
53
  ]
96
54
  }
@@ -1,105 +1,19 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafGroup",
4
+ "title": "FoafGroup",
4
5
  "description": "A FOAF Group.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
35
- }
36
- ]
37
- },
38
- "@id": {
39
- "type": "string",
40
- "description": "The unique identifier for the FOAF object."
41
- },
42
- "name": {
43
- "type": "string",
44
- "description": "A name for some thing."
45
- },
46
- "title": {
47
- "type": "string",
48
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
49
- },
50
- "mbox": {
51
- "type": "string",
52
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
53
- },
54
- "homepage": {
55
- "type": "string",
56
- "description": "A homepage for some thing."
57
- },
58
- "depiction": {
59
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
60
- "description": "A depiction of some thing."
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
61
11
  },
62
12
  "@type": {
63
- "type": "string",
64
13
  "const": "Group",
65
14
  "description": "Type."
66
15
  },
67
- "age": {
68
- "type": "number",
69
- "description": "The age in years of some agent."
70
- },
71
- "made": {
72
- "description": "Object or array data type",
73
- "anyOf": [
74
- {
75
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
76
- },
77
- {
78
- "type": "array",
79
- "items": {
80
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
81
- }
82
- }
83
- ]
84
- },
85
- "weblog": {
86
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
87
- "description": "A weblog of some thing (whether person, group, company etc.)."
88
- },
89
- "openid": {
90
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
91
- "description": "An OpenID for an agent."
92
- },
93
- "interest": {
94
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
95
- "description": "A page about a topic of interest to this person."
96
- },
97
- "topic_interest": {
98
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
99
- "description": "A thing of interest to this person."
100
- },
101
16
  "member": {
102
- "description": "Object or array data type",
103
17
  "anyOf": [
104
18
  {
105
19
  "$ref": "https://schema.twindev.org/foaf/FoafAgent"
@@ -110,10 +24,16 @@
110
24
  "$ref": "https://schema.twindev.org/foaf/FoafAgent"
111
25
  }
112
26
  }
113
- ]
27
+ ],
28
+ "description": "Indicates a member of a Group"
114
29
  }
115
30
  },
116
31
  "required": [
117
32
  "@type"
33
+ ],
34
+ "allOf": [
35
+ {
36
+ "$ref": "https://schema.twindev.org/foaf/FoafAgent"
37
+ }
118
38
  ]
119
39
  }
@@ -1,91 +1,18 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafImage",
4
+ "title": "FoafImage",
4
5
  "description": "A FOAF image.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
35
- }
36
- ]
37
- },
38
- "@id": {
39
- "type": "string",
40
- "description": "The unique identifier for the FOAF object."
41
- },
42
- "name": {
43
- "type": "string",
44
- "description": "A name for some thing."
45
- },
46
- "title": {
47
- "type": "string",
48
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
49
- },
50
- "mbox": {
51
- "type": "string",
52
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
53
- },
54
- "homepage": {
55
- "type": "string",
56
- "description": "A homepage for some thing."
57
- },
58
- "depiction": {
59
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
60
- "description": "A depiction of some thing."
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
61
11
  },
62
12
  "@type": {
63
- "type": "string",
64
13
  "const": "Image",
65
14
  "description": "Type."
66
15
  },
67
- "topic": {
68
- "type": "string",
69
- "description": "A topic of some page or document."
70
- },
71
- "primaryTopic": {
72
- "description": "Object or array data type",
73
- "anyOf": [
74
- {
75
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
76
- },
77
- {
78
- "type": "array",
79
- "items": {
80
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
81
- }
82
- }
83
- ]
84
- },
85
- "sha1": {
86
- "type": "string",
87
- "description": "A sha1sum hash, in hex."
88
- },
89
16
  "depicts": {
90
17
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
91
18
  "description": "A thing depicted in this representation."
@@ -97,5 +24,10 @@
97
24
  },
98
25
  "required": [
99
26
  "@type"
27
+ ],
28
+ "allOf": [
29
+ {
30
+ "$ref": "https://schema.twindev.org/foaf/FoafDocument"
31
+ }
100
32
  ]
101
33
  }
@@ -1,105 +1,25 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafOrganization",
4
+ "title": "FoafOrganization",
4
5
  "description": "A FOAF Organization.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
35
- }
36
- ]
37
- },
38
- "@id": {
39
- "type": "string",
40
- "description": "The unique identifier for the FOAF object."
41
- },
42
- "name": {
43
- "type": "string",
44
- "description": "A name for some thing."
45
- },
46
- "title": {
47
- "type": "string",
48
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
49
- },
50
- "mbox": {
51
- "type": "string",
52
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
53
- },
54
- "homepage": {
55
- "type": "string",
56
- "description": "A homepage for some thing."
57
- },
58
- "depiction": {
59
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
60
- "description": "A depiction of some thing."
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
61
11
  },
62
12
  "@type": {
63
- "type": "string",
64
13
  "const": "Organization",
65
14
  "description": "Type."
66
- },
67
- "age": {
68
- "type": "number",
69
- "description": "The age in years of some agent."
70
- },
71
- "made": {
72
- "description": "Object or array data type",
73
- "anyOf": [
74
- {
75
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
76
- },
77
- {
78
- "type": "array",
79
- "items": {
80
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
81
- }
82
- }
83
- ]
84
- },
85
- "weblog": {
86
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
87
- "description": "A weblog of some thing (whether person, group, company etc.)."
88
- },
89
- "openid": {
90
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
91
- "description": "An OpenID for an agent."
92
- },
93
- "interest": {
94
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
95
- "description": "A page about a topic of interest to this person."
96
- },
97
- "topic_interest": {
98
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
99
- "description": "A thing of interest to this person."
100
15
  }
101
16
  },
102
17
  "required": [
103
18
  "@type"
19
+ ],
20
+ "allOf": [
21
+ {
22
+ "$ref": "https://schema.twindev.org/foaf/FoafAgent"
23
+ }
104
24
  ]
105
25
  }