Skip to content

Commit

Permalink
Merge pull request #1846 from UNC-Libraries/revert-1845-zip-files-dev…
Browse files Browse the repository at this point in the history
…elopment-merge

Revert "Merge main into Zip files development"
  • Loading branch information
bbpennel authored Dec 3, 2024
2 parents a3f2ff2 + 6691fdc commit 69f3fa8
Show file tree
Hide file tree
Showing 27 changed files with 16,085 additions and 13,934 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ public List<SolrInputDocument> populate() {
newDoc.addField("ancestorIds", makeAncestorIds(pid1, pid2));
newDoc.addField("ancestorPath", makeAncestorPath(pid1, pid2));
newDoc.addField("resourceType", ResourceType.Work.name());
List<String> workDatastreams = Arrays.asList(
ORIGINAL_FILE.getId() + "|image/png|file.png|png|766|urn:sha1:checksum|" + pid6File.getId() + "|1200x1200",
DatastreamType.JP2_ACCESS_COPY.getId() + "|image/jp2|bunny.jp2|jp2|||" + pid6File.getId() + "|1200x1200");
newDoc.addField(SearchFieldKey.DATASTREAM.getSolrField(), workDatastreams);
imgDatastreams.set(0, imgDatastreams.get(0) + pid6File.getId());
imgDatastreams.set(1, imgDatastreams.get(1) + pid6File.getId());
newDoc.addField(SearchFieldKey.DATASTREAM.getSolrField(), imgDatastreams);
newDoc.addField(SearchFieldKey.FILE_FORMAT_CATEGORY.getSolrField(), ContentCategory.image.getDisplayName());
newDoc.addField(SearchFieldKey.FILE_FORMAT_TYPE.getSolrField(), "png");
docs.add(newDoc);
Expand All @@ -153,9 +152,6 @@ public List<SolrInputDocument> populate() {
newDoc.addField("ancestorIds", makeAncestorIds(pid1, pid3));
newDoc.addField("ancestorPath", makeAncestorPath(pid1));
newDoc.addField("resourceType", "Collection");
List<String> collection2Datastream = List.of(
DatastreamType.JP2_ACCESS_COPY.getId() + "|image/jp2|bunny.jp2|jp2|||" + pid2.getId() + "|120x120");
newDoc.addField(SearchFieldKey.DATASTREAM.getSolrField(), collection2Datastream);
docs.add(newDoc);

return docs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static String getImageServiceId(String id) {
* @return
*/
public static String getImageServerEncodedId(String id) {
return URLEncoder.encode(getImageServiceId(id), StandardCharsets.UTF_8);
return URLEncoder.encode(getImageServiceId(id));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public DatastreamImpl(String datastream) {

@Override
public String toString() {
//DS name|mimetype|filename|extension|filesize|checksum|owner|extent
//DS name|mimetype|extension|filesize|checksum|owner|extent
StringBuilder sb = new StringBuilder();
if (name != null) {
sb.append(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class ImageDerivativeProcessor implements Processor {

private static final Pattern MIMETYPE_PATTERN = Pattern.compile("^(image.*$|application.*?(photoshop|psd)$)");

private static final Pattern DISALLOWED_PATTERN =
Pattern.compile(".*(vnd\\.fpx|x-icon|x-raw-panasonic|vnd\\.microsoft\\.icon).*");
private static final Pattern DISALLOWED_PATTERN = Pattern.compile(".*(vnd\\.fpx|x-icon).*");

/**
* Returns true if the subject of the exchange is a binary which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public void process(Exchange exchange) throws IOException {
in.setHeader(CdrBinaryPath, storagePath.toString());
in.setHeader(CdrBinaryMimeType, mimetype);
in.setHeader(FCREPO_URI, repoPath);
// force access copy regeneration when importing a thumbnail
in.setHeader("force", "true");
}

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public void testImportThumbnail() throws IOException {
verify(message).setHeader(FCREPO_URI, pid.getRepositoryPath());
verify(message).setHeader(CdrBinaryMimeType, mimetype);
verify(message).setHeader(CdrBinaryPath, path.toString());
verify(message).setHeader("force", "true");
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion static/css/sass/cdr_ui_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ table.dataTable {
.restricted-access {
border: 1px solid;
border-radius: 5px;
padding: 15px;

.button {
text-align: left;
Expand Down Expand Up @@ -1091,7 +1092,6 @@ a.navbar-item:hover {
}
}


.relateditem {
margin-left: 5px;
margin-right: 5px;
Expand Down
Loading

0 comments on commit 69f3fa8

Please sign in to comment.