Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Nov 10, 2023
1 parent c36225d commit 4eccd4e
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions trove/vocab/addons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
from primitive_metadata import primitive_rdf as rdf
from trove.vocab.namespaces import (
DCAT,
DCTERMS,
FOAF,
RDF,
RDFS,
)


ADDONS = rdf.IriNamespace('https://addons.osf.io/vocab/2023/')

EXAMPLE_DATA = {
'http://foo.example/storage/checksum': {
RDF.type: {ADDONS.StorageProvider},
FOAF.name: {rdf.literal('checksum-keyed archive', language='en')},
DCTERMS.description: {rdf.literal('...')},
ADDONS.providesInterface: {
ADDONS.read_by_key,
ADDONS.write_by_key,
ADDONS.static_key,
ADDONS.bulk_download,
ADDONS.public_storage,
ADDONS.longterm_archive,
},
},
'http://foo.example/storage/dropbox': {
RDF.type: {ADDONS.StorageProvider},
FOAF.name: {rdf.literal('dropbox maybe', language='en')},
DCTERMS.description: {rdf.literal('...')},
ADDONS.providesInterface: {
ADDONS.read_by_key,
ADDONS.write_by_key,
ADDONS.copy_by_key,
ADDONS.path_key,
ADDONS.versioned_key,
ADDONS.bulk_download,
ADDONS.public_storage,
ADDONS.custom_root_path,
},
ADDONS.maxConcurrentDownloads: {rdf.literal(42)},
ADDONS.maxUploadMB: {rdf.literal(150)},
ADDONS.icon: {'http://foo.example/storage/dropbox/icon.svg'},
# ...
},
'http://foo.example/authorized/aoeu': {
RDF.type: {ADDONS.AuthorizedStorage},
DCTERMS.creator: {'https://osf.io/blarg'},
DCAT.accessService: {'http://foo.example/addon/checksum'},
ADDONS.externalAccount: {'http://foo.example/account/aoeu'},
# auth stuff...
},
'http://foo.example/connected/snth': {
RDF.type: {ADDONS.ConnectedStorage},
ADDONS.authorizedStorage: {'http://foo.example/authorized/aoeu'},
ADDONS.authorizedResource: {'https://osf.io/prjct'},
ADDONS.rootPath: {rdf.Literal('/my/root')},
},
}

ADDONS_VOCAB = {
ADDONS.ExternalAccount: {
RDF.type: {RDFS.Class}
},
ADDONS.providesInterface: {
RDF.type: {RDF.Property}
},
ADDONS.read_by_key: {
RDF.type: {ADDONS.Interface}
},
ADDONS.write_by_key: {
RDF.type: {ADDONS.Interface}
},
ADDONS.static_key: {
RDF.type: {ADDONS.Interface}
},
ADDONS.path_key: {
RDF.type: {ADDONS.Interface}
},
ADDONS.StorageProvider: {
RDF.type: {RDFS.Class, ADDONS.Category},
},
}

0 comments on commit 4eccd4e

Please sign in to comment.