Minor refactor manifest generator

This commit is contained in:
Michael Spalti
2021-03-26 16:37:45 -07:00
parent 78c66f3fed
commit c39bd6c7c2

View File

@@ -56,13 +56,13 @@ public class ManifestGenerator implements IIIFResource {
private List<Range> ranges = new ArrayList<>(); private List<Range> ranges = new ArrayList<>();
@Autowired @Autowired
org.dspace.app.rest.iiif.model.generator.PropertyValueGenerator propertyValue; PropertyValueGenerator propertyValue;
@Autowired @Autowired
org.dspace.app.rest.iiif.model.generator.MetadataEntryGenerator metadataEntry; MetadataEntryGenerator metadataEntryGenerator;
@Autowired @Autowired
BehaviorGenerator behaviorFascade; BehaviorGenerator behaviorGenerator;
/** /**
* Sets the mandatory Manifest ID. * Sets the mandatory Manifest ID.
@@ -86,8 +86,8 @@ public class ManifestGenerator implements IIIFResource {
* @param viewingHint * @param viewingHint
*/ */
public void addViewingHint(String viewingHint) { public void addViewingHint(String viewingHint) {
behaviorFascade.setType(viewingHint); behaviorGenerator.setType(viewingHint);
this.viewingHint = behaviorFascade.getValue(); this.viewingHint = behaviorGenerator.getValue();
} }
/** /**
@@ -137,9 +137,9 @@ public class ManifestGenerator implements IIIFResource {
* @param value * @param value
*/ */
public void addMetadata(String field, String value) { public void addMetadata(String field, String value) {
metadataEntry.setField(field); metadataEntryGenerator.setField(field);
metadataEntry.setValue(value); metadataEntryGenerator.setValue(value);
metadata.add(metadataEntry.getValue()); metadata.add(metadataEntryGenerator.getValue());
} }
/** /**