All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.digitalcollections.iiif.presentation.model.impl.v2.CollectionImpl Maven / Gradle / Ivy

The newest version!
package de.digitalcollections.iiif.presentation.model.impl.v2;

import de.digitalcollections.iiif.presentation.model.api.v2.Collection;
import de.digitalcollections.iiif.presentation.model.api.v2.Metadata;
import de.digitalcollections.iiif.presentation.model.api.v2.PropertyValue;
import de.digitalcollections.iiif.presentation.model.api.v2.Thumbnail;
import de.digitalcollections.iiif.presentation.model.api.v2.references.CollectionReference;
import de.digitalcollections.iiif.presentation.model.api.v2.references.ManifestReference;
import java.net.URI;
import java.time.Instant;
import java.util.List;

public class CollectionImpl extends AbstractIiifResourceImpl implements Collection {

  private final String context = "http://iiif.io/api/presentation/2/context.json";
  private PropertyValue description; // recommended
  private PropertyValue label; // required
  private List metadata; // recommended
  private List subCollections;
  private List manifests;
  private Thumbnail thumbnail; // recommended
  private String viewingHint; // optional
  private Instant navDate; // optional

  public CollectionImpl() {
  }

  public CollectionImpl(URI id, PropertyValue label, List metadata) {
    assert id != null;
    assert label != null;

    this.id = id;
    this.label = label;

    this.metadata = metadata;

    type = "sc:Collection";
  }

  @Override
  public String getContext() {
    return context;
  }

  @Override
  public PropertyValue getDescription() {
    return description;
  }

  @Override
  public void setDescription(PropertyValue description) {
    this.description = description;
  }

  @Override
  public PropertyValue getLabel() {
    return label;
  }

  @Override
  public List getMetadata() {
    return metadata;
  }

  @Override
  public Thumbnail getThumbnail() {
    return thumbnail;
  }

  @Override
  public void setThumbnail(Thumbnail thumbnail) {
    this.thumbnail = thumbnail;
  }

  @Override
  public String getViewingHint() {
    return viewingHint;
  }

  @Override
  public void setViewingHint(String viewingHint) {
    this.viewingHint = viewingHint;
  }

  @Override
  public List getManifests() {
    return this.manifests;
  }

  @Override
  public void setManifests(List manifests) {
    this.manifests = manifests;
  }

  @Override
  public List getSubCollections() {
    return subCollections;
  }

  @Override
  public void setSubCollections(List collections) {
    this.subCollections = collections;
  }

  @Override
  public Instant getNavDate() {
    return navDate;
  }

  @Override
  public void setNavDate(Instant navDate) {
    this.navDate = navDate;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy