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

org.daisy.dotify.cli.pefinfo.DetailSet Maven / Gradle / Ivy

There is a newer version: 3.2.5
Show newest version
package org.daisy.dotify.cli.pefinfo;

import java.util.Arrays;
import java.util.Collection;

import org.daisy.dotify.cli.pefinfo.DublinCoreDetail.Elements;

public enum DetailSet {
	DEFAULT,
	EXTENDED,
	FULL;

	public Collection newDetailSet() {
		switch (this) {
			case DEFAULT:
				return Arrays.asList(
						new DublinCoreDetail(Elements.TITLE),
						new DublinCoreDetail(Elements.DESCRIPTION),
						new DublinCoreDetail(Elements.CREATOR), 
						new DimensionsDetail(),
						new VolumesDetail(),
						new PagesDetail()
						);
			case EXTENDED:
				return Arrays.asList(
						new DublinCoreDetail(Elements.IDENTIFIER),
						new DublinCoreDetail(Elements.TITLE),
						new DublinCoreDetail(Elements.DESCRIPTION),
						new DublinCoreDetail(Elements.CREATOR), 
						new DimensionsDetail(),
						new VolumesDetail(),
						new PagesDetail()
						);
			case FULL:
				return Arrays.asList(
						new URIDetail(),
						new DublinCoreDetail(Elements.TITLE),
						new DublinCoreDetail(Elements.DESCRIPTION),
						new DublinCoreDetail(Elements.CREATOR), 
						new DublinCoreDetail(Elements.IDENTIFIER),
						new DublinCoreDetail(Elements.SOURCE),
						new DublinCoreDetail(Elements.DATE),
						new DublinCoreDetail(Elements.LANGUAGE),
						new DublinCoreDetail(Elements.CONTRIBUTOR),
						new DublinCoreDetail(Elements.PUBLISHER),
						new DublinCoreDetail(Elements.COVERAGE),
						new DublinCoreDetail(Elements.RELATION),
						new DublinCoreDetail(Elements.RIGHTS),
						new DublinCoreDetail(Elements.SUBJECT),
						new DublinCoreDetail(Elements.TYPE),
						new DublinCoreDetail(Elements.FORMAT),
						new DimensionsDetail(),
						new VolumesDetail(),
						new PagesDetail()
						);
			default:
				throw new RuntimeException("Coding error.");
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy