Define ServiceMeta
We need to decide on the terms and properties used in the ServiceMeta file. Those should be based the schema.org WebAPI and WebApplication types, but they also need to be compatible with the Openminds WebServiceVersion schema (i.e. everything included in the ServiceMeta schema can be converted to openminds).
Using these specifications, here is my first attempt presented as both a jsonld context and the crosswalk used to convert the servicemeta properties to WebServiceVersion properties in the python script meant to update the ebrains Knowledge Graph:
{
"@context": {
"type": "@type",
"id": "@id",
"schema":"http://schema.org/",
"Organization": {"@id": "schema:Organization"},
"Person": {"@id": "schema:Person"},
"WebApplication": {"@id": "schema:WebApplication"},
"WebAPI": {"id": "schema:WebAPI"},
"Text": {"@id": "schema:Text"},
"URL": {"@id": "schema:URL"},
"author": {"@id": "schema:author", "@container": "@list"},
"alternateName": {"@id": "schema:alternateName"},
"citation": { "@id": "schema:citation"},
"contributor": { "@id": "schema:contributor"},
"copyrightHolder": { "@id": "schema:copyrightHolder"},
"copyrightYear": { "@id": "schema:copyrightYear"},
"dateModified": {"@id": "schema:datePublished", "@type": "schema:Date" },
"documentation": {"@id": "schema:documentation", "@type": "@id"},
"downloadUrl": { "@id": "schema:downloadUrl", "@type": "@id"},
"funding": { "@id": "schema:funding", "@type": "schema:Grant"},
"funder": {"@id": "schema:funder"},
"identifer": {"@id": "schema:identifier"},
"version": { "@id": "schema:version"},
"url": { "@id": "schema:url", "@type": "@id"},
"serviceOutput": {"@id": "schema:serviceOutput"},
"hasPart": { "@id": "schema:hasPart" },
"identifier": { "@id": "schema:identifier", "@type": "@id"},
"softwareHelp": { "@id": "schema:softwareHelp"},
"releaseNotes": { "@id": "schema:releaseNotes"},
"familyName": { "@id": "schema:familyName"},
"givenName": { "@id": "schema:givenName"},
"email": { "@id": "schema:email"},
}
}
# Crosswalk structured thusly: {"openminds key": "servicemeta key"}
# Using the schema.org types Thing > Intangible > Service > WebAPI and Thing > CreativeWork > SoftwareApplication > WebApplication
# see : https://schema.org/WebAPI and https://schema.org/WebApplication
crosswalk = {
# required openminds keys for WebServiceVersion
"accessibility": None, # constant: FREE_ACCESS
"fullDocumentation": "documentation", # from WebAPI
"releaseDate":"dateModified", # from CreativeWork # should it be datePublished?
"shortName": "alternateName", # might be different between WebService and WebServiceVersion? # from Thing
"versionIdentifier": "version", # could also be "softwareVersion" from SoftwareApplication, but
# "version" from CreativeWork was chosen for coherence with the codemeta crosswalk
"versionInnovation": "releaseNotes", # from SoftwareApplication
# optional keys
"copyright": ["copyrightHolder", "copyrightYear"], # openminds Copyright needs both holder and year, which
# are separate WebApplication properties.
"custodian": None, # "broker" property from Service might fit?
"description": "description", # from Thing
"developer": "author", # from CreativeWork
"fullName": "name", # or maybe "alternateName" from Thing
# or None
"funding": "funding", # "funding" from SoftwareApplication expects a Grant, which provides
# a "funder" property. The "identifier", "name" and "description" properties could be used
# for "awardNumber", "awardName" and "acknowledgements" respectively.
"hasPart": "hasPart", # not sure how to handle this one, openminds expects a SoftwareVersion array and WebApplication
# expects a CreativeWork. We could use names to link exising SoftwareVersion instances.
"homepage":"url", # from Thing
"howToCite": None,
"inputFormat": None,
"isAlternativeVersionOf": "isSimilarTo", # doesn't totally fit, "similar to" does not necessarily imply "alternative to" # from Thing
"isNewVersionOf": None,
"keyword": None, # difficult to implement because we need OM terms
"otherContribution": "contributor", # from CreativeWork
"outputFormat": "serviceOutput", # from Service, expects Things. We just need a name matching an existing ContentType
"relatedPublication": "citation", # from CreativeWork
"repository": "downloadUrl", # from SoftwareApplication
"supportChannel": "softwareHelp", # from SoftwareApplication
}