v0.0.1 - initial working generation

This commit is contained in:
sneakers-the-rat 2024-01-13 03:23:50 -08:00
parent abe84e0df2
commit 26e3b1ef0c
No known key found for this signature in database
GPG Key ID: 6DCB96EF1E4D232D
33 changed files with 49119 additions and 857 deletions

View File

@ -8,18 +8,14 @@ SHELL := bash
RUN = poetry run
# get values from about.yaml file
SCHEMA_NAME = $(shell ${SHELL} ./utils/get-value.sh name)
SOURCE_SCHEMA_PATH = $(shell ${SHELL} ./utils/get-value.sh source_schema_path)
SCHEMA_NAME = "linkml_activitypub"
SOURCE_SCHEMA_PATH = "linkml_activitypub/activitypub.yaml"
SOURCE_SCHEMA_DIR = $(dir $(SOURCE_SCHEMA_PATH))
SRC = src
DEST = project
PYMODEL = $(SRC)/$(SCHEMA_NAME)/datamodel
DEST = generated
PYMODEL = $(SCHEMA_NAME)
DOCDIR = docs
EXAMPLEDIR = examples
SHEET_MODULE = personinfo_enums
SHEET_ID = $(shell ${SHELL} ./utils/get-value.sh google_sheet_id)
SHEET_TABS = $(shell ${SHELL} ./utils/get-value.sh google_sheet_tabs)
SHEET_MODULE_PATH = $(SOURCE_SCHEMA_DIR)/$(SHEET_MODULE).yaml
# environment variables
include config.env
@ -103,8 +99,10 @@ gen-examples:
# generates all project files
gen-project: $(PYMODEL)
$(RUN) gen-project ${GEN_PARGS} -d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL)
$(RUN) gen-project ${GEN_PARGS} -d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL)/dataclass/
gen-pydantic: $(PYMODEL)
$(RUN) gen-pydantic $(SOURCE_SCHEMA_PATH) --pydantic-version 2 > $(PYMODEL)/activitypub.py
test: test-schema test-python test-examples
@ -185,4 +183,4 @@ clean:
rm -fr docs/*
rm -fr $(PYMODEL)/*
include project.Makefile
#include project.Makefile

View File

@ -2,6 +2,8 @@
LinkML representation of ActivityPub schema (which is mostly ActivityStreams except where it's not)
https://pypi.org/projects/linkml-activitypub
## Process
Intermediate files are in the `data` directory
@ -37,6 +39,7 @@ Then the final schema in `linkml_activitypub/activitypub.yaml`:
- `items` is marked as `list_elements_ordered: true` on `OrderedCollection` and false on `Collection`
- Made types
- anyURI as `xsd:anyURI`, did not try and find a validator pattern. The spec alternatingly uses its own anyURI prop and `xsd:anyURI`
- `duration` as a string that indicates it's a `xsd:duration`, finding a pattern is TODO
- Made enums
- `unitEnum` - for `unit`
- Copied Notes to class `description` rather than `comments`
@ -55,6 +58,7 @@ Need properties...
class definition, since `OrderedCollection` inherits from `Collection` but asserts that the `list_items_ordered` slot is `true`
rather than `false`. Instead, the slots from `CollectionPage` are just duplicated.
- Accordingly, the domain and range of slots that include `CollectionPage` also include `OrderedCollectionPage
- Need to implement some `xsd:duration` pattern
# References

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
type Address
{
street: String
city: String
postalCode: String
}
type FamilialRelationship
{
startedAtTime: Date
endedAtTime: Date
relatedTo: String
type: FamilialRelationshipType!
relatedTo: Person!
}
interface HasAliases
{
aliases: [String]
}
type NamedThing
{
id: String!
name: String
description: String
image: String
}
type Organization implements HasAliases
{
id: String!
name: String
description: String
image: String
missionStatement: String
foundingDate: String
aliases: [String]
}
type Person implements HasAliases
{
id: String!
name: String
description: String
image: String
primaryEmail: String
birthDate: String
ageInYears: Integer
currentAddress: Address
hasFamilialRelationships: [FamilialRelationship]
aliases: [String]
}
type Registry
{
persons: [Person]
organizations: [Organization]
}
type Relationship
{
startedAtTime: Date
endedAtTime: Date
relatedTo: String
type: String
}

View File

@ -0,0 +1,97 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2024-01-13T03:10:04",
"source": "activitypub.yaml"
},
"@context": {
"as": "http://www.w3.org/ns/activitystreams#",
"linkml": "https://w3id.org/linkml/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "http://schema.org/",
"unit": "http://qudt.org/2.1/vocab/unit/",
"xml": {
"@id": "http://www.w3.org/XML/1998/namespace",
"@prefix": true
},
"xsd": "http://www.w3.org/2001/XMLSchema#",
"@vocab": "http://www.w3.org/ns/activitystreams#",
"accuracy": {
"@type": "xsd:float"
},
"altitude": {
"@type": "xsd:float"
},
"deleted": {
"@type": "xsd:dateTime"
},
"describes": {
"@type": "@id"
},
"duration": {
"@type": "xsd:duration"
},
"endTime": {
"@type": "xsd:dateTime"
},
"formerType": {
"@type": "@id"
},
"height": {
"@type": "xsd:nonNegativeInteger"
},
"href": {
"@type": "@id"
},
"id": {
"@type": "@id"
},
"latitude": {
"@type": "xsd:float"
},
"longitude": {
"@type": "xsd:float"
},
"name": {
"@id": "rdfs:name"
},
"published": {
"@type": "xsd:dateTime"
},
"radius": {
"@type": "xsd:float"
},
"relationship": {
"@type": "@id"
},
"replies": {
"@type": "@id"
},
"startIndex": {
"@type": "xsd:nonNegativeInteger"
},
"startTime": {
"@type": "xsd:dateTime"
},
"totalItems": {
"@type": "xsd:nonNegativeInteger"
},
"type": {
"@type": "@id"
},
"updated": {
"@type": "xsd:dateTime"
},
"width": {
"@type": "xsd:nonNegativeInteger"
},
"Property": {
"@id": "rdf:Property"
},
"Statement": {
"@id": "rdf:Statement"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
{
"_comments": "Auto generated from activitystreams.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-09-06T10:01:44\n Schema: my_datamodel\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/my_org/my_datamodel\n description: Enter a detailed description of your project here\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
"@context": {
"PATO": {
"@id": "http://purl.obolibrary.org/obo/PATO_",
"@prefix": true
},
"biolink": "https://w3id.org/biolink/",
"famrel": "http://example.org/famrel/",
"linkml": "https://w3id.org/linkml/",
"my_datamodel": {
"@id": "https://w3id.org/my_org/my_datamodel",
"@prefix": true
},
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/",
"@vocab": "https://w3id.org/my_org/my_datamodel",
"age_in_years": {
"@type": "xsd:integer"
},
"birth_date": {
"@id": "schema:birthDate"
},
"current_address": {
"@type": "@id"
},
"description": {
"@id": "schema:description"
},
"employed_at": {
"@type": "@id"
},
"ended_at_time": {
"@type": "xsd:date",
"@id": "prov:endedAtTime"
},
"has_familial_relationships": {
"@type": "@id"
},
"id": "@id",
"image": {
"@id": "schema:image"
},
"is_current": {
"@type": "xsd:boolean"
},
"name": {
"@id": "schema:name"
},
"primary_email": {
"@id": "schema:email"
},
"organizations": {
"@type": "@id"
},
"persons": {
"@type": "@id"
},
"related_to": {
"@type": "@id"
},
"started_at_time": {
"@type": "xsd:date",
"@id": "prov:startedAtTime"
},
"Address": {
"@id": "schema:PostalAddress"
},
"Organization": {
"@id": "schema:Organization"
},
"Person": {
"@id": "schema:Person"
}
}
}

View File

@ -0,0 +1,824 @@
{
"name": "my_datamodel",
"description": "Enter a detailed description of your project here",
"title": "My Datamodel",
"see_also": [
"https://example.org/"
],
"id": "https://w3id.org/my_org/my_datamodel",
"imports": [
"linkml:types"
],
"license": "https://creativecommons.org/publicdomain/zero/1.0/",
"prefixes": [
{
"prefix_prefix": "my_datamodel",
"prefix_reference": "https://w3id.org/my_org/my_datamodel"
},
{
"prefix_prefix": "linkml",
"prefix_reference": "https://w3id.org/linkml/"
},
{
"prefix_prefix": "biolink",
"prefix_reference": "https://w3id.org/biolink/"
},
{
"prefix_prefix": "schema",
"prefix_reference": "http://schema.org/"
},
{
"prefix_prefix": "PATO",
"prefix_reference": "http://purl.obolibrary.org/obo/PATO_"
},
{
"prefix_prefix": "famrel",
"prefix_reference": "http://example.org/famrel/"
}
],
"default_curi_maps": [
"semweb_context"
],
"default_prefix": "my_datamodel",
"default_range": "string",
"types": [
{
"name": "string",
"definition_uri": "https://w3id.org/linkml/String",
"description": "A character string",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "str",
"uri": "http://www.w3.org/2001/XMLSchema#string",
"@type": "TypeDefinition"
},
{
"name": "integer",
"definition_uri": "https://w3id.org/linkml/Integer",
"description": "An integer",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "int",
"uri": "http://www.w3.org/2001/XMLSchema#integer",
"@type": "TypeDefinition"
},
{
"name": "boolean",
"definition_uri": "https://w3id.org/linkml/Boolean",
"description": "A binary (true or false) value",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "Bool",
"uri": "http://www.w3.org/2001/XMLSchema#boolean",
"repr": "bool",
"@type": "TypeDefinition"
},
{
"name": "float",
"definition_uri": "https://w3id.org/linkml/Float",
"description": "A real number that conforms to the xsd:float specification",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "float",
"uri": "http://www.w3.org/2001/XMLSchema#float",
"@type": "TypeDefinition"
},
{
"name": "double",
"definition_uri": "https://w3id.org/linkml/Double",
"description": "A real number that conforms to the xsd:double specification",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "float",
"uri": "http://www.w3.org/2001/XMLSchema#double",
"@type": "TypeDefinition"
},
{
"name": "decimal",
"definition_uri": "https://w3id.org/linkml/Decimal",
"description": "A real number with arbitrary precision that conforms to the xsd:decimal specification",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "Decimal",
"uri": "http://www.w3.org/2001/XMLSchema#decimal",
"@type": "TypeDefinition"
},
{
"name": "time",
"definition_uri": "https://w3id.org/linkml/Time",
"description": "A time object represents a (local) time of day, independent of any particular day",
"notes": [
"URI is dateTime because OWL reasoners do not work with straight date or time"
],
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "XSDTime",
"uri": "http://www.w3.org/2001/XMLSchema#dateTime",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "date",
"definition_uri": "https://w3id.org/linkml/Date",
"description": "a date (year, month and day) in an idealized calendar",
"notes": [
"URI is dateTime because OWL reasoners don't work with straight date or time"
],
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "XSDDate",
"uri": "http://www.w3.org/2001/XMLSchema#date",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "datetime",
"definition_uri": "https://w3id.org/linkml/Datetime",
"description": "The combination of a date and time",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "XSDDateTime",
"uri": "http://www.w3.org/2001/XMLSchema#dateTime",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "date_or_datetime",
"definition_uri": "https://w3id.org/linkml/DateOrDatetime",
"description": "Either a date or a datetime",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "str",
"uri": "https://w3id.org/linkml/DateOrDatetime",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "uriorcurie",
"definition_uri": "https://w3id.org/linkml/Uriorcurie",
"description": "a URI or a CURIE",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "URIorCURIE",
"uri": "http://www.w3.org/2001/XMLSchema#anyURI",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "uri",
"definition_uri": "https://w3id.org/linkml/Uri",
"description": "a complete URI",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "URI",
"uri": "http://www.w3.org/2001/XMLSchema#anyURI",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "ncname",
"definition_uri": "https://w3id.org/linkml/Ncname",
"description": "Prefix part of CURIE",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "NCName",
"uri": "http://www.w3.org/2001/XMLSchema#string",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "objectidentifier",
"definition_uri": "https://w3id.org/linkml/Objectidentifier",
"description": "A URI or CURIE that represents an object in the model.",
"comments": [
"Used for inheritance and type checking"
],
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "ElementIdentifier",
"uri": "http://www.w3.org/ns/shex#iri",
"repr": "str",
"@type": "TypeDefinition"
},
{
"name": "nodeidentifier",
"definition_uri": "https://w3id.org/linkml/Nodeidentifier",
"description": "A URI, CURIE or BNODE that represents a node in a model.",
"from_schema": "https://w3id.org/linkml/types",
"imported_from": "linkml:types",
"base": "NodeIdentifier",
"uri": "http://www.w3.org/ns/shex#nonLiteral",
"repr": "str",
"@type": "TypeDefinition"
}
],
"enums": [
{
"name": "PersonStatus",
"definition_uri": "https://w3id.org/my_org/my_datamodelPersonStatus",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"permissible_values": [
{
"text": "ALIVE",
"description": "the person is living",
"meaning": "PATO:0001421"
},
{
"text": "DEAD",
"description": "the person is deceased",
"meaning": "PATO:0001422"
},
{
"text": "UNKNOWN",
"description": "the vital status is not known",
"todos": [
"map this to an ontology"
]
}
]
},
{
"name": "FamilialRelationshipType",
"definition_uri": "https://w3id.org/my_org/my_datamodelFamilialRelationshipType",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"permissible_values": [
{
"text": "SIBLING_OF",
"meaning": "famrel:01"
},
{
"text": "PARENT_OF",
"meaning": "famrel:02"
},
{
"text": "CHILD_OF",
"meaning": "famrel:01"
}
]
}
],
"slots": [
{
"name": "id",
"definition_uri": "https://w3id.org/my_org/my_datamodelid",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/identifier"
],
"slot_uri": "http://schema.org/identifier",
"identifier": true,
"owner": "NamedThing",
"domain_of": [
"NamedThing"
],
"range": "string",
"required": true,
"@type": "SlotDefinition"
},
{
"name": "name",
"definition_uri": "https://w3id.org/my_org/my_datamodelname",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/name"
],
"slot_uri": "http://schema.org/name",
"owner": "NamedThing",
"domain_of": [
"NamedThing"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "description",
"definition_uri": "https://w3id.org/my_org/my_datamodeldescription",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/description"
],
"slot_uri": "http://schema.org/description",
"owner": "NamedThing",
"domain_of": [
"NamedThing"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "image",
"definition_uri": "https://w3id.org/my_org/my_datamodelimage",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/image"
],
"slot_uri": "http://schema.org/image",
"owner": "NamedThing",
"domain_of": [
"NamedThing"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "primary_email",
"definition_uri": "https://w3id.org/my_org/my_datamodelprimary_email",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/email"
],
"slot_uri": "http://schema.org/email",
"owner": "Person",
"domain_of": [
"Person"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "birth_date",
"definition_uri": "https://w3id.org/my_org/my_datamodelbirth_date",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/birthDate"
],
"slot_uri": "http://schema.org/birthDate",
"owner": "Person",
"domain_of": [
"Person"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "employed_at",
"definition_uri": "https://w3id.org/my_org/my_datamodelemployed_at",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelemployed_at",
"range": "Organization",
"@type": "SlotDefinition"
},
{
"name": "is_current",
"definition_uri": "https://w3id.org/my_org/my_datamodelis_current",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelis_current",
"range": "boolean",
"@type": "SlotDefinition"
},
{
"name": "has_familial_relationships",
"definition_uri": "https://w3id.org/my_org/my_datamodelhas_familial_relationships",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelhas_familial_relationships",
"multivalued": true,
"owner": "Person",
"domain_of": [
"Person"
],
"range": "FamilialRelationship",
"inlined": true,
"inlined_as_list": true,
"@type": "SlotDefinition"
},
{
"name": "current_address",
"definition_uri": "https://w3id.org/my_org/my_datamodelcurrent_address",
"description": "The address at which a person currently lives",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelcurrent_address",
"owner": "Person",
"domain_of": [
"Person"
],
"range": "Address",
"inlined": true,
"@type": "SlotDefinition"
},
{
"name": "age_in_years",
"definition_uri": "https://w3id.org/my_org/my_datamodelage_in_years",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelage_in_years",
"owner": "Person",
"domain_of": [
"Person"
],
"range": "integer",
"minimum_value": 0,
"maximum_value": 999,
"@type": "SlotDefinition"
},
{
"name": "related_to",
"definition_uri": "https://w3id.org/my_org/my_datamodelrelated_to",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelrelated_to",
"owner": "Relationship",
"domain_of": [
"Relationship"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "type",
"definition_uri": "https://w3id.org/my_org/my_datamodeltype",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodeltype",
"owner": "Relationship",
"domain_of": [
"Relationship"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "street",
"definition_uri": "https://w3id.org/my_org/my_datamodelstreet",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelstreet",
"owner": "Address",
"domain_of": [
"Address"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "city",
"definition_uri": "https://w3id.org/my_org/my_datamodelcity",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelcity",
"owner": "Address",
"domain_of": [
"Address"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "mission_statement",
"definition_uri": "https://w3id.org/my_org/my_datamodelmission_statement",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelmission_statement",
"owner": "Organization",
"domain_of": [
"Organization"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "founding_date",
"definition_uri": "https://w3id.org/my_org/my_datamodelfounding_date",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelfounding_date",
"owner": "Organization",
"domain_of": [
"Organization"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "postal_code",
"definition_uri": "https://w3id.org/my_org/my_datamodelpostal_code",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelpostal_code",
"owner": "Address",
"domain_of": [
"Address"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "started_at_time",
"definition_uri": "https://w3id.org/my_org/my_datamodelstarted_at_time",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://www.w3.org/ns/prov#startedAtTime"
],
"slot_uri": "http://www.w3.org/ns/prov#startedAtTime",
"owner": "Relationship",
"domain_of": [
"Relationship"
],
"range": "date",
"@type": "SlotDefinition"
},
{
"name": "ended_at_time",
"definition_uri": "https://w3id.org/my_org/my_datamodelended_at_time",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://www.w3.org/ns/prov#endedAtTime"
],
"slot_uri": "http://www.w3.org/ns/prov#endedAtTime",
"owner": "Relationship",
"domain_of": [
"Relationship"
],
"range": "date",
"@type": "SlotDefinition"
},
{
"name": "registry__persons",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelpersons",
"multivalued": true,
"alias": "persons",
"owner": "Registry",
"domain_of": [
"Registry"
],
"range": "Person",
"inlined": true,
"inlined_as_list": true,
"@type": "SlotDefinition"
},
{
"name": "registry__organizations",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelorganizations",
"multivalued": true,
"alias": "organizations",
"owner": "Registry",
"domain_of": [
"Registry"
],
"range": "Organization",
"inlined": true,
"inlined_as_list": true,
"@type": "SlotDefinition"
},
{
"name": "hasAliases__aliases",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"exact_mappings": [
"http://schema.org/alternateName"
],
"slot_uri": "https://w3id.org/my_org/my_datamodelaliases",
"multivalued": true,
"alias": "aliases",
"owner": "HasAliases",
"domain_of": [
"HasAliases"
],
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "related_to",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slot_uri": "https://w3id.org/my_org/my_datamodelrelated_to",
"range": "Person",
"required": true,
"@type": "SlotDefinition"
},
{
"name": "Person_primary_email",
"definition_uri": "https://w3id.org/my_org/my_datamodelprimary_email",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"http://schema.org/email"
],
"is_a": "primary_email",
"domain": "Person",
"slot_uri": "http://schema.org/email",
"alias": "primary_email",
"owner": "Person",
"domain_of": [
"Person"
],
"is_usage_slot": true,
"usage_slot_name": "primary_email",
"range": "string",
"pattern": "^\\S+@[\\S+\\.]+\\S+",
"@type": "SlotDefinition"
},
{
"name": "FamilialRelationship_type",
"definition_uri": "https://w3id.org/my_org/my_datamodeltype",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"is_a": "type",
"domain": "FamilialRelationship",
"slot_uri": "https://w3id.org/my_org/my_datamodeltype",
"alias": "type",
"owner": "FamilialRelationship",
"domain_of": [
"FamilialRelationship"
],
"is_usage_slot": true,
"usage_slot_name": "type",
"range": "FamilialRelationshipType",
"required": true,
"@type": "SlotDefinition"
},
{
"name": "FamilialRelationship_related_to",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"is_a": "related_to",
"domain": "FamilialRelationship",
"slot_uri": "https://w3id.org/my_org/my_datamodelrelated_to",
"alias": "related to",
"owner": "FamilialRelationship",
"domain_of": [
"FamilialRelationship"
],
"is_usage_slot": true,
"usage_slot_name": "related to",
"range": "Person",
"required": true,
"@type": "SlotDefinition"
}
],
"classes": [
{
"name": "Registry",
"definition_uri": "https://w3id.org/my_org/my_datamodelRegistry",
"description": "Top level data container",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slots": [
"registry__persons",
"registry__organizations"
],
"slot_usage": {},
"attributes": [
{
"name": "persons",
"multivalued": true,
"range": "Person",
"inlined": true,
"inlined_as_list": true,
"@type": "SlotDefinition"
},
{
"name": "organizations",
"multivalued": true,
"range": "Organization",
"inlined": true,
"inlined_as_list": true,
"@type": "SlotDefinition"
}
],
"class_uri": "https://w3id.org/my_org/my_datamodelRegistry",
"tree_root": true,
"@type": "ClassDefinition"
},
{
"name": "NamedThing",
"definition_uri": "https://w3id.org/my_org/my_datamodelNamedThing",
"description": "A generic grouping for any identifiable entity",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"close_mappings": [
"schema:Thing"
],
"slots": [
"id",
"name",
"description",
"image"
],
"slot_usage": {},
"class_uri": "https://w3id.org/my_org/my_datamodelNamedThing",
"@type": "ClassDefinition"
},
{
"name": "Person",
"definition_uri": "https://w3id.org/my_org/my_datamodelPerson",
"description": "A person (alive, dead, undead, or fictional).",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"schema:Person"
],
"is_a": "NamedThing",
"mixins": [
"HasAliases"
],
"slots": [
"id",
"name",
"description",
"image",
"Person_primary_email",
"birth_date",
"age_in_years",
"current_address",
"has_familial_relationships",
"hasAliases__aliases"
],
"slot_usage": {},
"class_uri": "http://schema.org/Person",
"@type": "ClassDefinition"
},
{
"name": "HasAliases",
"definition_uri": "https://w3id.org/my_org/my_datamodelHasAliases",
"description": "A mixin applied to any class that can have aliases/alternateNames",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mixin": true,
"slots": [
"hasAliases__aliases"
],
"slot_usage": {},
"attributes": [
{
"name": "aliases",
"exact_mappings": [
"schema:alternateName"
],
"multivalued": true,
"@type": "SlotDefinition"
}
],
"class_uri": "https://w3id.org/my_org/my_datamodelHasAliases",
"@type": "ClassDefinition"
},
{
"name": "Organization",
"definition_uri": "https://w3id.org/my_org/my_datamodelOrganization",
"description": "An organization such as a company or university",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"schema:Organization"
],
"is_a": "NamedThing",
"mixins": [
"HasAliases"
],
"slots": [
"id",
"name",
"description",
"image",
"mission_statement",
"founding_date",
"hasAliases__aliases"
],
"slot_usage": {},
"class_uri": "http://schema.org/Organization",
"@type": "ClassDefinition"
},
{
"name": "Address",
"definition_uri": "https://w3id.org/my_org/my_datamodelAddress",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"mappings": [
"schema:PostalAddress"
],
"slots": [
"street",
"city",
"postal_code"
],
"slot_usage": {},
"class_uri": "http://schema.org/PostalAddress",
"@type": "ClassDefinition"
},
{
"name": "Relationship",
"definition_uri": "https://w3id.org/my_org/my_datamodelRelationship",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"slots": [
"started_at_time",
"ended_at_time",
"related_to",
"type"
],
"slot_usage": {},
"class_uri": "https://w3id.org/my_org/my_datamodelRelationship",
"@type": "ClassDefinition"
},
{
"name": "FamilialRelationship",
"definition_uri": "https://w3id.org/my_org/my_datamodelFamilialRelationship",
"from_schema": "https://w3id.org/my_org/my_datamodel",
"is_a": "Relationship",
"slots": [
"started_at_time",
"ended_at_time",
"related_to",
"FamilialRelationship_type",
"FamilialRelationship_related_to"
],
"slot_usage": {},
"class_uri": "https://w3id.org/my_org/my_datamodelFamilialRelationship",
"@type": "ClassDefinition"
}
],
"metamodel_version": "1.7.0",
"source_file": "activitystreams.yaml",
"source_file_date": "2022-09-06T10:00:58",
"source_file_size": 3771,
"generation_date": "2022-09-06T10:01:45",
"@type": "SchemaDefinition",
"@context": [
"project/jsonld/activitystreams.context.jsonld",
"https://w3id.org/linkml/types.context.jsonld",
{
"@base": "https://w3id.org/my_org/my_datamodel"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,243 @@
{
"$defs": {
"Address": {
"additionalProperties": false,
"description": "",
"properties": {
"city": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"street": {
"type": "string"
}
},
"required": [],
"title": "Address",
"type": "object"
},
"FamilialRelationship": {
"additionalProperties": false,
"description": "",
"properties": {
"ended_at_time": {
"format": "date",
"type": "string"
},
"related_to": {
"type": "string"
},
"started_at_time": {
"format": "date",
"type": "string"
},
"type": {
"$ref": "#/$defs/FamilialRelationshipType"
}
},
"required": [
"type",
"related_to"
],
"title": "FamilialRelationship",
"type": "object"
},
"FamilialRelationshipType": {
"description": "",
"enum": [
"SIBLING_OF",
"PARENT_OF",
"CHILD_OF"
],
"title": "FamilialRelationshipType",
"type": "string"
},
"NamedThing": {
"additionalProperties": false,
"description": "A generic grouping for any identifiable entity",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id"
],
"title": "NamedThing",
"type": "object"
},
"Organization": {
"additionalProperties": false,
"description": "An organization such as a company or university",
"properties": {
"aliases": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"founding_date": {
"type": "string"
},
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"mission_statement": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id"
],
"title": "Organization",
"type": "object"
},
"Person": {
"additionalProperties": false,
"description": "A person (alive, dead, undead, or fictional).",
"properties": {
"age_in_years": {
"maximum": 999,
"minimum": 0,
"type": "integer"
},
"aliases": {
"items": {
"type": "string"
},
"type": "array"
},
"birth_date": {
"type": "string"
},
"current_address": {
"$ref": "#/$defs/Address",
"description": "The address at which a person currently lives"
},
"description": {
"type": "string"
},
"has_familial_relationships": {
"items": {
"$ref": "#/$defs/FamilialRelationship"
},
"type": "array"
},
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"name": {
"type": "string"
},
"primary_email": {
"pattern": "^\\S+@[\\S+\\.]+\\S+",
"type": "string"
}
},
"required": [
"id"
],
"title": "Person",
"type": "object"
},
"PersonStatus": {
"description": "",
"enum": [
"ALIVE",
"DEAD",
"UNKNOWN"
],
"title": "PersonStatus",
"type": "string"
},
"Registry": {
"additionalProperties": false,
"description": "Top level data container",
"properties": {
"organizations": {
"items": {
"$ref": "#/$defs/Organization"
},
"type": "array"
},
"persons": {
"items": {
"$ref": "#/$defs/Person"
},
"type": "array"
}
},
"required": [],
"title": "Registry",
"type": "object"
},
"Relationship": {
"additionalProperties": false,
"description": "",
"properties": {
"ended_at_time": {
"format": "date",
"type": "string"
},
"related_to": {
"type": "string"
},
"started_at_time": {
"format": "date",
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [],
"title": "Relationship",
"type": "object"
}
},
"$id": "https://w3id.org/my_org/my_datamodel",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"metamodel_version": "1.7.0",
"properties": {
"organizations": {
"items": {
"$ref": "#/$defs/Organization"
},
"type": "array"
},
"persons": {
"items": {
"$ref": "#/$defs/Person"
},
"type": "array"
}
},
"required": [],
"title": "my_datamodel",
"type": "object",
"version": null
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,343 @@
@prefix IAO: <http://purl.obolibrary.org/obo/IAO_> .
@prefix PATO: <http://purl.obolibrary.org/obo/PATO_> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix famrel: <http://example.org/famrel/> .
@prefix linkml: <https://w3id.org/linkml/> .
@prefix my_datamodel: <https://w3id.org/my_org/my_datamodel> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
linkml:SubsetDefinition a owl:Class ;
rdfs:label "subset_definition" .
linkml:TypeDefinition a owl:Class ;
rdfs:label "type_definition" .
linkml:topValue a owl:DatatypeProperty ;
rdfs:label "value" .
my_datamodel: a owl:Ontology ;
rdfs:label "my_datamodel" ;
IAO:0000700 my_datamodel:Address,
my_datamodel:HasAliases,
my_datamodel:NamedThing,
my_datamodel:Registry,
my_datamodel:Relationship ;
dcterms:license "https://creativecommons.org/publicdomain/zero/1.0/" ;
dcterms:title "My Datamodel" ;
rdfs:seeAlso "https://example.org/" ;
linkml:generation_date "2022-09-06T10:01:46" ;
linkml:metamodel_version "1.7.0" ;
linkml:source_file "activitystreams.yaml" ;
linkml:source_file_date "2022-09-06T10:00:58" ;
linkml:source_file_size 3771 .
my_datamodel:employed_at a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "employed_at" ;
rdfs:range my_datamodel:Organization .
my_datamodel:is_current a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "is_current" ;
rdfs:range linkml:Boolean .
my_datamodel:Registry a owl:Class,
linkml:ClassDefinition ;
rdfs:label "Registry" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:allValuesFrom my_datamodel:Person ;
owl:onProperty my_datamodel:persons ],
[ a owl:Restriction ;
owl:allValuesFrom my_datamodel:Organization ;
owl:onProperty my_datamodel:organizations ] ;
skos:definition "Top level data container" .
my_datamodel:age_in_years a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "age_in_years" ;
rdfs:range linkml:Integer .
my_datamodel:city a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "city" ;
rdfs:range linkml:String .
my_datamodel:current_address a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "current_address" ;
rdfs:range my_datamodel:Address ;
skos:definition "The address at which a person currently lives" .
my_datamodel:founding_date a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "founding_date" ;
rdfs:range linkml:String .
my_datamodel:has_familial_relationships a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "has_familial_relationships" ;
rdfs:range my_datamodel:FamilialRelationship .
my_datamodel:mission_statement a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "mission_statement" ;
rdfs:range linkml:String .
my_datamodel:organizations a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "organizations" ;
rdfs:range my_datamodel:Organization .
my_datamodel:persons a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "persons" ;
rdfs:range my_datamodel:Person .
my_datamodel:postal_code a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "postal_code" ;
rdfs:range linkml:String .
my_datamodel:street a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "street" ;
rdfs:range linkml:String .
famrel:02 a owl:Class,
my_datamodel:FamilialRelationshipType ;
rdfs:label "PARENT_OF" .
PATO:0001421 a owl:Class,
my_datamodel:PersonStatus ;
rdfs:label "ALIVE" .
PATO:0001422 a owl:Class,
my_datamodel:PersonStatus ;
rdfs:label "DEAD" .
schema:birthDate a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "birth_date" ;
rdfs:range linkml:String ;
skos:exactMatch schema:birthDate .
schema:description a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "description" ;
rdfs:range linkml:String ;
skos:exactMatch schema:description .
schema:email a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "primary_email" ;
rdfs:range linkml:String ;
skos:exactMatch schema:email .
schema:identifier a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "id" ;
rdfs:range linkml:String ;
skos:exactMatch schema:identifier .
schema:image a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "image" ;
rdfs:range linkml:String ;
skos:exactMatch schema:image .
schema:name a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "name" ;
rdfs:range linkml:String ;
skos:exactMatch schema:name .
<http://www.w3.org/ns/prov#endedAtTime> a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "ended_at_time" ;
rdfs:range linkml:Date ;
skos:exactMatch <http://www.w3.org/ns/prov#endedAtTime> .
<http://www.w3.org/ns/prov#startedAtTime> a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "started_at_time" ;
rdfs:range linkml:Date ;
skos:exactMatch <http://www.w3.org/ns/prov#startedAtTime> .
my_datamodel:FamilialRelationship a owl:Class,
linkml:ClassDefinition ;
rdfs:label "FamilialRelationship" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:onClass my_datamodel:FamilialRelationshipType ;
owl:onProperty my_datamodel:type ;
owl:qualifiedCardinality 1 ],
[ a owl:Restriction ;
owl:onClass my_datamodel:Person ;
owl:onProperty my_datamodel:related_to ;
owl:qualifiedCardinality 1 ],
my_datamodel:Relationship .
<https://w3id.org/my_org/my_datamodelPersonStatus#UNKNOWN> a owl:Class,
my_datamodel:PersonStatus ;
rdfs:label "UNKNOWN" .
my_datamodel:Relationship a owl:Class,
linkml:ClassDefinition ;
rdfs:label "Relationship" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:related_to ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:type ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:Date ;
owl:onProperty <http://www.w3.org/ns/prov#endedAtTime> ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:Date ;
owl:onProperty <http://www.w3.org/ns/prov#startedAtTime> ] .
my_datamodel:related_to a owl:ObjectProperty,
linkml:SlotDefinition .
my_datamodel:type a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "type" ;
rdfs:range linkml:String .
famrel:01 a owl:Class,
my_datamodel:FamilialRelationshipType ;
rdfs:label "CHILD_OF",
"SIBLING_OF" .
my_datamodel:Address a owl:Class,
linkml:ClassDefinition ;
rdfs:label "Address" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:city ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:street ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:postal_code ] ;
skos:exactMatch schema:PostalAddress .
my_datamodel:FamilialRelationshipType a owl:Class,
linkml:EnumDefinition ;
rdfs:label "FamilialRelationshipType" ;
owl:unionOf ( famrel:01 famrel:02 famrel:01 ) ;
linkml:permissible_values famrel:01,
famrel:02 .
my_datamodel:HasAliases a owl:Class,
linkml:ClassDefinition ;
rdfs:label "HasAliases" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:allValuesFrom linkml:String ;
owl:onProperty my_datamodel:aliases ],
linkml:mixin ;
skos:definition "A mixin applied to any class that can have aliases/alternateNames" .
my_datamodel:NamedThing a owl:Class,
linkml:ClassDefinition ;
rdfs:label "NamedThing" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty schema:description ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty schema:name ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty schema:image ],
[ a owl:Restriction ;
owl:onClass linkml:String ;
owl:onProperty schema:identifier ;
owl:qualifiedCardinality 1 ] ;
skos:closeMatch schema:Thing ;
skos:definition "A generic grouping for any identifiable entity" .
my_datamodel:Organization a owl:Class,
linkml:ClassDefinition ;
rdfs:label "Organization" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:mission_statement ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty my_datamodel:founding_date ],
[ a owl:Restriction ;
owl:allValuesFrom linkml:String ;
owl:onProperty my_datamodel:aliases ],
my_datamodel:HasAliases,
my_datamodel:NamedThing ;
skos:definition "An organization such as a company or university" ;
skos:exactMatch schema:Organization .
my_datamodel:Person a owl:Class,
linkml:ClassDefinition ;
rdfs:label "Person" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:allValuesFrom linkml:String ;
owl:onProperty my_datamodel:aliases ],
[ a owl:Restriction ;
owl:allValuesFrom my_datamodel:FamilialRelationship ;
owl:onProperty my_datamodel:has_familial_relationships ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:Integer ;
owl:onProperty my_datamodel:age_in_years ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass my_datamodel:Address ;
owl:onProperty my_datamodel:current_address ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty schema:birthDate ],
[ a owl:Restriction ;
owl:maxQualifiedCardinality 1 ;
owl:onClass linkml:String ;
owl:onProperty schema:email ],
my_datamodel:HasAliases,
my_datamodel:NamedThing ;
skos:definition "A person (alive, dead, undead, or fictional)." ;
skos:exactMatch schema:Person .
my_datamodel:PersonStatus a owl:Class,
linkml:EnumDefinition ;
rdfs:label "PersonStatus" ;
owl:unionOf ( PATO:0001421 PATO:0001422 <https://w3id.org/my_org/my_datamodelPersonStatus#UNKNOWN> ) ;
linkml:permissible_values PATO:0001421,
PATO:0001422,
<https://w3id.org/my_org/my_datamodelPersonStatus#UNKNOWN> .
my_datamodel:aliases a owl:ObjectProperty,
linkml:SlotDefinition ;
rdfs:label "aliases" ;
rdfs:range linkml:String ;
skos:exactMatch schema:alternateName .
linkml:ClassDefinition a owl:Class ;
rdfs:label "class_definition" .
linkml:SlotDefinition a owl:Class ;
rdfs:label "slot_definition" .

View File

@ -0,0 +1,17 @@
{
"as": "http://www.w3.org/ns/activitystreams#",
"linkml": "https://w3id.org/linkml/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "http://schema.org/",
"unit": "http://qudt.org/2.1/vocab/unit/",
"xml": "http://www.w3.org/XML/1998/namespace",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"Property": {
"@id": "rdf:Property"
},
"Statement": {
"@id": "rdf:Statement"
}
}

View File

@ -0,0 +1,19 @@
---
{
"PATO": "http://purl.obolibrary.org/obo/PATO_",
"biolink": "https://w3id.org/biolink/",
"famrel": "http://example.org/famrel/",
"linkml": "https://w3id.org/linkml/",
"my_datamodel": "https://w3id.org/my_org/my_datamodel",
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/",
"Address": {
"@id": "schema:PostalAddress"
},
"Organization": {
"@id": "schema:Organization"
},
"Person": {
"@id": "schema:Person"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
message Address
{
string street = 0
string city = 0
string postalCode = 0
}
message FamilialRelationship
{
date startedAtTime = 0
date endedAtTime = 0
string relatedTo = 0
familialRelationshipType type = 0
person relatedTo = 0
}
// A generic grouping for any identifiable entity
message NamedThing
{
string id = 0
string name = 0
string description = 0
string image = 0
}
// An organization such as a company or university
message Organization
{
string id = 0
string name = 0
string description = 0
string image = 0
string missionStatement = 0
string foundingDate = 0
repeated string aliases = 0
}
// A person (alive, dead, undead, or fictional).
message Person
{
string id = 0
string name = 0
string description = 0
string image = 0
string primaryEmail = 0
string birthDate = 0
integer ageInYears = 0
address currentAddress = 0
repeated familialRelationship hasFamilialRelationships = 0
repeated string aliases = 0
}
// Top level data container
message Registry
{
repeated person persons = 0
repeated organization organizations = 0
}
message Relationship
{
date startedAtTime = 0
date endedAtTime = 0
string relatedTo = 0
string type = 0
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,164 @@
@prefix famrel: <http://example.org/famrel/> .
@prefix my_datamodel: <https://w3id.org/my_org/my_datamodel> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
my_datamodel:HasAliases a sh:NodeShape ;
sh:closed true ;
sh:description "A mixin applied to any class that can have aliases/alternateNames" ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:order 0 ;
sh:path my_datamodel:aliases ] ;
sh:targetClass my_datamodel:HasAliases .
my_datamodel:NamedThing a sh:NodeShape ;
sh:closed true ;
sh:description "A generic grouping for any identifiable entity" ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 0 ;
sh:path schema:identifier ],
[ sh:maxCount 1 ;
sh:order 1 ;
sh:path schema:name ],
[ sh:maxCount 1 ;
sh:order 3 ;
sh:path schema:image ],
[ sh:maxCount 1 ;
sh:order 2 ;
sh:path schema:description ] ;
sh:targetClass my_datamodel:NamedThing .
my_datamodel:Registry a sh:NodeShape ;
sh:closed true ;
sh:description "Top level data container" ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:class schema:Person ;
sh:nodeKind sh:IRI ;
sh:order 0 ;
sh:path my_datamodel:persons ],
[ sh:class schema:Organization ;
sh:nodeKind sh:IRI ;
sh:order 1 ;
sh:path my_datamodel:organizations ] ;
sh:targetClass my_datamodel:Registry .
my_datamodel:Relationship a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 0 ;
sh:path <http://www.w3.org/ns/prov#startedAtTime> ],
[ sh:maxCount 1 ;
sh:order 3 ;
sh:path my_datamodel:type ],
[ sh:maxCount 1 ;
sh:order 2 ;
sh:path my_datamodel:related_to ],
[ sh:maxCount 1 ;
sh:order 1 ;
sh:path <http://www.w3.org/ns/prov#endedAtTime> ] ;
sh:targetClass my_datamodel:Relationship .
schema:Organization a sh:NodeShape ;
sh:closed true ;
sh:description "An organization such as a company or university" ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 1 ;
sh:path my_datamodel:founding_date ],
[ sh:maxCount 1 ;
sh:order 5 ;
sh:path schema:description ],
[ sh:order 2 ;
sh:path my_datamodel:aliases ],
[ sh:maxCount 1 ;
sh:order 6 ;
sh:path schema:image ],
[ sh:maxCount 1 ;
sh:order 0 ;
sh:path my_datamodel:mission_statement ],
[ sh:maxCount 1 ;
sh:order 3 ;
sh:path schema:identifier ],
[ sh:maxCount 1 ;
sh:order 4 ;
sh:path schema:name ] ;
sh:targetClass schema:Organization .
schema:Person a sh:NodeShape ;
sh:closed true ;
sh:description "A person (alive, dead, undead, or fictional)." ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 6 ;
sh:path schema:identifier ],
[ sh:maxCount 1 ;
sh:order 8 ;
sh:path schema:description ],
[ sh:maxCount 1 ;
sh:order 9 ;
sh:path schema:image ],
[ sh:maxCount 1 ;
sh:order 0 ;
sh:path schema:email ;
sh:pattern "^\\S+@[\\S+\\.]+\\S+" ],
[ sh:maxCount 1 ;
sh:maxInclusive 999 ;
sh:minInclusive 0 ;
sh:order 2 ;
sh:path my_datamodel:age_in_years ],
[ sh:class schema:PostalAddress ;
sh:description "The address at which a person currently lives" ;
sh:maxCount 1 ;
sh:nodeKind sh:BlankNode ;
sh:order 3 ;
sh:path my_datamodel:current_address ],
[ sh:class my_datamodel:FamilialRelationship ;
sh:nodeKind sh:BlankNode ;
sh:order 4 ;
sh:path my_datamodel:has_familial_relationships ],
[ sh:maxCount 1 ;
sh:order 1 ;
sh:path schema:birthDate ],
[ sh:maxCount 1 ;
sh:order 7 ;
sh:path schema:name ],
[ sh:order 5 ;
sh:path my_datamodel:aliases ] ;
sh:targetClass schema:Person .
schema:PostalAddress a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 1 ;
sh:path my_datamodel:city ],
[ sh:maxCount 1 ;
sh:order 2 ;
sh:path my_datamodel:postal_code ],
[ sh:maxCount 1 ;
sh:order 0 ;
sh:path my_datamodel:street ] ;
sh:targetClass schema:PostalAddress .
my_datamodel:FamilialRelationship a sh:NodeShape ;
sh:closed true ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:maxCount 1 ;
sh:order 1 ;
sh:path <http://www.w3.org/ns/prov#endedAtTime> ],
[ sh:maxCount 1 ;
sh:order 0 ;
sh:path <http://www.w3.org/ns/prov#startedAtTime> ],
[ sh:in ( famrel:01 famrel:02 famrel:01 ) ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:order 3 ;
sh:path my_datamodel:type ],
[ sh:maxCount 1 ;
sh:order 2 ;
sh:path my_datamodel:related_to ] ;
sh:targetClass my_datamodel:FamilialRelationship .

View File

@ -0,0 +1,595 @@
BASE <http://www.w3.org/ns/activitystreams#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX linkml: <https://w3id.org/linkml/>
<AnyURI> IRI
<DurationType> xsd:duration
<NonNegativeInteger> xsd:nonNegativeInteger
<LangString> rdf:langString
linkml:String xsd:string
linkml:Integer xsd:integer
linkml:Boolean xsd:boolean
linkml:Float xsd:float
linkml:Double xsd:double
linkml:Decimal xsd:decimal
linkml:Time xsd:time
linkml:Date xsd:date
linkml:Datetime xsd:dateTime
linkml:DateOrDatetime linkml:DateOrDatetime
linkml:Uriorcurie IRI
linkml:Curie xsd:string
linkml:Uri IRI
linkml:Ncname xsd:string
linkml:Objectidentifier IRI
linkml:Nodeidentifier NONLITERAL
linkml:Jsonpointer xsd:string
linkml:Jsonpath xsd:string
linkml:Sparqlpath xsd:string
<Accept> (
CLOSED {
( $<Accept_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Accept> ] ?
)
} OR @<TentativeAccept>
)
<Activity> (
CLOSED {
( $<Activity_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<actor> @linkml:String * ;
<instrument> @linkml:String * ;
<object> @linkml:String * ;
<origin> @linkml:String * ;
<result> @linkml:String * ;
<target> @linkml:String *
) ;
rdf:type [ <Activity> ] ?
)
} OR @<Accept> OR @<Add> OR @<Announce> OR @<Create> OR @<Delete> OR @<Dislike> OR @<Flag> OR @<Follow> OR @<Ignore> OR
@<IntransitiveActivity> OR @<Join> OR @<Leave> OR @<Like> OR @<Listen> OR @<Move> OR @<Offer> OR @<Read> OR @<Reject> OR
@<Remove> OR @<Undo> OR @<Update> OR @<View>
)
<Add> CLOSED {
( $<Add_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Add> ] ?
)
}
<Announce> CLOSED {
( $<Announce_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Announce> ] ?
)
}
<Application> CLOSED {
( $<Application_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Application> ] ?
)
}
<Arrive> CLOSED {
( $<Arrive_tes> ( &<IntransitiveActivity_tes> ;
rdf:type [ <IntransitiveActivity> ] ?
) ;
rdf:type [ <Arrive> ] ?
)
}
<Article> CLOSED {
( $<Article_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Article> ] ?
)
}
<Audio> CLOSED {
( $<Audio_tes> ( &<Document_tes> ;
rdf:type [ <Document> ] ?
) ;
rdf:type [ <Audio> ] ?
)
}
<Block> CLOSED {
( $<Block_tes> ( &<Ignore_tes> ;
rdf:type [ <Ignore> ] ?
) ;
rdf:type [ <Block> ] ?
)
}
<Collection> (
CLOSED {
( $<Collection_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<current> @linkml:String ? ;
<first> @linkml:String ? ;
<items> @linkml:String * ;
<last> @linkml:String ? ;
<totalItems> @<NonNegativeInteger> ?
) ;
rdf:type [ <Collection> ] ?
)
} OR @<CollectionPage> OR @<OrderedCollection>
)
<CollectionPage> CLOSED {
( $<CollectionPage_tes> ( &<Collection_tes> ;
rdf:type [ <Collection> ] ? ;
<next> @linkml:String ? ;
<partOf> @linkml:String ? ;
<prev> @linkml:String ?
) ;
rdf:type [ <CollectionPage> ] ?
)
}
<Create> CLOSED {
( $<Create_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Create> ] ?
)
}
<Delete> CLOSED {
( $<Delete_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Delete> ] ?
)
}
<Dislike> CLOSED {
( $<Dislike_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Dislike> ] ?
)
}
<Document> (
CLOSED {
( $<Document_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Document> ] ?
)
} OR @<Audio> OR @<Image> OR @<Video>
)
<Event> CLOSED {
( $<Event_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Event> ] ?
)
}
<Flag> CLOSED {
( $<Flag_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Flag> ] ?
)
}
<Follow> CLOSED {
( $<Follow_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Follow> ] ?
)
}
<Group> CLOSED {
( $<Group_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Group> ] ?
)
}
<Ignore> (
CLOSED {
( $<Ignore_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Ignore> ] ?
)
} OR @<Block>
)
<Image> CLOSED {
( $<Image_tes> ( &<Document_tes> ;
rdf:type [ <Document> ] ?
) ;
rdf:type [ <Image> ] ?
)
}
<IntransitiveActivity> (
CLOSED {
( $<IntransitiveActivity_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <IntransitiveActivity> ] ?
)
} OR @<Arrive> OR @<Question> OR @<Travel>
)
<Invite> CLOSED {
( $<Invite_tes> ( &<Offer_tes> ;
rdf:type [ <Offer> ] ?
) ;
rdf:type [ <Invite> ] ?
)
}
<Join> CLOSED {
( $<Join_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Join> ] ?
)
}
<Leave> CLOSED {
( $<Leave_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Leave> ] ?
)
}
<Like> CLOSED {
( $<Like_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Like> ] ?
)
}
<Link> (
CLOSED {
( $<Link_tes> ( rdfs:name @linkml:String * ;
<preview> @linkml:String * ;
<height> @<NonNegativeInteger> ? ;
<href> @<AnyURI> ? ;
<hreflang> @linkml:String ? ;
<id> @<AnyURI> ? ;
<mediaType> @linkml:String ? ;
<rel> @linkml:String * ;
<width> @<NonNegativeInteger> ?
) ;
rdf:type [ <Link> ] ?
)
} OR @<Mention>
)
<Listen> CLOSED {
( $<Listen_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Listen> ] ?
)
}
<Mention> CLOSED {
( $<Mention_tes> ( &<Link_tes> ;
rdf:type [ <Link> ] ?
) ;
rdf:type [ <Mention> ] ?
)
}
<Move> CLOSED {
( $<Move_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Move> ] ?
)
}
<Note> CLOSED {
( $<Note_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Note> ] ?
)
}
<Object> (
CLOSED {
( $<Object_tes> ( <attachment> @linkml:String * ;
<attributedTo> @linkml:String * ;
<audience> @linkml:String * ;
<bcc> @linkml:String * ;
<bto> @linkml:String * ;
<cc> @linkml:String * ;
<content> @linkml:String * ;
<context> @linkml:String * ;
<generator> @linkml:String * ;
<icon> @linkml:String * ;
<image> @linkml:String * ;
<inReplyTo> @linkml:String * ;
<location> @linkml:String * ;
rdfs:name @linkml:String * ;
<preview> @linkml:String * ;
<replies> @<Collection> ? ;
<summary> @linkml:String * ;
<tag> @linkml:String * ;
<to> @linkml:String * ;
<url> @linkml:String * ;
<duration> @<DurationType> ? ;
<endTime> @linkml:Datetime ? ;
<id> @<AnyURI> ? ;
<mediaType> @linkml:String ? ;
<published> @linkml:Datetime ? ;
<startTime> @linkml:Datetime ? ;
<updated> @linkml:Datetime ?
) ;
rdf:type [ <Object> ] ?
)
} OR @<Activity> OR @<Application> OR @<Article> OR @<Collection> OR @<Document> OR @<Event> OR @<Group> OR @<Note> OR
@<Organization> OR @<Page> OR @<Person> OR @<Place> OR @<Profile> OR @<Relationship> OR @<Service> OR @<Tombstone>
)
<Offer> (
CLOSED {
( $<Offer_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Offer> ] ?
)
} OR @<Invite>
)
<OrderedCollection> (
CLOSED {
( $<OrderedCollection_tes> ( &<Collection_tes> ;
rdf:type [ <Collection> ] ? ;
<items> @linkml:String *
) ;
rdf:type [ <OrderedCollection> ] ?
)
} OR @<OrderedCollectionPage>
)
<OrderedCollectionPage> CLOSED {
( $<OrderedCollectionPage_tes> ( &<OrderedCollection_tes> ;
rdf:type [ <OrderedCollection> ] ? ;
<startIndex> @<NonNegativeInteger> ? ;
<next> @linkml:String ? ;
<partOf> @linkml:String ? ;
<prev> @linkml:String ? ;
<items> @linkml:String *
) ;
rdf:type [ <OrderedCollectionPage> ] ?
)
}
<OrderedItems> CLOSED {
( $<OrderedItems_tes> rdf:type . * ;
rdf:type [ <OrderedItems> ] ?
)
}
<Organization> CLOSED {
( $<Organization_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Organization> ] ?
)
}
<Page> CLOSED {
( $<Page_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Page> ] ?
)
}
<Person> CLOSED {
( $<Person_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Person> ] ?
)
}
<Place> CLOSED {
( $<Place_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<accuracy> @linkml:Float ? ;
<altitude> @linkml:Float ? ;
<latitude> @linkml:Float ? ;
<longitude> @linkml:Float ? ;
<radius> @linkml:Float ? ;
<units> @linkml:String ?
) ;
rdf:type [ <Place> ] ?
)
}
<Profile> CLOSED {
( $<Profile_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<describes> @<Object> ?
) ;
rdf:type [ <Profile> ] ?
)
}
<Property> CLOSED {
( $<Property_tes> rdf:type . * ;
rdf:type [ rdf:Property ] ?
)
}
<Question> CLOSED {
( $<Question_tes> ( &<IntransitiveActivity_tes> ;
rdf:type [ <IntransitiveActivity> ] ? ;
<anyOf> @linkml:String * ;
<oneOf> @linkml:String *
) ;
rdf:type [ <Question> ] ?
)
}
<Read> CLOSED {
( $<Read_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Read> ] ?
)
}
<Reject> (
CLOSED {
( $<Reject_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Reject> ] ?
)
} OR @<TentativeReject>
)
<Relationship> CLOSED {
( $<Relationship_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<object> @linkml:String * ;
<relationship> @<Object> * ;
<subject> @linkml:String *
) ;
rdf:type [ <Relationship> ] ?
)
}
<Remove> CLOSED {
( $<Remove_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Remove> ] ?
)
}
<Service> CLOSED {
( $<Service_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ?
) ;
rdf:type [ <Service> ] ?
)
}
<Statement> CLOSED {
( $<Statement_tes> rdf:type . * ;
rdf:type [ rdf:Statement ] ?
)
}
<TentativeAccept> CLOSED {
( $<TentativeAccept_tes> ( &<Accept_tes> ;
rdf:type [ <Accept> ] ?
) ;
rdf:type [ <TentativeAccept> ] ?
)
}
<TentativeReject> CLOSED {
( $<TentativeReject_tes> ( &<Reject_tes> ;
rdf:type [ <Reject> ] ?
) ;
rdf:type [ <TentativeReject> ] ?
)
}
<Tombstone> CLOSED {
( $<Tombstone_tes> ( &<Object_tes> ;
rdf:type [ <Object> ] ? ;
<formerType> @<Object> * ;
<deleted> @linkml:Datetime ?
) ;
rdf:type [ <Tombstone> ] ?
)
}
<Travel> CLOSED {
( $<Travel_tes> ( &<IntransitiveActivity_tes> ;
rdf:type [ <IntransitiveActivity> ] ?
) ;
rdf:type [ <Travel> ] ?
)
}
<Undo> CLOSED {
( $<Undo_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Undo> ] ?
)
}
<Update> CLOSED {
( $<Update_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <Update> ] ?
)
}
<Video> CLOSED {
( $<Video_tes> ( &<Document_tes> ;
rdf:type [ <Document> ] ?
) ;
rdf:type [ <Video> ] ?
)
}
<View> CLOSED {
( $<View_tes> ( &<Activity_tes> ;
rdf:type [ <Activity> ] ?
) ;
rdf:type [ <View> ] ?
)
}

View File

@ -0,0 +1,124 @@
BASE <https://w3id.org/my_org/my_datamodel/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX linkml: <https://w3id.org/linkml/>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
linkml:String xsd:string
linkml:Integer xsd:integer
linkml:Boolean xsd:boolean
linkml:Float xsd:float
linkml:Double xsd:double
linkml:Decimal xsd:decimal
linkml:Time xsd:dateTime
linkml:Date xsd:date
linkml:Datetime xsd:dateTime
linkml:DateOrDatetime linkml:DateOrDatetime
linkml:Uriorcurie IRI
linkml:Uri IRI
linkml:Ncname xsd:string
linkml:Objectidentifier IRI
linkml:Nodeidentifier NONLITERAL
<https://w3id.org/my_org/my_datamodelAddress> CLOSED {
( $<https://w3id.org/my_org/my_datamodelAddress_tes> ( <https://w3id.org/my_org/my_datamodelstreet> @linkml:String ? ;
<https://w3id.org/my_org/my_datamodelcity> @linkml:String ? ;
<https://w3id.org/my_org/my_datamodelpostal_code> @linkml:String ?
) ;
rdf:type [ schema:PostalAddress ] ?
)
}
<https://w3id.org/my_org/my_datamodelFamilialRelationship> CLOSED {
( $<https://w3id.org/my_org/my_datamodelFamilialRelationship_tes> ( &<https://w3id.org/my_org/my_datamodelRelationship_tes> ;
rdf:type [ <https://w3id.org/my_org/my_datamodelRelationship> ] ? ;
<https://w3id.org/my_org/my_datamodeltype> @<https://w3id.org/my_org/my_datamodelFamilialRelationshipType> ;
<https://w3id.org/my_org/my_datamodelrelated_to> @<https://w3id.org/my_org/my_datamodelPerson>
) ;
rdf:type [ <https://w3id.org/my_org/my_datamodelFamilialRelationship> ] ?
)
}
<https://w3id.org/my_org/my_datamodelHasAliases> {
( $<https://w3id.org/my_org/my_datamodelHasAliases_tes> <https://w3id.org/my_org/my_datamodelaliases> @linkml:String * ;
rdf:type [ <https://w3id.org/my_org/my_datamodelHasAliases> ] ?
)
}
<https://w3id.org/my_org/my_datamodelNamedThing> (
CLOSED {
( $<https://w3id.org/my_org/my_datamodelNamedThing_tes> ( schema:name @linkml:String ? ;
schema:description @linkml:String ? ;
schema:image @linkml:String ?
) ;
rdf:type [ <https://w3id.org/my_org/my_datamodelNamedThing> ]
)
} OR @<https://w3id.org/my_org/my_datamodelOrganization> OR @<https://w3id.org/my_org/my_datamodelPerson>
)
<https://w3id.org/my_org/my_datamodelOrganization> CLOSED {
( $<https://w3id.org/my_org/my_datamodelOrganization_tes> ( &<https://w3id.org/my_org/my_datamodelNamedThing_tes> ;
rdf:type [ <https://w3id.org/my_org/my_datamodelNamedThing> ] ? ;
&<https://w3id.org/my_org/my_datamodelHasAliases_tes> ;
rdf:type [ <https://w3id.org/my_org/my_datamodelHasAliases> ] ? ;
<https://w3id.org/my_org/my_datamodelmission_statement> @linkml:String ? ;
<https://w3id.org/my_org/my_datamodelfounding_date> @linkml:String ? ;
<https://w3id.org/my_org/my_datamodelaliases> @linkml:String *
) ;
rdf:type [ schema:Organization ]
)
}
<https://w3id.org/my_org/my_datamodelPerson> CLOSED {
( $<https://w3id.org/my_org/my_datamodelPerson_tes> ( &<https://w3id.org/my_org/my_datamodelNamedThing_tes> ;
rdf:type [ <https://w3id.org/my_org/my_datamodelNamedThing> ] ? ;
&<https://w3id.org/my_org/my_datamodelHasAliases_tes> ;
rdf:type [ <https://w3id.org/my_org/my_datamodelHasAliases> ] ? ;
schema:email @linkml:String ? ;
schema:birthDate @linkml:String ? ;
<https://w3id.org/my_org/my_datamodelage_in_years> @linkml:Integer ? ;
<https://w3id.org/my_org/my_datamodelcurrent_address> @<https://w3id.org/my_org/my_datamodelAddress> ? ;
<https://w3id.org/my_org/my_datamodelhas_familial_relationships>
@<https://w3id.org/my_org/my_datamodelFamilialRelationship> * ;
<https://w3id.org/my_org/my_datamodelaliases> @linkml:String *
) ;
rdf:type [ schema:Person ]
)
}
<https://w3id.org/my_org/my_datamodelRegistry> CLOSED {
( $<https://w3id.org/my_org/my_datamodelRegistry_tes> ( <https://w3id.org/my_org/my_datamodelpersons>
@<https://w3id.org/my_org/my_datamodelPerson> * ;
<https://w3id.org/my_org/my_datamodelorganizations> @<https://w3id.org/my_org/my_datamodelOrganization> *
) ;
rdf:type [ <https://w3id.org/my_org/my_datamodelRegistry> ] ?
)
}
<https://w3id.org/my_org/my_datamodelRelationship> (
CLOSED {
( $<https://w3id.org/my_org/my_datamodelRelationship_tes> ( prov:startedAtTime @linkml:Date ? ;
prov:endedAtTime @linkml:Date ? ;
<https://w3id.org/my_org/my_datamodelrelated_to> @linkml:String ? ;
<https://w3id.org/my_org/my_datamodeltype> @linkml:String ?
) ;
rdf:type [ <https://w3id.org/my_org/my_datamodelRelationship> ] ?
)
} OR @<https://w3id.org/my_org/my_datamodelFamilialRelationship>
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
CREATE TABLE "Address" (
street TEXT,
city TEXT,
postal_code TEXT,
PRIMARY KEY (street, city, postal_code)
);
CREATE TABLE "NamedThing" (
id TEXT NOT NULL,
name TEXT,
description TEXT,
image TEXT,
PRIMARY KEY (id)
);
CREATE TABLE "Organization" (
id TEXT NOT NULL,
name TEXT,
description TEXT,
image TEXT,
mission_statement TEXT,
founding_date TEXT,
PRIMARY KEY (id)
);
CREATE TABLE "Person" (
id TEXT NOT NULL,
name TEXT,
description TEXT,
image TEXT,
primary_email TEXT,
birth_date TEXT,
age_in_years INTEGER,
current_address TEXT,
PRIMARY KEY (id)
);
CREATE TABLE "Registry" (
persons TEXT,
organizations TEXT,
PRIMARY KEY (persons, organizations)
);
CREATE TABLE "Relationship" (
started_at_time DATE,
ended_at_time DATE,
related_to TEXT,
type TEXT,
PRIMARY KEY (started_at_time, ended_at_time, related_to, type)
);
CREATE TABLE "FamilialRelationship" (
started_at_time DATE,
ended_at_time DATE,
related_to TEXT NOT NULL,
type VARCHAR(10) NOT NULL,
"Person_id" TEXT,
PRIMARY KEY (started_at_time, ended_at_time, related_to, type, "Person_id"),
FOREIGN KEY(related_to) REFERENCES "Person" (id),
FOREIGN KEY("Person_id") REFERENCES "Person" (id)
);
CREATE TABLE "Organization_aliases" (
backref_id TEXT,
aliases TEXT,
PRIMARY KEY (backref_id, aliases),
FOREIGN KEY(backref_id) REFERENCES "Organization" (id)
);
CREATE TABLE "Person_aliases" (
backref_id TEXT,
aliases TEXT,
PRIMARY KEY (backref_id, aliases),
FOREIGN KEY(backref_id) REFERENCES "Person" (id)
);

View File

File diff suppressed because it is too large Load Diff

View File

@ -22,14 +22,29 @@ prefixes:
xml: http://www.w3.org/XML/1998/namespace
xsd: http://www.w3.org/2001/XMLSchema#
rdfs: http://www.w3.org/2000/01/rdf-schema#
schema: https://schema.org/
unit: http://qudt.org/2.1/vocab/unit/
default_prefix: as
default_range: string
types:
langString:
anyURI:
typeof: xsd:anyURI
uri: xsd:anyURI
typeof: string
base: str
durationType:
uri: xsd:duration
typeof: string
base: str
nonNegativeInteger:
uri: xsd:nonNegativeInteger
typeof: integer
base: int
minimum_value: 0
langString:
uri: rdf:langString
typeof: string
base: str
enums:
unitEnum:
@ -61,7 +76,6 @@ classes:
description: Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection.
slots:
- attachment
- attachments
- attributedTo
- audience
- bcc
@ -85,13 +99,11 @@ classes:
- endTime
- id
- mediaType
- objectType
- published
- rating
- startTime
- updated
class_uri: as:Object
disjoint_with: as:Link
disjoint_with: Link
Link:
description: A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [ RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href. Properties of the Link are properties of the reference as opposed to properties of the resource.
@ -140,14 +152,14 @@ classes:
class_uri: as:Collection
slot_usage:
items:
list_items_ordered: false
list_elements_ordered: false
OrderedCollection:
description: A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered.
is_a: Collection
slot_usage:
items:
list_items_ordered: true
list_elements_ordered: true
CollectionPage:
description: Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object.
@ -169,7 +181,7 @@ classes:
class_uri: as:OrderedCollectionPage
slot_usage:
items:
list_items_ordered: false
list_elements_ordered: false
# ----------------------------
# Extended Types
@ -432,7 +444,7 @@ classes:
class_uri: as:Profile
Tombstone:
description: A Tombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted.
description: A Tombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted.
is_a: Object
slots:
- formerType
@ -454,15 +466,15 @@ slots:
id:
description: Provides the globally unique identifier for an Object or Link.
slot_uri: as:id
domain:
- as:Object
- as:Link
domain_of:
- Object
- Link
range: anyURI
type:
description: Identifies the Object or Link type. Multiple values may be specified.
domain:
- as:Object
- as:Link
description: Identifies the Object or Link type. Multiple values may be specified.
domain_of:
- Object
- Link
range: anyURI
multivalued: true
actor:
@ -470,60 +482,60 @@ slots:
is_a: attributedTo
slot_uri: as:actor
multivalued: true
domain: as:Activity
range:
- as:Object
- as:Link
domain_of: as:Activity
any_of:
- range: Object
- range: Link
attachment:
description: Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.
slot_uri: as:attachment
multivalued: true
domain: as:Object
range:
- as:Object
- as:Link
domain_of: Object
any_of:
- range: Object
- range: Link
attributedTo:
description: Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.
slot_uri: as:attributedTo
multivalued: true
domain:
- as:Link
- as:Object
range:
- as:Link
- as:Object
domain_of:
- Link
- Object
any_of:
- range: Link
- range: Object
audience:
description: Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.
slot_uri: as:audience
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
bcc:
description: Identifies one or more Objects that are part of the private secondary audience of this Object.
slot_uri: as:bcc
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
bto:
description: Identifies an Object that is part of the private primary audience of this Object.
slot_uri: as:bto
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
cc:
description: Identifies an Object that is part of the public secondary audience of this Object.
slot_uri: as:cc
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
context:
description: >
Identifies the context within which the object exists or an activity was performed.
@ -531,132 +543,132 @@ slots:
The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.
slot_uri: as:context
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
current:
description: In a paged Collection, indicates the page that contains the most recently updated member items.
description: In a paged Collection, indicates the page that contains the most recently updated member items.
slot_uri: as:current
domain: as:Collection
range:
- as:CollectionPage
- as:OrderedCollectionPage
- as:Link
domain_of: as:Collection
any_of:
- range: CollectionPage
- range: OrderedCollectionPage
- range: Link
first:
description: In a paged Collection, indicates the furthest preceeding page of items in the collection.
description: In a paged Collection, indicates the furthest preceeding page of items in the collection.
slot_uri: as:first
domain: as:Collection
range:
- as:CollectionPage
- as:OrderedCollectionPage
- as:Link
domain_of: as:Collection
any_of:
- range: CollectionPage
- range: OrderedCollectionPage
- range: Link
generator:
description: Identifies the entity (e.g. an application) that generated the object.
slot_uri: as:generator
multivalued: true
domain: as:Object
range:
- as:Object
- as:Link
domain_of: Object
any_of:
- range: Object
- range: Link
icon:
description: Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.
slot_uri: as:icon
multivalued: true
domain: as:Object
range:
- as:Image
- as:Link
domain_of: Object
any_of:
- range: Image
- range: Link
image:
description: Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.
slot_uri: as:image
multivalued: true
domain: as:Object
range:
- as:Image
- as:Link
domain_of: Object
any_of:
- range: Image
- range: Link
inReplyTo:
description: Indicates one or more entities for which this object is considered a response.
slot_uri: as:inReplyTo
multivalued: true
domain: as:Object
range:
- as:Object
- as:Link
domain_of: Object
any_of:
- range: Object
- range: Link
instrument:
description: Identifies one or more objects used (or to be used) in the completion of an Activity.
slot_uri: as:instrument
multivalued: true
domain: Activity
range:
- Object
- Link
domain_of: Activity
any_of:
- range: Object
- range: Link
last:
description: In a paged Collection, indicates the furthest proceeding page of the collection.
slot_uri: as:last
domain: Collection
range:
- CollectionPage
- OrderedCollectionPage
- Link
domain_of: Collection
any_of:
- range: CollectionPage
- range: OrderedCollectionPage
- range: Link
location:
description: Indicates one or more physical or logical locations associated with the object.
slot_uri: as:location
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
items:
description: Identifies the items contained in a collection. The items might be ordered or unordered.
slot_uri: as:items
multivalued: true
domain: Collection
range:
- Object
- Link
domain_of: Collection
any_of:
- range: Object
- range: Link
oneOf:
description: Identifies an exclusive option for a Question. Use of oneOf implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use anyOf.
slot_uri: as:oneOf
multivalued: true
domain: Question
range:
- Object
- Link
domain_of: Question
any_of:
- range: Object
- range: Link
anyOf:
description: Identifies an inclusive option for a Question. Use of anyOf implies that the Question can have multiple answers. To indicate that a Question can have only one answer, use oneOf.
slot_uri: as:anyOf
multivalued: true
domain: Question
range:
- Object
- Link
domain_of: Question
any_of:
- range: Object
- range: Link
closed:
description: Indicates that a question has been closed, and answers are no longer accepted.
domain: Question
range:
- Object
- Link
- xsd:dateTime
- xsd:boolean
domain_of: Question
any_of:
- range: Object
- range: Link
- range: datetime
- range: boolean
origin:
description: Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A".
slot_uri: as:origin
multivalued: true
domain: Activity
range:
- Object
- Link
domain_of: Activity
any_of:
- range: Object
- range: Link
next:
description: In a paged Collection, indicates the next page of items.
slot_uri: as:next
domain:
domain_of:
- CollectionPage
- OrderedCollectionPage
range:
- CollectionPage
- OrderedCollectionPage
- Link
any_of:
- range: CollectionPage
- range: OrderedCollectionPage
- range: Link
object:
description: >
When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added.
@ -664,183 +676,185 @@ slots:
When used within a Relationship describes the entity to which the subject is related.
slot_uri: as:object
multivalued: true
domain:
domain_of:
- Activity
- Relationship
range:
- Object
- Link
any_of:
- range: Object
- range: Link
prev:
description: In a paged Collection, identifies the previous page of items.
description: In a paged Collection, identifies the previous page of items.
slot_uri: as:prev
domain:
domain_of:
- CollectionPage
- OrderedCollectionPage
range:
- CollectionPage
- OrderedCollectionPage
- Link
any_of:
- range: CollectionPage
- range: OrderedCollectionPage
- range: Link
preview:
description: Identifies an entity that provides a preview of this object.
slot_uri: as:preview
multivalued: true
domain:
- Link
- Object
range:
domain_of:
- Link
- Object
any_of:
- range: Link
- range: Object
result:
description: Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.
slot_uri: as:result
multivalued: true
domain: Activity
range:
- Object
- Link
domain_of: Activity
any_of:
- range: Object
- range: Link
replies:
description: Identifies a Collection containing objects considered to be responses to this object.
slot_uri: as:replies
domain: Object
domain_of: Object
range: Collection
tag:
description: One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.
slot_uri: as:tag
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
target:
description: Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John's wishlist. An activity can have more than one target.
slot_uri: as:target
multivalued: true
domain: Activity
range:
- Object
- Link
domain_of: Activity
any_of:
- range: Object
- range: Link
to:
description: Identifies an entity considered to be part of the public primary audience of an Object
slot_uri: as:to
multivalued: true
domain: Object
range:
- Object
- Link
domain_of: Object
any_of:
- range: Object
- range: Link
url:
description: Identifies one or more links to representations of the object
slot_uri: as:url
multivalued: true
domain: Object
range:
- xsd:anyURI
- Link
domain_of: Object
any_of:
- range: anyURI
- range: Link
accuracy:
description: Indicates the accuracy of position coordinates on a Place objects. Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate".
slot_uri: as:accuracy
domain: Place
range: xsd:float
domain_of: Place
range: float
minimum_value: 0
maximum_value: 100
altitude:
description: Indicates the altitude of a place. The measurement units is indicated using the units property. If units is not specified, the default is assumed to be "m" indicating meters.
slot_uri: as:altitude
domain: Object
range: xsd:float
domain_of: Object
range: float
content:
description: The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values.
slot_uri: as:content
multivalued: true
domain: Object
range:
- xsd:string
- rdf:langString
domain_of: Object
any_of:
- range: string
- range: langString
name:
description: A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.
slot_uri: rdfs:name
multivalued: true
domain:
domain_of:
- Object
- Link
range:
- xsd:string
- rdf:langString
any_of:
- range: string
- range: langString
duration:
description: When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object's approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").
slot_uri: as:duration
domain: Object
range: xsd:duration
domain_of: Object
range: durationType
see_also:
- https://www.w3.org/TR/xmlschema11-2/
height:
description: On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource.
slot_uri: as:height
domain: Link
range: xsd:nonNegativeInteger
domain_of: Link
range: nonNegativeInteger
minimum_value: 0
href:
description: The target resource pointed to by a Link.
slot_uri: as:href
domain: Link
range: xsd:anyURI
domain_of: Link
range: anyURI
hreflang:
description: Hints as to the language used by the target resource. Value MUST be a [BCP47] Language-Tag.
slot_uri: as:hreflang
is_a: schema:inLanguage
close_mappings:
- schema:inLanguage
notes: Inheriting from schema:inLanguage in order to specify IETF BCP47 language codes since there isn't a formal ontology I can find
domain: Link
domain_of: Link
range: string
partOf:
description: Identifies the Collection to which a CollectionPage objects items belong.
slot_uri: as:partOf
domain:
domain_of:
- CollectionPage
- OrderedCollectionPage
range:
- Link
- Collection
any_of:
- range: Link
- range: Collection
latitude:
description: The latitude of a place
slot_uri: as:latitude
domain: Place
range: xsd:float
domain_of: Place
range: float
longitude:
description: The longitude of a place
slot_uri: as:longitude
domain: Place
range: xsd:float
domain_of: Place
range: float
mediaType:
description: >
When used on a Link, identifies the MIME media type of the referenced resource.
When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.
slot_uri: as:mediaType
is_a: schema:encodingFormat
exact_mappings:
- schema:encodingFormat
notes: Like hreflang, casting as schema:encodingFormat to specify a MIME type
domain:
domain_of:
- Link
- Object
range: string
endTime:
description: The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.
slot_uri: as:endTime
domain: Object
domain_of: Object
range: datetime
published:
description: The date and time at which the object was published
slot_uri: as:published
domain: Object
domain_of: Object
range: datetime
startTime:
description: The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.
slot_uri: as:startTime
domain: Object
domain_of: Object
range: datetime
radius:
description: The radius from the given latitude and longitude for a Place. The units is expressed by the units property. If units is not specified, the default is assumed to be "m" indicating "meters".
slot_uri: as:radius
domain: Place
range: xsd:float
domain_of: Place
range: float
minimum_value: 0
rel:
description: >
@ -850,76 +864,74 @@ slots:
notes: No validation is done or type could be found for declaring the RCF5988 or HTML5 link relation types
slot_uri: as:rel
multivalued: true
domain: Link
domain_of: Link
range: string
startIndex:
description: A non-negative integer value identifying the relative position within the logical view of a strictly ordered collection.
domain: OrderedCollectionPage
range: xsd:nonNegativeInteger
domain_of: OrderedCollectionPage
range: nonNegativeInteger
minimum_value: 0
summary:
description: A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.
slot_uri: as:summary
multivalued: true
domain: Object
range:
- xsd:string
- rdf:langString
domain_of: Object
any_of:
- range: string
- range: langString
totalItems:
description: A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.
slot_uri: as:totalItems
domain: Collection
range: xsd:nonNegativeInteger
domain_of: Collection
range: nonNegativeInteger
minimum_value: 0.0
units:
description: Specifies the measurement units for the radius and altitude properties on a Place object. If not specified, the default is assumed to be "m" for "meters".
slot_uri: as:units
domain: Place
domain_of: Place
any_of:
- range: unitEnum
- range: xsd:anyURI
- range: anyURI
updated:
description: The date and time at which the object was updated
slot_uri: as:updated
domain: Object
domain_of: Object
range: datetime
width:
description: On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource.
slot_uri: as:width
domain: Link
range: xsd:nonNegativeInteger
domain_of: Link
range: nonNegativeInteger
minimum_value: 0
subject:
description: On a Relationship object, the subject property identifies one of the connected individuals. For instance, for a Relationship object describing "John is related to Sally", subject would refer to John.
is_a: subject
slot_uri: as:subject
multivalued: true
domain: Relationship
range:
- as:Object
- as:Link
domain_of: Relationship
any_of:
- range: Object
- range: Link
relationship:
description: On a Relationship object, the relationship property identifies the kind of relationship that exists between subject and object.
is_a: predicate
slot_uri: as:relationship
multivalued: true
domain: Relationship
domain_of: Relationship
range: Object
describes:
description: On a Profile object, the describes property identifies the object described by the Profile.
slot_uri: as:describes
domain: Profile
domain_of: Profile
range: Object
formerType:
description: On a Tombstone object, the formerType property identifies the type of the object that was deleted.
slot_uri: as:formerType
multivalued: true
domain: Tombstone
domain_of: Tombstone
range: Object
deleted:
description: On a Tombstone object, the deleted property is a timestamp for when the object was deleted.
slot_uri: as:deleted
domain: Tombstone
domain_of: Tombstone
range: datetime

View File

@ -2,7 +2,9 @@ id: https://github.com/p2p_ld/linkml-activitypub
name: linkml-activitypub
title: linkml-activitypub
description: |-
Extension of ActivityPub/ActivityStreams to include an Actor class
Extension of ActivityPub/ActivityStreams to include an Actor class.
Obviously not done yet.
license: GNU GPL v3.0
see_also:
- https://linkml-activitypub.readthedocs.io

File diff suppressed because it is too large Load Diff

View File

@ -1,632 +0,0 @@
# Auto generated from activitypub.yaml by pythongen.py version: 0.9.0
# Generation date: 2022-09-06T10:01:50
# Schema: my_datamodel
#
# id: https://w3id.org/my_org/my_datamodel
# description: Enter a detailed description of your project here
# license: https://creativecommons.org/publicdomain/zero/1.0/
import dataclasses
import re
from jsonasobj2 import as_dict
from typing import Optional, List, Union, Dict, ClassVar, Any
from dataclasses import dataclass
from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue
from linkml_runtime.utils.slot import Slot
from linkml_runtime.utils.metamodelcore import empty_list, empty_dict
from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str
from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from linkml_runtime.utils.enumerations import EnumDefinitionImpl
from rdflib import URIRef
from linkml_runtime.utils.curienamespace import CurieNamespace
from linkml_runtime.utils.metamodelcore import Bool, XSDDate
metamodel_version = "1.7.0"
version = None
# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs
# Namespaces
PATO = CurieNamespace('PATO',
'http://purl.obolibrary.org/obo/PATO_')
BIOLINK = CurieNamespace('biolink',
'https://w3id.org/biolink/')
FAMREL = CurieNamespace('famrel',
'http://example.org/famrel/')
LINKML = CurieNamespace('linkml',
'https://w3id.org/linkml/')
MY_DATAMODEL = CurieNamespace('my_datamodel',
'https://w3id.org/my_org/my_datamodel')
PROV = CurieNamespace('prov',
'http://www.w3.org/ns/prov#')
SCHEMA = CurieNamespace('schema',
'http://schema.org/')
DEFAULT_ = MY_DATAMODEL
# Types
# Class references
class NamedThingId(extended_str):
pass
class PersonId(NamedThingId):
pass
class OrganizationId(NamedThingId):
pass
@dataclass
class Registry(YAMLRoot):
"""
Top level data container
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.Registry
class_class_curie: ClassVar[str] = "my_datamodel:Registry"
class_name: ClassVar[str] = "Registry"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Registry
persons: Optional[Union[
Dict[Union[str, PersonId], Union[dict, "Person"]],
List[Union[dict, "Person"]]
]] = empty_dict()
organizations: Optional[Union[
Dict[Union[str, OrganizationId], Union[dict, "Organization"]],
List[Union[dict, "Organization"]]
]] = empty_dict()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
self._normalize_inlined_as_list(
slot_name="persons",
slot_type=Person,
key_name="id",
keyed=True
)
self._normalize_inlined_as_list(
slot_name="organizations",
slot_type=Organization,
key_name="id",
keyed=True
)
super().__post_init__(**kwargs)
@dataclass
class NamedThing(YAMLRoot):
"""
A generic grouping for any identifiable entity
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.NamedThing
class_class_curie: ClassVar[str] = "my_datamodel:NamedThing"
class_name: ClassVar[str] = "NamedThing"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.NamedThing
id: Union[str, NamedThingId] = None
name: Optional[str] = None
description: Optional[str] = None
image: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, NamedThingId):
self.id = NamedThingId(self.id)
if self.name is not None and not isinstance(self.name, str):
self.name = str(self.name)
if self.description is not None \
and not isinstance(self.description, str):
self.description = str(self.description)
if self.image is not None and not isinstance(self.image, str):
self.image = str(self.image)
super().__post_init__(**kwargs)
@dataclass
class Person(NamedThing):
"""
A person (alive, dead, undead, or fictional).
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.Person
class_class_curie: ClassVar[str] = "schema:Person"
class_name: ClassVar[str] = "Person"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Person
id: Union[str, PersonId] = None
primary_email: Optional[str] = None
birth_date: Optional[str] = None
age_in_years: Optional[int] = None
current_address: Optional[Union[dict, "Address"]] = None
has_familial_relationships: Optional[Union[
Union[dict, "FamilialRelationship"],
List[Union[dict, "FamilialRelationship"]]
]] = empty_list()
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, PersonId):
self.id = PersonId(self.id)
if self.primary_email is not None \
and not isinstance(self.primary_email, str):
self.primary_email = str(self.primary_email)
if self.birth_date is not None \
and not isinstance(self.birth_date, str):
self.birth_date = str(self.birth_date)
if self.age_in_years is not None \
and not isinstance(self.age_in_years, int):
self.age_in_years = int(self.age_in_years)
if self.current_address is not None \
and not isinstance(self.current_address, Address):
self.current_address = Address(**as_dict(self.current_address))
if not isinstance(self.has_familial_relationships, list):
self.has_familial_relationships = [self.has_familial_relationships] \
if self.has_familial_relationships is not None \
else []
self.has_familial_relationships = [
v if isinstance(v, FamilialRelationship)
else FamilialRelationship(**as_dict(v))
for v in self.has_familial_relationships]
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class HasAliases(YAMLRoot):
"""
A mixin applied to any class that can have aliases/alternateNames
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.HasAliases
class_class_curie: ClassVar[str] = "my_datamodel:HasAliases"
class_name: ClassVar[str] = "HasAliases"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.HasAliases
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class Organization(NamedThing):
"""
An organization such as a company or university
"""
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.Organization
class_class_curie: ClassVar[str] = "schema:Organization"
class_name: ClassVar[str] = "Organization"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Organization
id: Union[str, OrganizationId] = None
mission_statement: Optional[str] = None
founding_date: Optional[str] = None
aliases: Optional[Union[str, List[str]]] = empty_list()
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.id):
self.MissingRequiredField("id")
if not isinstance(self.id, OrganizationId):
self.id = OrganizationId(self.id)
if self.mission_statement is not None \
and not isinstance(self.mission_statement, str):
self.mission_statement = str(self.mission_statement)
if self.founding_date is not None \
and not isinstance(self.founding_date, str):
self.founding_date = str(self.founding_date)
if not isinstance(self.aliases, list):
self.aliases = [self.aliases] if self.aliases is not None else []
self.aliases = [v if isinstance(v, str) else str(v)
for v in self.aliases]
super().__post_init__(**kwargs)
@dataclass
class Address(YAMLRoot):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = SCHEMA.PostalAddress
class_class_curie: ClassVar[str] = "schema:PostalAddress"
class_name: ClassVar[str] = "Address"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Address
street: Optional[str] = None
city: Optional[str] = None
postal_code: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.street is not None and not isinstance(self.street, str):
self.street = str(self.street)
if self.city is not None and not isinstance(self.city, str):
self.city = str(self.city)
if self.postal_code is not None \
and not isinstance(self.postal_code, str):
self.postal_code = str(self.postal_code)
super().__post_init__(**kwargs)
@dataclass
class Relationship(YAMLRoot):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.Relationship
class_class_curie: ClassVar[str] = "my_datamodel:Relationship"
class_name: ClassVar[str] = "Relationship"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.Relationship
started_at_time: Optional[Union[str, XSDDate]] = None
ended_at_time: Optional[Union[str, XSDDate]] = None
related_to: Optional[str] = None
type: Optional[str] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.started_at_time is not None \
and not isinstance(self.started_at_time, XSDDate):
self.started_at_time = XSDDate(self.started_at_time)
if self.ended_at_time is not None \
and not isinstance(self.ended_at_time, XSDDate):
self.ended_at_time = XSDDate(self.ended_at_time)
if self.related_to is not None \
and not isinstance(self.related_to, str):
self.related_to = str(self.related_to)
if self.type is not None and not isinstance(self.type, str):
self.type = str(self.type)
super().__post_init__(**kwargs)
@dataclass
class FamilialRelationship(Relationship):
_inherited_slots: ClassVar[List[str]] = []
class_class_uri: ClassVar[URIRef] = MY_DATAMODEL.FamilialRelationship
class_class_curie: ClassVar[str] = "my_datamodel:FamilialRelationship"
class_name: ClassVar[str] = "FamilialRelationship"
class_model_uri: ClassVar[URIRef] = MY_DATAMODEL.FamilialRelationship
type: Union[str, "FamilialRelationshipType"] = None
related_to: Union[str, PersonId] = None
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.type):
self.MissingRequiredField("type")
if not isinstance(self.type, FamilialRelationshipType):
self.type = FamilialRelationshipType(self.type)
if self._is_empty(self.related_to):
self.MissingRequiredField("related_to")
if not isinstance(self.related_to, PersonId):
self.related_to = PersonId(self.related_to)
super().__post_init__(**kwargs)
# Enumerations
class PersonStatus(EnumDefinitionImpl):
ALIVE = PermissibleValue(text="ALIVE",
description="the person is living",
meaning=PATO["0001421"])
DEAD = PermissibleValue(text="DEAD",
description="the person is deceased",
meaning=PATO["0001422"])
UNKNOWN = PermissibleValue(text="UNKNOWN",
description="the vital status is not known")
_defn = EnumDefinition(
name="PersonStatus",
)
class FamilialRelationshipType(EnumDefinitionImpl):
SIBLING_OF = PermissibleValue(text="SIBLING_OF",
meaning=FAMREL["01"])
PARENT_OF = PermissibleValue(text="PARENT_OF",
meaning=FAMREL["02"])
CHILD_OF = PermissibleValue(text="CHILD_OF",
meaning=FAMREL["01"])
_defn = EnumDefinition(
name="FamilialRelationshipType",
)
# Slots
class slots:
pass
slots.id = Slot(
uri=SCHEMA.identifier,
name="id",
curie=SCHEMA.curie('identifier'),
model_uri=MY_DATAMODEL.id,
domain=None,
range=URIRef
)
slots.name = Slot(
uri=SCHEMA.name,
name="name",
curie=SCHEMA.curie('name'),
model_uri=MY_DATAMODEL.name,
domain=None,
range=Optional[str]
)
slots.description = Slot(
uri=SCHEMA.description,
name="description",
curie=SCHEMA.curie('description'),
model_uri=MY_DATAMODEL.description,
domain=None,
range=Optional[str]
)
slots.image = Slot(
uri=SCHEMA.image,
name="image",
curie=SCHEMA.curie('image'),
model_uri=MY_DATAMODEL.image,
domain=None,
range=Optional[str]
)
slots.primary_email = Slot(
uri=SCHEMA.email,
name="primary_email",
curie=SCHEMA.curie('email'),
model_uri=MY_DATAMODEL.primary_email,
domain=None,
range=Optional[str]
)
slots.birth_date = Slot(
uri=SCHEMA.birthDate,
name="birth_date",
curie=SCHEMA.curie('birthDate'),
model_uri=MY_DATAMODEL.birth_date,
domain=None,
range=Optional[str]
)
slots.employed_at = Slot(
uri=MY_DATAMODEL.employed_at,
name="employed_at",
curie=MY_DATAMODEL.curie('employed_at'),
model_uri=MY_DATAMODEL.employed_at,
domain=None,
range=Optional[Union[str, OrganizationId]]
)
slots.is_current = Slot(
uri=MY_DATAMODEL.is_current,
name="is_current",
curie=MY_DATAMODEL.curie('is_current'),
model_uri=MY_DATAMODEL.is_current,
domain=None,
range=Optional[Union[bool, Bool]]
)
slots.has_familial_relationships = Slot(
uri=MY_DATAMODEL.has_familial_relationships,
name="has_familial_relationships",
curie=MY_DATAMODEL.curie('has_familial_relationships'),
model_uri=MY_DATAMODEL.has_familial_relationships,
domain=None,
range=Optional[Union[
Union[dict, FamilialRelationship],
List[Union[dict, FamilialRelationship]]
]]
)
slots.current_address = Slot(
uri=MY_DATAMODEL.current_address, name="current_address",
curie=MY_DATAMODEL.curie('current_address'),
model_uri=MY_DATAMODEL.current_address, domain=None,
range=Optional[Union[dict, Address]]
)
slots.age_in_years = Slot(
uri=MY_DATAMODEL.age_in_years, name="age_in_years",
curie=MY_DATAMODEL.curie('age_in_years'),
model_uri=MY_DATAMODEL.age_in_years, domain=None, range=Optional[int]
)
slots.related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="related_to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.related_to,
domain=None,
range=Optional[str]
)
slots.type = Slot(
uri=MY_DATAMODEL.type,
name="type",
curie=MY_DATAMODEL.curie('type'),
model_uri=MY_DATAMODEL.type,
domain=None,
range=Optional[str]
)
slots.street = Slot(
uri=MY_DATAMODEL.street,
name="street",
curie=MY_DATAMODEL.curie('street'),
model_uri=MY_DATAMODEL.street,
domain=None,
range=Optional[str]
)
slots.city = Slot(
uri=MY_DATAMODEL.city,
name="city",
curie=MY_DATAMODEL.curie('city'),
model_uri=MY_DATAMODEL.city,
domain=None,
range=Optional[str]
)
slots.mission_statement = Slot(
uri=MY_DATAMODEL.mission_statement,
name="mission_statement",
curie=MY_DATAMODEL.curie('mission_statement'),
model_uri=MY_DATAMODEL.mission_statement,
domain=None,
range=Optional[str]
)
slots.founding_date = Slot(
uri=MY_DATAMODEL.founding_date,
name="founding_date",
curie=MY_DATAMODEL.curie('founding_date'),
model_uri=MY_DATAMODEL.founding_date,
domain=None,
range=Optional[str]
)
slots.postal_code = Slot(
uri=MY_DATAMODEL.postal_code,
name="postal_code",
curie=MY_DATAMODEL.curie('postal_code'),
model_uri=MY_DATAMODEL.postal_code,
domain=None,
range=Optional[str]
)
slots.started_at_time = Slot(
uri=PROV.startedAtTime,
name="started_at_time",
curie=PROV.curie('startedAtTime'),
model_uri=MY_DATAMODEL.started_at_time,
domain=None,
range=Optional[Union[str, XSDDate]]
)
slots.ended_at_time = Slot(
uri=PROV.endedAtTime,
name="ended_at_time",
curie=PROV.curie('endedAtTime'),
model_uri=MY_DATAMODEL.ended_at_time,
domain=None,
range=Optional[Union[str, XSDDate]]
)
slots.registry__persons = Slot(
uri=MY_DATAMODEL.persons,
name="registry__persons",
curie=MY_DATAMODEL.curie('persons'),
model_uri=MY_DATAMODEL.registry__persons,
domain=None,
range=Optional[Union[
Dict[Union[str, PersonId], Union[dict, Person]],
List[Union[dict, Person]]
]]
)
slots.registry__organizations = Slot(
uri=MY_DATAMODEL.organizations,
name="registry__organizations",
curie=MY_DATAMODEL.curie('organizations'),
model_uri=MY_DATAMODEL.registry__organizations,
domain=None,
range=Optional[Union[
Dict[Union[str, OrganizationId], Union[dict, Organization]],
List[Union[dict, Organization]]
]]
)
slots.hasAliases__aliases = Slot(
uri=MY_DATAMODEL.aliases,
name="hasAliases__aliases",
curie=MY_DATAMODEL.curie('aliases'),
model_uri=MY_DATAMODEL.hasAliases__aliases,
domain=None,
range=Optional[Union[str, List[str]]]
)
slots.related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="related to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.related_to,
domain=None,
range=Union[str, PersonId]
)
slots.Person_primary_email = Slot(
uri=SCHEMA.email,
name="Person_primary_email",
curie=SCHEMA.curie('email'),
model_uri=MY_DATAMODEL.Person_primary_email,
domain=Person,
range=Optional[str],
pattern=re.compile(r'^\S+@[\S+\.]+\S+')
)
slots.FamilialRelationship_type = Slot(
uri=MY_DATAMODEL.type,
name="FamilialRelationship_type",
curie=MY_DATAMODEL.curie('type'),
model_uri=MY_DATAMODEL.FamilialRelationship_type,
domain=FamilialRelationship,
range=Union[str, "FamilialRelationshipType"]
)
slots.FamilialRelationship_related_to = Slot(
uri=MY_DATAMODEL.related_to,
name="FamilialRelationship_related to",
curie=MY_DATAMODEL.curie('related_to'),
model_uri=MY_DATAMODEL.FamilialRelationship_related_to,
domain=FamilialRelationship,
range=Union[str, PersonId]
)

2672
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ include = ["README.md", "linkml_activitypub/activitypub.yaml", "generated"]
[tool.poetry.dependencies]
python = "^3.9"
linkml-runtime = "^1.1.24"
pydantic = "^2.5.3"
[tool.poetry-dynamic-versioning]
enable = true