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

Support of metadata as an XML-file #13

Open
vkush opened this issue Nov 6, 2018 · 0 comments
Open

Support of metadata as an XML-file #13

vkush opened this issue Nov 6, 2018 · 0 comments

Comments

@vkush
Copy link
Member

vkush commented Nov 6, 2018

Add to exportElement method and test it with DV/DS:

case REPLACE:
				if (deposit.getEntryPart() != null) {
					// Use "replace" method for EntryPart (metadata as a Map)
					SwordResponse response = swordClient.replace(collectionURL, deposit, authCredentials);
					return response;
				} else {
					// Use "replace" for Media (metadata as a XML-file)
					// TODO: create issue for SWORD-Client to consider the header "In-Progress:
					// true" for "replaceMedia()" method
					// -> https://github.com/swordapp/JavaClient2.0/issues
					//
					// Code area, file "org.swordapp.client.SWORDClient.java", lines 464-468:
					//
					// // add the headers specific to a binary only deposit
					// http.addContentDisposition(options, deposit.getFilename());
					// http.addContentMd5(options, deposit.getMd5());
					// http.addPackaging(options, deposit.getPackaging());
					// http.addMetadataRelevant(options, deposit.isMetadataRelevant());
					//
					// Add new line:
					// http.addInProgress(options, deposit.isInProgress());
					//
					SwordResponse response = swordClient.replaceMedia(collectionURL, deposit, authCredentials);
					return response;
				}

If works for DS/DV -> create issue in Java SWORDClient, see comments inside the code above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant