\r
package eu.etaxonomy.cdm.api.service;\r
\r
-import java.util.Collection;\r
+import java.io.IOException;\r
+import java.net.URI;\r
import java.util.List;\r
import java.util.Map;\r
import java.util.Set;\r
-import java.util.UUID;\r
+\r
+import org.apache.http.HttpException;\r
\r
import eu.etaxonomy.cdm.api.service.pager.Pager;\r
-import eu.etaxonomy.cdm.model.description.IdentificationKey;\r
+import eu.etaxonomy.cdm.common.mediaMetaData.ImageMetaData;\r
+import eu.etaxonomy.cdm.model.description.MediaKey;\r
import eu.etaxonomy.cdm.model.location.NamedArea;\r
import eu.etaxonomy.cdm.model.media.Media;\r
-import eu.etaxonomy.cdm.model.media.MediaRepresentation;\r
-import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;\r
import eu.etaxonomy.cdm.model.media.Rights;\r
import eu.etaxonomy.cdm.model.taxon.Taxon;\r
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;\r
import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
\r
-public interface IMediaService extends IAnnotatableService<Media> {\r
-\r
- // FIXME candidate for harmonization?\r
- public abstract Map<UUID, Media> saveMediaAll(Collection<Media> mediaCollection);\r
- \r
- // FIXME candidate for harmonization?\r
- public abstract List<Media> getAllMedia(int limit, int start);\r
+public interface IMediaService extends IIdentifiableEntityService<Media> {\r
\r
- public abstract List<MediaRepresentation> getAllMediaRepresentations(int limit, int start);\r
-\r
- public abstract List<MediaRepresentationPart> getAllMediaRepresentationParts(int limit, int start);\r
- \r
/**\r
- * Return a List of IdentificationKeys, optionally filtered by the parameters passed.\r
+ * Return a List of MediaKeys, optionally filtered by the parameters passed.\r
* \r
* @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)\r
* @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)\r
* @param pageSize The maximum number of keys returned (can be null for all keys)\r
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link BeanInitializer#initialize(Object, List)}\r
- * @return a Pager containing IdentificationKey instances\r
+ * @return a Pager containing MediaKey instances\r
*/\r
- public Pager<IdentificationKey> getIdentificationKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
+ public Pager<MediaKey> getMediaKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
\r
/**\r
* Return a Pager of rights belonging to this object\r
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>\r
*/\r
public Pager<Media> search(Class<? extends Media> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param imageUri\r
+ * @param timeOut\r
+ * @return\r
+ */\r
+ public Integer getImageSize(URI imageUri, Integer timeOut);\r
+ \r
+ /**\r
+ * \r
+ * @param imageUri\r
+ * @param timeOut\r
+ * @return\r
+ * @throws IOException \r
+ */\r
+ public ImageMetaData getImageInfo(URI imageUri, Integer timeOut) throws IOException, HttpException;\r
+ \r
+ /**\r
+ * \r
+ * @param imageUri\r
+ * @param timeOut\r
+ * @return\r
+ * @throws IOException \r
+ */\r
+ public Map<String,String> getImageMetaData(URI imageUri, Integer timeOut) throws IOException, HttpException;\r
}\r