Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iqss/6497 semantic api #7414

Merged
Merged
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
4d70971
initial semantic API endpoint
qqmyers Mar 23, 2020
b2befca
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497
qqmyers Mar 23, 2020
fb6421b
merge new fields with existing ones
qqmyers Mar 24, 2020
8bc3df6
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497
qqmyers Mar 27, 2020
5b828aa
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497
qqmyers Apr 17, 2020
f472b6c
differences from IQSS/develop that break compilation
qqmyers Apr 17, 2020
bab11f0
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Aug 31, 2020
d305867
Add jsonld lib to compact to local context
qqmyers Sep 8, 2020
98d978e
use expand/compact, refactor, add :startmigration endpoint
qqmyers Sep 11, 2020
2443702
try fix for parse error
qqmyers Sep 16, 2020
d442643
log value
qqmyers Sep 16, 2020
fdeac97
return dataset
qqmyers Sep 16, 2020
554e620
manage versionState, add debug output
qqmyers Sep 17, 2020
bee7731
move debug ore generation after configuring dataset
qqmyers Sep 17, 2020
f4cecd3
set versionstate, simplify, move terms init outside loop
qqmyers Sep 17, 2020
a4189de
parse version number
qqmyers Sep 17, 2020
e0de1db
fix toStrings
qqmyers Sep 17, 2020
928a88e
debug null pointer in DataverseFieldTypeInputLevel
qqmyers Sep 17, 2020
b78aed1
add support for fields with their own formal URI
qqmyers Sep 17, 2020
3a47630
allow non-published to support debugging and future use
qqmyers Sep 17, 2020
3f8534b
refactor, use expanded version directly
qqmyers Sep 18, 2020
64af0e8
add modification time
qqmyers Sep 18, 2020
04ee08a
expanded has array with 1 val - handle it
qqmyers Sep 18, 2020
c7c2573
log compound values to start
qqmyers Sep 18, 2020
fc77f92
compact with no context for decontextualize
qqmyers Sep 18, 2020
e287644
handle appending and compound fields
qqmyers Sep 18, 2020
8596ac8
sort compound field children by display order
qqmyers Sep 20, 2020
ffbc05a
parse date/time correctly
qqmyers Sep 22, 2020
0226b0d
Revert "sort compound field children by display order"
qqmyers Sep 22, 2020
fad62f4
typo
qqmyers Sep 22, 2020
c6b19a9
now use Uri instead of label when matching terms
qqmyers Sep 22, 2020
a014fc4
set dsfield of dsfvalue
qqmyers Sep 22, 2020
5bb5e68
additional debug, always set display order
qqmyers Sep 23, 2020
6a47fad
generate URIs for child types to match current ore maps
qqmyers Sep 23, 2020
f34da09
allow oremap to work w/o modified date for debug
qqmyers Sep 23, 2020
6b8bbc7
null check on date itself
qqmyers Sep 23, 2020
8af0938
fix compound value iteration
qqmyers Sep 23, 2020
7904844
fix ttype map for terms with no uri - use title not name
qqmyers Sep 23, 2020
e4ceee3
handle date format variations, including DV internal ones
qqmyers Sep 23, 2020
f176387
and the format in current published bags
qqmyers Sep 23, 2020
2724d9e
initial endpoint to release a migrated dataset
qqmyers Sep 24, 2020
7d5006d
create metadataOnOrig field
qqmyers Sep 24, 2020
925070b
add metadataOnOrig to solr
qqmyers Sep 24, 2020
005db97
use Finalize Publication command
qqmyers Sep 24, 2020
f336cfd
add debug, allow more details in 400 responses
qqmyers Sep 24, 2020
0de70dd
fix date-time issue
qqmyers Sep 24, 2020
395bb71
typos
qqmyers Sep 25, 2020
61c0349
create transfer bag type with orig files
qqmyers Sep 25, 2020
1753257
missing tab
qqmyers Sep 30, 2020
e642c65
add type param
qqmyers Sep 30, 2020
df66f22
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Oct 6, 2020
3445daa
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Nov 16, 2020
2e1d914
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Nov 16, 2020
9ad779a
add semantic metadata api call only
qqmyers Nov 16, 2020
8abd55e
remove OREMap parameter
qqmyers Dec 1, 2020
1a35ed2
fix error handling
qqmyers Dec 1, 2020
7b1512e
append to current terms
qqmyers Dec 1, 2020
e5b54df
add replace param
qqmyers Dec 1, 2020
578790f
handle append on terms - fix cut/paste errors
qqmyers Dec 2, 2020
acee4df
fix logic
qqmyers Dec 2, 2020
9185126
specify default
qqmyers Dec 2, 2020
e8698dc
make replace still append for multiple val fields
qqmyers Dec 2, 2020
901efe8
add migrating switch
qqmyers Dec 2, 2020
34a28a3
expose uri in datasetField api
qqmyers Dec 3, 2020
1b98b2c
track defined namespaces
qqmyers Dec 3, 2020
55a8b30
define equals, avoid duplicates in list
qqmyers Dec 3, 2020
966394a
replace string with const
qqmyers Dec 4, 2020
b83f7b2
constant for CC0_URI
qqmyers Dec 4, 2020
1e08f10
GET/DELETE endpoints
qqmyers Dec 4, 2020
780630f
7130-handle missing contact name
qqmyers Dec 8, 2020
cc7e69c
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Dec 8, 2020
e0ea36e
Fix multiple description logic for info file
qqmyers Dec 11, 2020
6d0c615
put is always for :draft version
qqmyers Dec 11, 2020
51f8f78
don't cast to String[]
qqmyers Dec 11, 2020
353644a
add more logging
qqmyers Dec 11, 2020
2382fef
handle unpublished versions
qqmyers Dec 11, 2020
243769a
add method that can return JsonObjectBuilder
qqmyers Dec 11, 2020
9bfa7c3
log details on failure
qqmyers Dec 11, 2020
60f8a99
multiple updates/fixes, added logging
qqmyers Dec 11, 2020
464832a
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Dec 22, 2020
e931149
fix terms retrieval
qqmyers Dec 22, 2020
2b8189a
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jan 8, 2021
e8f737c
date test fixes for locale
qqmyers Jan 13, 2021
1c93260
Java 11 update and test fixes inc. for different exception mesg
qqmyers Jan 13, 2021
a85c1d6
update pom for v11 and running tests under 11
qqmyers Jan 14, 2021
1476a61
Merge branch 'iqssdevelop' into IQSS/6497-semantic_api
qqmyers Jan 14, 2021
a52353b
fix for edu.harvard.iq.dataverse.api.AdminIT test fail in Java 11
qqmyers Jan 14, 2021
6f405ab
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jan 29, 2021
e866ae0
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Feb 8, 2021
d5b8b45
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Feb 23, 2021
56acda8
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Apr 7, 2021
f19a199
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Apr 13, 2021
a7c6b3f
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Apr 26, 2021
33fb8de
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers May 20, 2021
87c581f
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jun 3, 2021
f47b268
update StringUtils package
qqmyers Jun 3, 2021
6d73b61
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jun 23, 2021
4714ea6
move metadataOnOrig out of citation block
qqmyers Jun 23, 2021
82a5b23
sync with migration api branch (tests, docs, bug fixes)
qqmyers Jun 30, 2021
10ef9ff
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jun 30, 2021
e159003
fix test
qqmyers Jul 2, 2021
cf8b2b5
Update doc/release-notes/6497-semantic-api.md
qqmyers Jul 2, 2021
d5ff955
Update doc/sphinx-guides/source/developers/dataset-semantic-metadata-…
qqmyers Jul 2, 2021
61627d1
add create example, remove solr schema copies file
qqmyers Jul 2, 2021
1d54c68
removed debug logging
qqmyers Jul 2, 2021
bc82180
Merge branch 'IQSS/6497-semantic_api' of https://github.com/GlobalDat…
qqmyers Jul 2, 2021
4c1d31a
missing header
qqmyers Jul 2, 2021
a5a745d
remove metadataOnOrig per review
qqmyers Jul 8, 2021
bd37e30
Merge remote-tracking branch 'IQSS/develop' into IQSS/6497-semantic_api
qqmyers Jul 8, 2021
0138ebb
add missing create method (in migrate PR)
qqmyers Jul 13, 2021
13a7841
No "@id" npe fix
qqmyers Jul 13, 2021
86a08e3
avoid npe in logging
qqmyers Jul 13, 2021
0c64c68
only require "@id" when migrating
qqmyers Jul 13, 2021
8e9f2f7
fix logging in create case
qqmyers Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set versionstate, simplify, move terms init outside loop
  • Loading branch information
qqmyers committed Sep 17, 2020

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit f4cecd3f39992c895a73bbdf5bd2396518b0ce2c
36 changes: 15 additions & 21 deletions src/main/java/edu/harvard/iq/dataverse/util/json/JSONLDUtil.java
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@ public static DatasetVersion updateDatasetVersionFromJsonLD(DatasetVersion dsv,
for (DatasetField dsf : dsfl) {
fieldByTypeMap.put(dsf.getDatasetFieldType(), dsf);
}
TermsOfUseAndAccess terms = new TermsOfUseAndAccess();
for (String key : jsonld.keySet()) {
if (!key.equals("@context")) {
if (dsftMap.containsKey(key)) {
@@ -208,44 +209,37 @@ public static DatasetVersion updateDatasetVersionFromJsonLD(DatasetVersion dsv,
// (JsonLDTerm.schemaOrg("dateModified").getLabel())

// Todo - handle non-CC0 licenses, without terms as an alternate field.
TermsOfUseAndAccess terms = new TermsOfUseAndAccess();
if (jsonld.containsKey(JsonLDTerm.schemaOrg("license").getLabel())) {
if(key.equals(JsonLDTerm.schemaOrg("datePublished").getLabel())) {
dsv.setVersionState(VersionState.RELEASED);
}

if (key.equals(JsonLDTerm.schemaOrg("license").getLabel())) {
if (jsonld.get(JsonLDTerm.schemaOrg("license").getLabel()).toString()
.equals("https://creativecommons.org/publicdomain/zero/1.0/")) {
terms.setLicense(TermsOfUseAndAccess.defaultLicense);
} else {
terms.setLicense(TermsOfUseAndAccess.License.NONE);
}
} else {
if (jsonld.containsKey(JsonLDTerm.termsOfUse.getLabel())) {
} else if(key.equals(JsonLDTerm.termsOfUse.getLabel())) {
terms.setTermsOfUse(jsonld.get(JsonLDTerm.termsOfUse.getLabel()).toString());
}
}
if (jsonld.containsKey(JsonLDTerm.confidentialityDeclaration.getLabel())) {
} else if (key.equals(JsonLDTerm.confidentialityDeclaration.getLabel())) {
terms.setConfidentialityDeclaration(
jsonld.getString(JsonLDTerm.confidentialityDeclaration.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.specialPermissions.getLabel())) {
} else if (key.equals(JsonLDTerm.specialPermissions.getLabel())) {
terms.setConfidentialityDeclaration(jsonld.getString(JsonLDTerm.specialPermissions.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.restrictions.getLabel())) {
} else if (key.equals(JsonLDTerm.restrictions.getLabel())) {
terms.setConfidentialityDeclaration(jsonld.getString(JsonLDTerm.restrictions.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.citationRequirements.getLabel())) {
} else if (key.equals(JsonLDTerm.citationRequirements.getLabel())) {
terms.setConfidentialityDeclaration(
jsonld.getString(JsonLDTerm.citationRequirements.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.depositorRequirements.getLabel())) {
} else if (key.equals(JsonLDTerm.depositorRequirements.getLabel())) {
terms.setConfidentialityDeclaration(
jsonld.getString(JsonLDTerm.depositorRequirements.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.conditions.getLabel())) {
} else if (key.equals(JsonLDTerm.conditions.getLabel())) {
terms.setConfidentialityDeclaration(jsonld.getString(JsonLDTerm.conditions.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.disclaimer.getLabel())) {
} else if (key.equals(JsonLDTerm.disclaimer.getLabel())) {
terms.setConfidentialityDeclaration(jsonld.getString(JsonLDTerm.disclaimer.getLabel()));
}
if (jsonld.containsKey(JsonLDTerm.fileTermsOfAccess.getLabel())) {
} else if (key.equals(JsonLDTerm.fileTermsOfAccess.getLabel())) {
JsonObject fAccessObject = jsonld.getJsonObject(JsonLDTerm.fileTermsOfAccess.getLabel());
if (fAccessObject.containsKey(JsonLDTerm.termsOfAccess.getLabel())) {
terms.setTermsOfAccess(fAccessObject.getString(JsonLDTerm.termsOfAccess.getLabel()));