Skip to content

Commit

Permalink
Merge pull request #827 from aaxelb/feature/6190-more-osfmap-shorthand
Browse files Browse the repository at this point in the history
[ENG-6190] add to (and improve) osfmap-json shorthand
  • Loading branch information
aaxelb authored Oct 25, 2024
2 parents 4fb6ed8 + e726600 commit ed13c34
Show file tree
Hide file tree
Showing 7 changed files with 631 additions and 19 deletions.
1 change: 1 addition & 0 deletions tests/trove/derive/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


class BaseIndexcardDeriverTest(TestCase):
maxDiff = None

#######
# implement these things:
Expand Down
7 changes: 6 additions & 1 deletion tests/trove/derive/_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
OSFMAP,
FOAF,
OWL,
PROV,
SHAREv2,
)

Expand Down Expand Up @@ -40,7 +41,7 @@ class DeriverTestDoc:
BLARG.my_project: {
RDF.type: {BLARG.Item, OSFMAP.Project},
DCTERMS.title: {rdf.literal('title', language='en')},
DCTERMS.creator: {BLARG.ME},
DCTERMS.creator: {BLARG.me},
DCTERMS.created: {rdf.literal('2024-02-14')},
},
BLARG.me: {
Expand Down Expand Up @@ -166,6 +167,10 @@ class DeriverTestDoc:
OSFMAP.contains: {'https://osf.example/2ph9b'},
OSFMAP.hostingInstitution: {'https://cos.example/'},
OSFMAP.keyword: {rdf.literal('Demo'), rdf.literal('IA'), rdf.literal('IMLS'), rdf.literal('OSF')},
PROV.qualifiedAttribution: {rdf.blanknode({
DCAT.hadRole: {OSFMAP['admin-contributor']},
PROV.agent: {'https://osf.example/bhcjn'},
})},
},
'https://osf.example/2ph9b': {
RDF.type: {OSFMAP.File},
Expand Down
1 change: 1 addition & 0 deletions tests/trove/derive/test_oaidcxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TestOaiDcXmlDeriver(BaseIndexcardDeriverTest):
'blarg-project': (
'<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">'
'<dc:title xml:lang="en">title</dc:title>'
'<dc:creator>me me</dc:creator>'
'<dc:date>2024-02-14T00:00:00Z</dc:date>'
'<dc:type>Project</dc:type>'
'</oai_dc:dc>'
Expand Down
Loading

0 comments on commit ed13c34

Please sign in to comment.