@twin.org/standards-foaf 0.0.3-next.9 → 0.9.0-next.1
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.
- package/README.md +1 -1
- package/dist/es/dataTypes/foafDataTypes.js +35 -38
- package/dist/es/dataTypes/foafDataTypes.js.map +1 -1
- package/dist/es/models/IFoafBaseObject.js.map +1 -1
- package/dist/es/models/IFoafImage.js.map +1 -1
- package/dist/es/models/foafContextType.js.map +1 -1
- package/dist/es/models/foafContexts.js +12 -6
- package/dist/es/models/foafContexts.js.map +1 -1
- package/dist/es/schemas/FoafAgent.json +18 -119
- package/dist/es/schemas/FoafContextType.json +30 -0
- package/dist/es/schemas/FoafDocument.json +13 -127
- package/dist/es/schemas/FoafGroup.json +10 -162
- package/dist/es/schemas/FoafImage.json +8 -148
- package/dist/es/schemas/FoafOrganization.json +8 -160
- package/dist/es/schemas/FoafPerson.json +10 -162
- package/dist/types/models/IFoafBaseObject.d.ts +5 -2
- package/dist/types/models/IFoafImage.d.ts +0 -1
- package/dist/types/models/foafContextType.d.ts +2 -1
- package/dist/types/models/foafContexts.d.ts +12 -6
- package/docs/changelog.md +458 -9
- package/docs/examples.md +21 -1
- package/docs/reference/classes/FoafDataTypes.md +2 -2
- package/docs/reference/interfaces/IFoafAgent.md +37 -33
- package/docs/reference/interfaces/IFoafBaseObject.md +18 -22
- package/docs/reference/interfaces/IFoafDocument.md +30 -26
- package/docs/reference/interfaces/IFoafGroup.md +39 -31
- package/docs/reference/interfaces/IFoafImage.md +34 -26
- package/docs/reference/interfaces/IFoafOrganization.md +37 -29
- package/docs/reference/interfaces/IFoafPerson.md +47 -39
- package/docs/reference/type-aliases/FoafContextType.md +1 -1
- package/docs/reference/variables/FoafContexts.md +17 -9
- package/docs/reference/variables/FoafTypes.md +6 -6
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Standards FOAF
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides data models for the [FOAF vocabulary](https://xmlns.com/foaf/spec/), supporting interoperable descriptions of people, organisations, and social relationships.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Copyright 2025 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
import {
|
|
3
|
+
import { DataTypeHelper } from "@twin.org/data-core";
|
|
4
4
|
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" };
|
|
@@ -18,48 +19,44 @@ export class FoafDataTypes {
|
|
|
18
19
|
* Register redirects for FOAF namespace to enable offline JSON-LD processing.
|
|
19
20
|
*/
|
|
20
21
|
static registerRedirects() {
|
|
21
|
-
JsonLdProcessor.addRedirect(/https?:\/\/xmlns.com\/foaf\/0.1\//, FoafContexts.
|
|
22
|
+
JsonLdProcessor.addRedirect(/https?:\/\/xmlns.com\/foaf\/0.1\//, FoafContexts.JsonLdContext);
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Register all the data types.
|
|
25
26
|
*/
|
|
26
27
|
static registerTypes() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
type: FoafTypes.Person,
|
|
60
|
-
defaultValue: {},
|
|
61
|
-
jsonSchema: async () => PersonSchema
|
|
62
|
-
}));
|
|
28
|
+
const types = [
|
|
29
|
+
{
|
|
30
|
+
type: FoafTypes.Agent,
|
|
31
|
+
schema: AgentSchema
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: FoafTypes.Document,
|
|
35
|
+
schema: DocumentSchema
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: FoafTypes.Group,
|
|
39
|
+
schema: GroupSchema
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: FoafTypes.Image,
|
|
43
|
+
schema: ImageSchema
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: FoafTypes.Organization,
|
|
47
|
+
schema: OrganizationSchema
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: FoafTypes.Person,
|
|
51
|
+
schema: PersonSchema
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "ContextType",
|
|
55
|
+
schema: ContextTypeSchema
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
DataTypeHelper.registerTypes(FoafContexts.Namespace, FoafContexts.JsonLdContext, types);
|
|
59
|
+
DataTypeHelper.registerTypes(FoafContexts.JsonSchemaNamespace, FoafContexts.JsonLdContext, types.map(t => ({ type: `Foaf${t.type}`, schema: t.schema })));
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
//# sourceMappingURL=foafDataTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foafDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/foafDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,
|
|
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":"IFoafBaseObject.js","sourceRoot":"","sources":["../../../src/models/IFoafBaseObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"IFoafBaseObject.js","sourceRoot":"","sources":["../../../src/models/IFoafBaseObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { FoafContextType } from \"./foafContextType.js\";\nimport type { IFoafImage } from \"./IFoafImage.js\";\n\n/**\n * Core FOAF Properties\n * @see http://xmlns.com/foaf/0.1/\n */\nexport interface IFoafBaseObject {\n\t/**\n\t * The LD Context.\n\t */\n\t\"@context\"?: FoafContextType;\n\n\t/**\n\t * The unique identifier for the FOAF object.\n\t */\n\t\"@id\"?: string;\n\n\t/**\n\t * A name for some thing.\n\t * @see http://xmlns.com/foaf/spec/#term_name\n\t */\n\tname?: string;\n\n\t/**\n\t * Title (Mr, Mrs, Ms, Dr. etc)\n\t * @see http://xmlns.com/foaf/spec/#term_title\n\t */\n\ttitle?: string;\n\n\t/**\n\t * A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox\n\t * @see http://xmlns.com/foaf/spec/#term_mbox\n\t */\n\tmbox?: string;\n\n\t/**\n\t * A homepage for some thing.\n\t * @see http://xmlns.com/foaf/spec/#term_homepage\n\t */\n\thomepage?: string;\n\n\t/**\n\t * A depiction of some thing.\n\t * @see http://xmlns.com/foaf/spec/#term_depiction\n\t */\n\tdepiction?: IFoafImage;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFoafImage.js","sourceRoot":"","sources":["../../../src/models/IFoafImage.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { FoafContextType } from \"./foafContextType.js\";\nimport type { FoafTypes } from \"./foafTypes.js\";\nimport type { IFoafDocument } from \"./IFoafDocument.js\";\n\n/**\n * A FOAF image.\n * @see http://xmlns.com/foaf/0.1/\n */\nexport interface IFoafImage extends IFoafDocument {\n\t/**\n\t * The LD Context.\n\t
|
|
1
|
+
{"version":3,"file":"IFoafImage.js","sourceRoot":"","sources":["../../../src/models/IFoafImage.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { FoafContextType } from \"./foafContextType.js\";\nimport type { FoafTypes } from \"./foafTypes.js\";\nimport type { IFoafDocument } from \"./IFoafDocument.js\";\n\n/**\n * A FOAF image.\n * @see http://xmlns.com/foaf/0.1/\n */\nexport interface IFoafImage extends IFoafDocument {\n\t/**\n\t * The LD Context.\n\t */\n\t\"@context\"?: FoafContextType;\n\n\t/**\n\t * Type.\n\t */\n\t\"@type\": typeof FoafTypes.Image;\n\n\t/**\n\t * A thing depicted in this representation.\n\t * @see http://xmlns.com/foaf/spec/#term_depicts\n\t */\n\tdepicts?: IJsonLdNodeObject;\n\n\t/**\n\t * A derived thumbnail image.\n\t * @see http://xmlns.com/foaf/spec/#term_thumbnail\n\t */\n\tthumbnail?: IFoafImage;\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.
|
|
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"]}
|
|
@@ -6,16 +6,22 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const FoafContexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The canonical RDF namespace URI.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
Namespace: "https://xmlns.com/foaf/0.1/",
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The value to use in @context.
|
|
14
|
+
* Note: Context matches Namespace (both include trailing slash) as per FOAF specification.
|
|
15
|
+
* The FOAF JSON-LD context URL format includes a trailing slash.
|
|
14
16
|
*/
|
|
15
|
-
|
|
17
|
+
Context: "https://xmlns.com/foaf/0.1/",
|
|
16
18
|
/**
|
|
17
|
-
* The
|
|
19
|
+
* The JSON-LD Context URL.
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
JsonLdContext: "https://schema.twindev.org/foaf/types.jsonld",
|
|
22
|
+
/**
|
|
23
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
24
|
+
*/
|
|
25
|
+
JsonSchemaNamespace: "https://schema.twindev.org/foaf/"
|
|
20
26
|
};
|
|
21
27
|
//# sourceMappingURL=foafContexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foafContexts.js","sourceRoot":"","sources":["../../../src/models/foafContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"foafContexts.js","sourceRoot":"","sources":["../../../src/models/foafContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,6BAA6B;IAExC;;;;OAIG;IACH,OAAO,EAAE,6BAA6B;IAEtC;;OAEG;IACH,aAAa,EAAE,8CAA8C;IAE7D;;OAEG;IACH,mBAAmB,EAAE,kCAAkC;CAC9C,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The LD Contexts concerning FOAF.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const FoafContexts = {\n\t/**\n\t * The canonical RDF namespace URI.\n\t */\n\tNamespace: \"https://xmlns.com/foaf/0.1/\",\n\n\t/**\n\t * The value to use in @context.\n\t * Note: Context matches Namespace (both include trailing slash) as per FOAF specification.\n\t * The FOAF JSON-LD context URL format includes a trailing slash.\n\t */\n\tContext: \"https://xmlns.com/foaf/0.1/\",\n\n\t/**\n\t * The JSON-LD Context URL.\n\t */\n\tJsonLdContext: \"https://schema.twindev.org/foaf/types.jsonld\",\n\n\t/**\n\t * The namespace location of the hosted version of the JSON Schema.\n\t */\n\tJsonSchemaNamespace: \"https://schema.twindev.org/foaf/\"\n} as const;\n\n/**\n * The LD Contexts concerning FOAF.\n */\nexport type FoafContexts = (typeof FoafContexts)[keyof typeof FoafContexts];\n"]}
|
|
@@ -1,121 +1,39 @@
|
|
|
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
|
-
"
|
|
9
|
-
"
|
|
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
|
-
]
|
|
9
|
+
"$ref": "https://schema.twindev.org/foaf/FoafContextType",
|
|
10
|
+
"description": "The LD Context."
|
|
37
11
|
},
|
|
38
|
-
"@
|
|
12
|
+
"@type": {
|
|
39
13
|
"anyOf": [
|
|
40
14
|
{
|
|
41
|
-
"
|
|
15
|
+
"const": "Agent"
|
|
42
16
|
},
|
|
43
17
|
{
|
|
44
|
-
"
|
|
45
|
-
"items": {
|
|
46
|
-
"type": "string"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"@included": {
|
|
52
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
53
|
-
},
|
|
54
|
-
"@graph": {
|
|
55
|
-
"anyOf": [
|
|
56
|
-
{
|
|
57
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
18
|
+
"const": "Person"
|
|
58
19
|
},
|
|
59
20
|
{
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
"@nest": {
|
|
68
|
-
"anyOf": [
|
|
21
|
+
"const": "Organization"
|
|
22
|
+
},
|
|
69
23
|
{
|
|
70
|
-
"
|
|
24
|
+
"const": "Group"
|
|
71
25
|
},
|
|
72
26
|
{
|
|
73
|
-
"type": "
|
|
74
|
-
"items": {
|
|
75
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
76
|
-
}
|
|
27
|
+
"type": "string"
|
|
77
28
|
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"@type": {
|
|
81
|
-
"type": "string",
|
|
29
|
+
],
|
|
82
30
|
"description": "Type."
|
|
83
31
|
},
|
|
84
|
-
"@reverse": {
|
|
85
|
-
"type": "object",
|
|
86
|
-
"additionalProperties": {
|
|
87
|
-
"type": "string"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"@index": {
|
|
91
|
-
"type": "string"
|
|
92
|
-
},
|
|
93
|
-
"name": {
|
|
94
|
-
"type": "string",
|
|
95
|
-
"description": "A name for some thing."
|
|
96
|
-
},
|
|
97
|
-
"title": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"description": "Title (Mr, Mrs, Ms, Dr. etc)"
|
|
100
|
-
},
|
|
101
|
-
"mbox": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
|
|
104
|
-
},
|
|
105
|
-
"homepage": {
|
|
106
|
-
"type": "string",
|
|
107
|
-
"description": "A homepage for some thing."
|
|
108
|
-
},
|
|
109
|
-
"depiction": {
|
|
110
|
-
"$ref": "https://schema.twindev.org/foaf/FoafImage",
|
|
111
|
-
"description": "A depiction of some thing."
|
|
112
|
-
},
|
|
113
32
|
"age": {
|
|
114
33
|
"type": "number",
|
|
115
34
|
"description": "The age in years of some agent."
|
|
116
35
|
},
|
|
117
36
|
"made": {
|
|
118
|
-
"description": "Object or array data type",
|
|
119
37
|
"anyOf": [
|
|
120
38
|
{
|
|
121
39
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
@@ -126,7 +44,8 @@
|
|
|
126
44
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
127
45
|
}
|
|
128
46
|
}
|
|
129
|
-
]
|
|
47
|
+
],
|
|
48
|
+
"description": "Something that was made by this agent."
|
|
130
49
|
},
|
|
131
50
|
"weblog": {
|
|
132
51
|
"$ref": "https://schema.twindev.org/foaf/FoafDocument",
|
|
@@ -148,29 +67,9 @@
|
|
|
148
67
|
"required": [
|
|
149
68
|
"@type"
|
|
150
69
|
],
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"type": "array"
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
70
|
+
"allOf": [
|
|
71
|
+
{
|
|
72
|
+
"$ref": "https://schema.twindev.org/foaf/FoafBaseObject"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
176
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,125 +1,30 @@
|
|
|
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
|
-
"
|
|
9
|
-
"
|
|
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
|
-
]
|
|
9
|
+
"$ref": "https://schema.twindev.org/foaf/FoafContextType",
|
|
10
|
+
"description": "The LD Context."
|
|
37
11
|
},
|
|
38
|
-
"@
|
|
39
|
-
"anyOf": [
|
|
40
|
-
{
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"type": "array",
|
|
45
|
-
"items": {
|
|
46
|
-
"type": "string"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"@included": {
|
|
52
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
53
|
-
},
|
|
54
|
-
"@graph": {
|
|
55
|
-
"anyOf": [
|
|
56
|
-
{
|
|
57
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"type": "array",
|
|
61
|
-
"items": {
|
|
62
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
"@nest": {
|
|
12
|
+
"@type": {
|
|
68
13
|
"anyOf": [
|
|
69
14
|
{
|
|
70
|
-
"
|
|
15
|
+
"const": "Document"
|
|
71
16
|
},
|
|
72
17
|
{
|
|
73
|
-
"
|
|
74
|
-
"items": {
|
|
75
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
76
|
-
}
|
|
18
|
+
"const": "Image"
|
|
77
19
|
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"@type": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"enum": [
|
|
83
|
-
"Document",
|
|
84
|
-
"Image"
|
|
85
20
|
],
|
|
86
21
|
"description": "Type."
|
|
87
22
|
},
|
|
88
|
-
"@reverse": {
|
|
89
|
-
"type": "object",
|
|
90
|
-
"additionalProperties": {
|
|
91
|
-
"type": "string"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"@index": {
|
|
95
|
-
"type": "string"
|
|
96
|
-
},
|
|
97
|
-
"name": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"description": "A name for some thing."
|
|
100
|
-
},
|
|
101
|
-
"title": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"description": "Title (Mr, Mrs, Ms, Dr. etc)"
|
|
104
|
-
},
|
|
105
|
-
"mbox": {
|
|
106
|
-
"type": "string",
|
|
107
|
-
"description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
|
|
108
|
-
},
|
|
109
|
-
"homepage": {
|
|
110
|
-
"type": "string",
|
|
111
|
-
"description": "A homepage for some thing."
|
|
112
|
-
},
|
|
113
|
-
"depiction": {
|
|
114
|
-
"$ref": "https://schema.twindev.org/foaf/FoafImage",
|
|
115
|
-
"description": "A depiction of some thing."
|
|
116
|
-
},
|
|
117
23
|
"topic": {
|
|
118
24
|
"type": "string",
|
|
119
25
|
"description": "A topic of some page or document."
|
|
120
26
|
},
|
|
121
27
|
"primaryTopic": {
|
|
122
|
-
"description": "Object or array data type",
|
|
123
28
|
"anyOf": [
|
|
124
29
|
{
|
|
125
30
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
@@ -130,7 +35,8 @@
|
|
|
130
35
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
131
36
|
}
|
|
132
37
|
}
|
|
133
|
-
]
|
|
38
|
+
],
|
|
39
|
+
"description": "The primary topic of some page or document."
|
|
134
40
|
},
|
|
135
41
|
"sha1": {
|
|
136
42
|
"type": "string",
|
|
@@ -140,29 +46,9 @@
|
|
|
140
46
|
"required": [
|
|
141
47
|
"@type"
|
|
142
48
|
],
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
{
|
|
149
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"type": "array"
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
}
|
|
49
|
+
"allOf": [
|
|
50
|
+
{
|
|
51
|
+
"$ref": "https://schema.twindev.org/foaf/FoafBaseObject"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
168
54
|
}
|