3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.cdm
.api
.service
;
14 import java
.util
.List
;
18 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
19 import eu
.etaxonomy
.cdm
.common
.mediaMetaData
.ImageMetaData
;
20 import eu
.etaxonomy
.cdm
.model
.description
.MediaKey
;
21 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
22 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
23 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
24 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
25 import eu
.etaxonomy
.cdm
.persistence
.dao
.BeanInitializer
;
26 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
28 public interface IMediaService
extends IIdentifiableEntityService
<Media
> {
31 * Return a List of MediaKeys, optionally filtered by the parameters passed.
33 * @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)
34 * @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)
35 * @param pageSize The maximum number of keys returned (can be null for all keys)
36 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
37 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link BeanInitializer#initialize(Object, List)}
38 * @return a Pager containing MediaKey instances
40 public Pager
<MediaKey
> getMediaKeys(Set
<Taxon
> taxonomicScope
, Set
<NamedArea
> geoScopes
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
43 * Return a Pager of rights belonging to this object
45 * @param t The media object
46 * @param pageSize The maximum number of rights returned (can be null for all rights)
47 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
48 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
49 * @return a Pager of Rights entities
51 public Pager
<Rights
> getRights(Media t
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
54 * Returns a Paged List of Media instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
56 * @param clazz filter the results by class (or pass null to return all Media instances)
58 * @param pageSize The maximum number of media returned (can be null for all matching media)
59 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
61 * Supports path like <code>orderHints.propertyNames</code> which
62 * include *-to-one properties like createdBy.username or
63 * authorTeam.persistentTitleCache
64 * @param propertyPaths properties to be initialized
65 * @return a Pager Media instances
66 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
68 public Pager
<Media
> search(Class
<?
extends Media
> clazz
, String queryString
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
77 public Integer
getImageSize(URI imageUri
, Integer timeOut
);
85 public ImageMetaData
getImageInfo(URI imageUri
, Integer timeOut
);
93 public Map
<String
,String
> getImageMetaData(URI imageUri
, Integer timeOut
);