
eu.agrosense.client.grid.TemporaryGrid Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2008-2012 AgroSense Foundation.
*
* AgroSense is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* There are special exceptions to the terms and conditions of the GPLv3 as it is applied to
* this software, see the FLOSS License Exception
* .
*
* AgroSense is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AgroSense. If not, see .
*
* Contributors:
* Timon Veenstra - initial API and implementation and/or initial documentation
*/
package eu.agrosense.client.grid;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import nl.cloudfarming.client.model.AgroURI;
import org.opengis.geometry.BoundingBox;
/**
* Temporary grid, only to be used for display purposes.
* Methods only valid for non-temp grids like {@link Grid#getItemIdNumber() }
* will throw an IllegalStateException
*
*
* @author Timon Veenstra
*/
public class TemporaryGrid extends Grid{
private static final AgroURI AGRO_URI = new AgroURI("OTHER/0/FRM/1");
public TemporaryGrid(GridCellSize gridCellSize, Future boundingBoxFuture) {
super(AGRO_URI, gridCellSize, boundingBoxFuture);
}
public TemporaryGrid(GridCellSize gridCellSize, BoundingBox boundingBox) {
super(AGRO_URI, gridCellSize, boundingBox);
}
@Override
public String getItemIdNumber() {
throw new IllegalStateException("Not allowed to call getItemIdNumber on a TemporaryGrid");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy