001/* 002 * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 * 017 * $Id$ 018 * 019 */ 020package org.nuxeo.ecm.platform.pictures.tiles.api; 021 022import java.io.IOException; 023import java.util.Map; 024 025import org.nuxeo.ecm.core.api.Blob; 026import org.nuxeo.ecm.platform.picture.api.ImageInfo; 027 028/** 029 * Interface for a collection of Tiles in a given format. Wraps underlying calls to the TilingService 030 * 031 * @author tiry 032 */ 033public interface PictureTiles { 034 035 Map<String, String> getInfo(); 036 037 String getTilesPath(); 038 039 Blob getTile(int x, int y) throws IOException; 040 041 float getZoomfactor(); 042 043 int getXTiles(); 044 045 int getYTiles(); 046 047 void release(); 048 049 int getTilesHeight(); 050 051 int getTilesWidth(); 052 053 int getMaxTiles(); 054 055 String getCacheKey(); 056 057 void setCacheKey(String cacheKey); 058 059 ImageInfo getSourceImageInfo(); 060 061 void setSourceImageInfo(ImageInfo imageInfo); 062 063 ImageInfo getOriginalImageInfo(); 064 065 void setOriginalImageInfo(ImageInfo imageInfo); 066 067 String getTileFormatCacheKey(); 068 069 boolean isTileComputed(int x, int y); 070 071}