public static final String HANDSHRIFT_TYPE = "Handschrift"; public static final String METS_PARENT_LOGICAL_ID = "LOG_0000"; public static String getCollection(final MetsData mets) {
    return mets.getCollection().orElse("").trim();
} public static String getDateCreated(final MetsData mets) {
    return mets.getDateCreated().orElse("").trim();
} public static String getDimension(final MetsData mets) {
    return mets.getDimension().orElse("").trim();
} public static String getExtent(final MetsData mets) {
    return mets.getExtent().orElse("").trim();
} public static String getLanguageDescription(final MetsData mets) {
    return mets.getLanguageDescription().orElse("").trim();
} public static String getLocation(final MetsData mets) {
    return mets.getLocation().orElse("").trim();
} public static String getLogicalType(final MetsData mets, final String id) {
    return mets.getLogicalType(id).orElse("multivolume_work");
} public static String getManifestTitle(final MetsData mets) {
    return mets.getManifestTitle().orElse("").trim();
} public static String getManuscriptIdByType(final MetsData mets, final String idType) {
    return mets.getManuscriptIdByType(idType).orElse("").trim();
} public static String getMaterial(final MetsData mets) {
    return mets.getMaterial().orElse("").trim();
} public static String getRecordIdentifier(final MetsData mets) {
    return mets.getRecordIdentifier().orElse("").trim();
} static String getSubtitle(final MetsData mets) {
    return mets.getSubtitle().orElse("").trim();
} @JsonPropertyOrder({"label", "value"})
public class TemplateMetadata {

    @JsonProperty("label")
    private String label;

    @JsonProperty("value")
    private String value;

    /**
     * @param label String
     * @param value String
     */
    public TemplateMetadata(final String label, final String value) {
        this.label = label;
        this.value = value;
    }

    /**
     * @return String
     */
    @JsonIgnore
    public String getLabel() {
        return this.label;
    }

    /**
     * @return String
     */
    @JsonIgnore
    public String getValue() {
        return this.value;
    }
}
import static de.ubleipzig.iiifproducer.doc.MetsConstants.HANDSHRIFT_TYPE;
import static de.ubleipzig.iiifproducer.doc.MetsConstants.METS_PARENT_LOGICAL_ID;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getCollection;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getDateCreated;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getDimension;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getExtent;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getLanguageDescription;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getLocation;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getLogicalType;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getManifestTitle;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getManuscriptIdByType;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getMaterial;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getRecordIdentifier;
import static de.ubleipzig.iiifproducer.doc.MetsManifestBuilder.getSubtitle;
import static org.slf4j.LoggerFactory.getLogger;
import de.ubleipzig.iiifproducer.template.TemplateMetadata;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
/*
 * IIIFProducer
 * Copyright (C) 2017 Leipzig University Library <info@ub.uni-leipzig.de>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

package de.ubleipzig.iiifproducer.doc;





/**
 * ManuscriptMetadata.
 *
 * @author christopher-johnson
 */
public class ManuscriptMetadata {

    private static Logger logger = getLogger(ManuscriptMetadata.class);

    private MetsData mets;

    /**
     * @param mets MetsData
     */
    public ManuscriptMetadata(final MetsData mets) {
        this.mets = mets;
    }

    /**
     * @return List
     */
    public List<TemplateMetadata> getInfo() {

        final List<TemplateMetadata> meta = new ArrayList<>();
        meta.add(new TemplateMetadata("Titel (aus Signatur)", getManifestTitle(mets)));
        meta.add(new TemplateMetadata("Objekttitel", getSubtitle(mets)));
        meta.add(new TemplateMetadata("Collection", getCollection(mets)));
        meta.add(new TemplateMetadata("Medium", HANDSHRIFT_TYPE));