Skip to content

Commit

Permalink
Merge pull request #286 from europeana/feat/MET-5798_Implement_media_…
Browse files Browse the repository at this point in the history
…processing_3d_links

Feat/MET-5798 Add result of 3D media processing in mongo and solr
  • Loading branch information
P-Ehlert committed Feb 29, 2024
2 parents 1bc5cfa + 14e1045 commit f9aa393
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package eu.europeana.corelib.definitions.edm.model.metainfo;

public interface ThreeDMetaInfo {

String getMimeType();

Long getFileSize();
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static WebResourceImpl generateWebResource(String about, String mimeType) {
ImageMetaInfoImpl imi = new ImageMetaInfoImpl();
imi.setMimeType(mimeType);

WebResourceMetaInfoImpl wrmi = new WebResourceMetaInfoImpl(null, imi, null, null, null);
WebResourceMetaInfoImpl wrmi = new WebResourceMetaInfoImpl(null, imi, null, null, null, null);

WebResourceImpl wr = new WebResourceImpl();
wr.setAbout(about);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package eu.europeana.corelib.edm.model.metainfo;

import com.fasterxml.jackson.annotation.JsonInclude;
import dev.morphia.annotations.Embedded;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Embedded(useDiscriminator = false)
public class ThreeDMetaInfoImpl implements eu.europeana.corelib.definitions.edm.model.metainfo.ThreeDMetaInfo{

/**
* An Internet media type is a standard identifier used on the
* Internet to indicate the type of data that a file contains.
*/
private String mimeType;

/**
* The size of the file in bytes.
*/
private Long fileSize;

public ThreeDMetaInfoImpl(String mimeType, Long fileSize) {
this.mimeType = mimeType;
this.fileSize = fileSize;
}

public ThreeDMetaInfoImpl() {
this.mimeType = null;
this.fileSize = null;
}

public String getMimeType() {
return mimeType;
}


public Long getFileSize() {
return fileSize;
}

public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}

public void setFileSize(Long fileSize) {
this.fileSize = fileSize;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,29 @@ public class WebResourceMetaInfoImpl implements eu.europeana.corelib.definitions
*/
private TextMetaInfoImpl textMetaInfo;

/**
* A class which contains information about a 3D document
*/
private ThreeDMetaInfoImpl threeDMetaInfo;

public WebResourceMetaInfoImpl() {
this.id = null;
this.imageMetaInfo = null;
this.audioMetaInfo = null;
this.videoMetaInfo = null;
this.textMetaInfo = null;
this.threeDMetaInfo = null;
}

public WebResourceMetaInfoImpl(final String recordID, final ImageMetaInfoImpl imageMetaInfo,
final AudioMetaInfoImpl audioMetaInfo, final VideoMetaInfoImpl videoMetaInfo, TextMetaInfoImpl textMetaInfo) {
final AudioMetaInfoImpl audioMetaInfo, final VideoMetaInfoImpl videoMetaInfo,
final TextMetaInfoImpl textMetaInfo, final ThreeDMetaInfoImpl threeDMetaInfo) {
this.id = recordID;
this.imageMetaInfo = imageMetaInfo;
this.audioMetaInfo = audioMetaInfo;
this.videoMetaInfo = videoMetaInfo;
this.textMetaInfo = textMetaInfo;
this.threeDMetaInfo = threeDMetaInfo;
}

public String getId() {
Expand All @@ -71,6 +79,10 @@ public TextMetaInfoImpl getTextMetaInfo() {
return textMetaInfo;
}

public ThreeDMetaInfoImpl getThreeDMetaInfo() {
return threeDMetaInfo;
}

public void setImageMetaInfo(ImageMetaInfoImpl imageMetaInfo) {
this.imageMetaInfo = imageMetaInfo;
}
Expand All @@ -86,4 +98,8 @@ public void setVideoMetaInfo(VideoMetaInfoImpl videoMetaInfo) {
public void setTextMetaInfo(TextMetaInfoImpl textMetaInfo) {
this.textMetaInfo = textMetaInfo;
}

public void setThreeDMetaInfo(ThreeDMetaInfoImpl threeDMetaInfo) {
this.threeDMetaInfo = threeDMetaInfo;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void testToRdfColorSpace() {
ImageMetaInfoImpl imageInfo = new ImageMetaInfoImpl();
imageInfo.setColorSpace(expected.xmlValue());

WebResourceMetaInfoImpl wrInfo = new WebResourceMetaInfoImpl("test color space", imageInfo, null, null, null);
WebResourceMetaInfoImpl wrInfo = new WebResourceMetaInfoImpl("test color space", imageInfo, null, null, null, null);

WebResourceImpl webResource = new WebResourceImpl();
webResource.setWebResourceMetaInfo(wrInfo);
Expand Down

0 comments on commit f9aa393

Please sign in to comment.