Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
feat(schema): merge Thing and Metadata interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Nov 10, 2020
1 parent e72e51b commit 084e0f4
Show file tree
Hide file tree
Showing 47 changed files with 1,305 additions and 217 deletions.
89 changes: 87 additions & 2 deletions src/schema/interface/ActionInterface.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,92 @@
"https://schema.org/Action"
interface ActionInterface {
### Metadata properties ###
"http://purl.org/dc/terms/identifier,https://schema.org/identifier"
identifier: ID
"http://purl.org/dc/terms/contributor,https://schema.org/contributor"
contributor: String!
"http://purl.org/dc/terms/coverage"
coverage: String
"http://purl.org/dc/terms/creator"
creator: String!
"http://purl.org/dc/terms/date"
date: _Neo4jDate
"http://purl.org/dc/terms/description,https://schema.org/description"
description: String
"https://schema.org/disambiguatingDescription"
disambiguatingDescription: String
"http://purl.org/dc/terms/format"
format: String!
"http://purl.org/dc/terms/language"
language: AvailableLanguage
"http://purl.org/dc/terms/publisher"
publisher: String
"http://purl.org/dc/terms/relation"
relation: String
"http://purl.org/dc/terms/rights"
rights: String
"http://purl.org/dc/terms/source"
source: String!
"http://purl.org/dc/terms/subject"
subject: String
"http://purl.org/dc/terms/title"
title: String
"http://purl.org/dc/terms/type,http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
type: String
########################
### ThingInterface properties ###
"https://schema.org/additionalType"
additionalType: [String]
"https://schema.org/additionalProperty"
additionalProperty: [PropertyValue] @relation(name: "ADDITIONAL_PROPERTY", direction: "OUT")
"https://schema.org/alternateName"
alternateName: String
"https://schema.org/image"
image: URL
"https://schema.org/mainEntityOfPage"
mainEntityOfPage: [CreativeWorkInterface] @relation(name: "MAIN_ENTITY_OF_PAGE", direction: "OUT")
"https://schema.org/name"
name: String
"https://schema.org/potentialAction"
potentialAction: [ActionInterface] @relation(name: "POTENTIAL_ACTION", direction: "OUT")
"https://schema.org/sameAs"
sameAs: URL
"https://schema.org/subjectOf"
subjectOf: [CreativeWorkInterface] @relation(name: "SUBJECT_OF", direction: "OUT")
"https://schema.org/url"
url: URL
#######################
### SKOS properties ###
"http://www.w3.org/2004/02/skos/core#broadMatch"
broadMatch: [Action] @relation(name: "BROAD_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#closeMatch"
closeMatch: [Action] @relation(name: "CLOSE_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#exactMatch"
exactMatch: [Action] @relation(name: "EXACT_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#narrowMatch"
narrowMatch: [Action] @relation(name: "NARROW_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#relatedMatch"
relatedMatch: [ThingInterface] @relation(name: "RELATED_MATCH", direction: "OUT")
############################################
### ProvenanceEntityInterface properties ###
"http://www.w3.org/ns/prov#wasGeneratedBy"
wasGeneratedBy: [ActionInterface] @relation(name: "WAS_GENERATED_BY", direction: "OUT")
"http://www.w3.org/ns/prov#wasDerivedFrom"
wasDerivedFrom: [ThingInterface] @relation(name: "WAS_DERIVED_FROM", direction: "OUT")
"http://www.w3.org/ns/prov#wasAttributedTo"
wasAttributedTo: [LegalPersonInterface] @relation(name: "WAS_ATTRIBUTED_TO", direction: "OUT")
"http://www.w3.org/ns/prov#used"
used: [ThingInterface] @relation(name: "USED", direction: "OUT")
##############################################
### ProvenanceActivityInterface properties ###
"http://www.w3.org/ns/prov#startedAtTime"
startedAtTime: _Neo4jDateTime
"http://www.w3.org/ns/prov#wasInformedBy"
wasInformedBy: [ActionInterface] @relation(name: "WAS_INFORMED_BY", direction: "OUT")
"http://www.w3.org/ns/prov#endedAtTime"
endedAtTime: _Neo4jDateTime
##################################
### ActionInterface properties ###
"https://schema.org/actionStatus"
actionStatus: ActionStatusType
"https://schema.org/agent"
Expand All @@ -14,8 +99,8 @@ interface ActionInterface {
instrument: [ThingInterface] @relation(name: "INSTRUMENT", direction: "OUT")
"https://schema.org/location"
location: [Place] @relation(name: "LOCATION", direction: "OUT")
# "https://schema.org/object"
# object: [ThingInterface] @relation(name: "OBJECT", direction: "OUT")
"https://schema.org/object"
object: [ThingInterface] @relation(name: "OBJECT", direction: "OUT")
"https://schema.org/participant"
participant: [String]
"https://schema.org/result"
Expand Down
81 changes: 79 additions & 2 deletions src/schema/interface/CreativeWorkInterface.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,84 @@
"https://schema.org/CreativeWork"
interface CreativeWorkInterface {
### Metadata properties ###
"http://purl.org/dc/terms/identifier,https://schema.org/identifier"
identifier: ID
"http://purl.org/dc/terms/contributor,https://schema.org/contributor"
contributor: String!
"http://purl.org/dc/terms/coverage"
coverage: String
"http://purl.org/dc/terms/creator"
creator: String!
"http://purl.org/dc/terms/date"
date: _Neo4jDate
"http://purl.org/dc/terms/description,https://schema.org/description"
description: String
"https://schema.org/disambiguatingDescription"
disambiguatingDescription: String
"http://purl.org/dc/terms/format"
format: String!
"http://purl.org/dc/terms/language"
language: AvailableLanguage
"http://purl.org/dc/terms/publisher"
publisher: String
"http://purl.org/dc/terms/relation"
relation: String
"http://purl.org/dc/terms/rights"
rights: String
"http://purl.org/dc/terms/source"
source: String!
"http://purl.org/dc/terms/subject"
subject: String
"http://purl.org/dc/terms/title"
title: String
"http://purl.org/dc/terms/type,http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
type: String
########################
### ThingInterface properties ###
"https://schema.org/additionalType"
additionalType: [String]
"https://schema.org/additionalProperty"
additionalProperty: [PropertyValue] @relation(name: "ADDITIONAL_PROPERTY", direction: "OUT")
"https://schema.org/alternateName"
alternateName: String
"https://schema.org/image"
image: URL
"https://schema.org/mainEntityOfPage"
mainEntityOfPage: [CreativeWorkInterface] @relation(name: "MAIN_ENTITY_OF_PAGE", direction: "OUT")
"https://schema.org/name"
name: String
"https://schema.org/potentialAction"
potentialAction: [ActionInterface] @relation(name: "POTENTIAL_ACTION", direction: "OUT")
"https://schema.org/sameAs"
sameAs: URL
"https://schema.org/subjectOf"
subjectOf: [CreativeWorkInterface] @relation(name: "SUBJECT_OF", direction: "OUT")
"https://schema.org/url"
url: URL
#######################
### SKOS properties ###
"http://www.w3.org/2004/02/skos/core#broadMatch"
broadMatch: [CreativeWork] @relation(name: "BROAD_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#closeMatch"
closeMatch: [CreativeWork] @relation(name: "CLOSE_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#exactMatch"
exactMatch: [CreativeWork] @relation(name: "EXACT_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#narrowMatch"
narrowMatch: [CreativeWork] @relation(name: "NARROW_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#relatedMatch"
relatedMatch: [ThingInterface] @relation(name: "RELATED_MATCH", direction: "OUT")
############################################
### ProvenanceEntityInterface properties ###
"http://www.w3.org/ns/prov#wasGeneratedBy"
wasGeneratedBy: [ActionInterface] @relation(name: "WAS_GENERATED_BY", direction: "OUT")
"http://www.w3.org/ns/prov#wasDerivedFrom"
wasDerivedFrom: [ThingInterface] @relation(name: "WAS_DERIVED_FROM", direction: "OUT")
"http://www.w3.org/ns/prov#wasAttributedTo"
wasAttributedTo: [LegalPersonInterface] @relation(name: "WAS_ATTRIBUTED_TO", direction: "OUT")
"http://www.w3.org/ns/prov#used"
used: [ThingInterface] @relation(name: "USED", direction: "OUT")
###############################
### CreativeWork properties ###
"https://schema.org/about"
about: [ThingInterface] @relation(name: "ABOUT", direction: "OUT")
#"https://schema.org/accessMode"
Expand Down Expand Up @@ -86,7 +163,7 @@ interface CreativeWorkInterface {
license: URL
#locationCreated
"https://schema.org/mainEntity"
mainEntity: ThingInterface @relation(name: "MAIN_ENTITY", direction: "IN")
mainEntity: ThingInterface @relation(name: "MAIN_ENTITY", direction: "OUT")
#material
"https://schema.org/mentions"
mentions: [ThingInterface] @relation(name: "MENTIONS", direction: "OUT")
Expand All @@ -98,7 +175,7 @@ interface CreativeWorkInterface {
#provider:
#publication:
"https://schema.org/publisher"
schema_publisher: [Organization] @relation(name: "PUBLISHER", direction: "OUT")
schema_publisher: [Organization] @relation(name: "PUBLISHER", direction: "IN")
#publisherImprint: OrganizationInterface
"https://schema.org/publishingPrinciples"
publishingPrinciples: URL
Expand Down
81 changes: 81 additions & 0 deletions src/schema/interface/LegalPersonInterface.graphql
Original file line number Diff line number Diff line change
@@ -1,4 +1,85 @@
interface LegalPersonInterface {
### Metadata properties ###
"http://purl.org/dc/terms/identifier,https://schema.org/identifier"
identifier: ID
"http://purl.org/dc/terms/contributor,https://schema.org/contributor"
contributor: String!
"http://purl.org/dc/terms/coverage"
coverage: String
"http://purl.org/dc/terms/creator"
creator: String!
"http://purl.org/dc/terms/date"
date: _Neo4jDate
"http://purl.org/dc/terms/description,https://schema.org/description"
description: String
"https://schema.org/disambiguatingDescription"
disambiguatingDescription: String
"http://purl.org/dc/terms/format"
format: String!
"http://purl.org/dc/terms/language"
language: AvailableLanguage
"http://purl.org/dc/terms/publisher"
publisher: String
"http://purl.org/dc/terms/relation"
relation: String
"http://purl.org/dc/terms/rights"
rights: String
"http://purl.org/dc/terms/source"
source: String!
"http://purl.org/dc/terms/subject"
subject: String
"http://purl.org/dc/terms/title"
title: String
"http://purl.org/dc/terms/type,http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
type: String
#################################
### ThingInterface properties ###
"https://schema.org/additionalType"
additionalType: [String]
"https://schema.org/additionalProperty"
additionalProperty: [PropertyValue] @relation(name: "ADDITIONAL_PROPERTY", direction: "OUT")
"https://schema.org/alternateName"
alternateName: String
"https://schema.org/image"
image: URL
"https://schema.org/mainEntityOfPage"
mainEntityOfPage: [CreativeWorkInterface] @relation(name: "MAIN_ENTITY_OF_PAGE", direction: "OUT")
"https://schema.org/name"
name: String
"https://schema.org/potentialAction"
potentialAction: [ActionInterface] @relation(name: "POTENTIAL_ACTION", direction: "OUT")
"https://schema.org/sameAs"
sameAs: URL
"https://schema.org/subjectOf"
subjectOf: [CreativeWorkInterface] @relation(name: "SUBJECT_OF", direction: "OUT")
"https://schema.org/url"
url: URL
#######################
### SKOS properties ###
"http://www.w3.org/2004/02/skos/core#broadMatch"
broadMatch: [Person] @relation(name: "BROAD_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#closeMatch"
closeMatch: [Person] @relation(name: "CLOSE_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#exactMatch"
exactMatch: [Person] @relation(name: "EXACT_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#narrowMatch"
narrowMatch: [Person] @relation(name: "NARROW_MATCH", direction: "OUT")
"http://www.w3.org/2004/02/skos/core#relatedMatch"
relatedMatch: [ThingInterface] @relation(name: "RELATED_MATCH", direction: "OUT")
############################################
### ProvenanceEntityInterface properties ###
"http://www.w3.org/ns/prov#wasGeneratedBy"
wasGeneratedBy: [ActionInterface] @relation(name: "WAS_GENERATED_BY", direction: "OUT")
"http://www.w3.org/ns/prov#wasDerivedFrom"
wasDerivedFrom: [ThingInterface] @relation(name: "WAS_DERIVED_FROM", direction: "OUT")
"http://www.w3.org/ns/prov#wasAttributedTo"
wasAttributedTo: [LegalPersonInterface] @relation(name: "WAS_ATTRIBUTED_TO", direction: "OUT")
"http://www.w3.org/ns/prov#used"
used: [ThingInterface] @relation(name: "USED", direction: "OUT")
###########################################
### ProvenanceAgentInterface properties ###
"http://www.w3.org/ns/prov#wasAssociatedWith"
wasAssociatedWith: [LegalPersonInterface] @relation(name: "WAS_ASSOCIATED_WITH", direction: "OUT")
"http://www.w3.org/ns/prov#actedOnBehalfOf"
actedOnBehalfOf: [LegalPersonInterface] @relation(name: "ACTED_ON_BEHALF_OF", direction: "OUT")
}
Loading

0 comments on commit 084e0f4

Please sign in to comment.