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

org.daisy.streamline.api.details.FormatDetailsProviderService Maven / Gradle / Ivy

The newest version!
package org.daisy.streamline.api.details;

import java.util.List;
import java.util.Optional;

import org.daisy.streamline.api.media.FormatIdentifier;

/**
 * 

* Provides an interface for a FormatDetailsProvider service. The purpose of * this interface is to expose an implementation of a FormatDetailsProvider as * an OSGi service. *

* *

* To comply with this interface, an implementation must be thread safe and * address both the possibility that only a single instance is created and used * throughout and that new instances are created as desired. *

* * @author Joel Håkansson * */ public interface FormatDetailsProviderService { /** *

Gets format details for the specified identifier.

* *

Note that more than one definition may be available for any given * identifier. The behavior in this case is explicitly nondeterministic. * An implementation is free to select any available definition or even * to merge details from several definitions.

* * @param identifier the format identifier * @return an optional with the format details, or an empty optional if no * details could be provided. */ public Optional getDetails(FormatIdentifier identifier); /** *

Gets format details matching the specified file name extension.

* *

Note that the returned list may include several {@link FormatDetails} * having the same identifier.

* @param ext the file name extension * @return a list of matching format details */ public List findByExtension(String ext); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy