-
Notifications
You must be signed in to change notification settings - Fork 2
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
metadata-added-provenance #730
base: dtq-dev
Are you sure you want to change the base?
Conversation
Problem: the page is loading data from cache? |
dspace-api/src/main/java/org/dspace/app/bulkaccesscontrol/BulkAccessControl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/app/bulkaccesscontrol/BulkAccessControl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/app/bulkaccesscontrol/BulkAccessControl.java
Outdated
Show resolved
Hide resolved
dspace-server-webapp/src/main/java/org/dspace/app/rest/BundleUploadBitstreamController.java
Outdated
Show resolved
Hide resolved
dspace-server-webapp/src/main/java/org/dspace/app/rest/BundleUploadBitstreamController.java
Outdated
Show resolved
Hide resolved
...in/java/org/dspace/app/rest/repository/patch/operation/DSpaceObjectMetadataAddOperation.java
Outdated
Show resolved
Hide resolved
...java/org/dspace/app/rest/repository/patch/operation/DSpaceObjectMetadataRemoveOperation.java
Outdated
Show resolved
Hide resolved
...java/org/dspace/app/rest/repository/patch/operation/DSpaceObjectMetadataRemoveOperation.java
Outdated
Show resolved
Hide resolved
...ava/org/dspace/app/rest/repository/patch/operation/DSpaceObjectMetadataReplaceOperation.java
Outdated
Show resolved
Hide resolved
...in/java/org/dspace/app/rest/repository/patch/operation/ItemDiscoverableReplaceOperation.java
Outdated
Show resolved
Hide resolved
Checks are not green |
import org.dspace.content.MetadataField; | ||
|
||
/** | ||
* Interface for providing provenance messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with email dspace@dataquest.sk
import org.dspace.content.factory.ContentServiceFactory; | ||
import org.dspace.content.service.InstallItemService; | ||
import org.dspace.eperson.EPerson; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc + athor
} | ||
messageTemplates = mapper.readValue(inputStream, Map.class); | ||
} catch (IOException e) { | ||
throw new RuntimeException("Failed to load message templates", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add log
ObjectMapper mapper = new ObjectMapper(); | ||
try (InputStream inputStream = getClass().getResourceAsStream(PROVENANCE_MSG_JSON)) { | ||
if (inputStream == null) { | ||
throw new RuntimeException("Failed to find message templates file"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add log
import org.dspace.content.MetadataField; | ||
import org.dspace.content.MetadataValue; | ||
|
||
public interface ProvenanceService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add doc + author
public void setBitstreamPolicies(Context context, Bitstream bitstream, Item item, | ||
BulkAccessControlInput accessControl) throws SQLException, AuthorizeException { | ||
String accConditionsStr = extractAccessConditions(accessControl.getBitstream().getAccessConditions()); | ||
if (!accConditionsStr.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
@Override | ||
public void deleteBitstream(Context context,Bitstream bitstream) throws SQLException, AuthorizeException { | ||
Item item = getItem(context, bitstream); | ||
if (!Objects.isNull(item)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonNull
if (dso.getType() == Constants.BITSTREAM) { | ||
Bitstream bitstream = (Bitstream) dso; | ||
Item item = getItem(context, bitstream); | ||
if (!Objects.isNull(item)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
try { | ||
provenanceService.uploadBitstream(context, bundle); | ||
} catch (SQLException ex) { | ||
throw new RuntimeException("SQLException in BundleUploadBitstreamConverter.uploadBitstream when " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add log
} catch (SQLException e) { | ||
throw new DSpaceBadRequestException("SQLException in DspaceObjectMetadataAddOperation.add trying to add " + | ||
"metadata to dso.", e); | ||
} catch (AuthorizeException e) { | ||
throw new DSpaceBadRequestException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it to another files too
Problem description
After adding, deleting, or editing the metadata of an item, a new record should be created in the metadata as dc.description.provenance.