001: //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/trunk/src/org/deegree/model/spatialschema/MultiSurface.java $
002: /*---------------- FILE HEADER ------------------------------------------
003:
004: This file is part of deegree.
005: Copyright (C) 2001-2008 by:
006: EXSE, Department of Geography, University of Bonn
007: http://www.giub.uni-bonn.de/deegree/
008: lat/lon GmbH
009: http://www.lat-lon.de
010:
011: This library is free software; you can redistribute it and/or
012: modify it under the terms of the GNU Lesser General Public
013: License as published by the Free Software Foundation; either
014: version 2.1 of the License, or (at your option) any later version.
015:
016: This library is distributed in the hope that it will be useful,
017: but WITHOUT ANY WARRANTY; without even the implied warranty of
018: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: Lesser General Public License for more details.
020:
021: You should have received a copy of the GNU Lesser General Public
022: License along with this library; if not, write to the Free Software
023: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024:
025: Contact:
026:
027: Andreas Poth
028: lat/lon GmbH
029: Aennchenstr. 19
030: 53115 Bonn
031: Germany
032: E-Mail: poth@lat-lon.de
033:
034: Prof. Dr. Klaus Greve
035: Department of Geography
036: University of Bonn
037: Meckenheimer Allee 166
038: 53115 Bonn
039: Germany
040: E-Mail: greve@giub.uni-bonn.de
041:
042:
043: ---------------------------------------------------------------------------*/
044:
045: package org.deegree.model.spatialschema;
046:
047: /**
048: *
049: * This Interface defines the Aggregation of Surfaces. The implementing class should capsulate a
050: * java.util.Vector or a comarative data structure.
051: *
052: * <p>
053: * -----------------------------------------------------
054: * </p>
055: *
056: * @author Andreas Poth
057: * @version $Revision: 9343 $ $Date: 2007-12-27 05:30:32 -0800 (Thu, 27 Dec 2007) $
058: * <p>
059: */
060:
061: public interface MultiSurface extends MultiPrimitive {
062:
063: /**
064: * adds an Surface to the aggregation
065: */
066: public void addSurface(Surface gms);
067:
068: /**
069: * inserts a Surface in the aggregation. all elements with an index equal or larger index will
070: * be moved. if index is larger then getSize() - 1 or smaller then 0 or gms equals null an
071: * exception will be thrown.
072: *
073: * @param gms
074: * Surface to insert.
075: * @param index
076: * position where to insert the new Surface
077: */
078: public void insertSurfaceAt(Surface gms, int index)
079: throws GeometryException;
080:
081: /**
082: * sets the submitted Surface at the submitted index. the element at the position
083: * <code>index</code> will be removed. if index is larger then getSize() - 1 or smaller then 0
084: * or gms equals null an exception will be thrown.
085: *
086: * @param gms
087: * Surface to set.
088: * @param index
089: * position where to set the new Surface
090: */
091: public void setSurfaceAt(Surface gms, int index)
092: throws GeometryException;
093:
094: /**
095: * removes the submitted Surface from the aggregation
096: *
097: * @return the removed Surface
098: */
099: public Surface removeSurface(Surface gms);
100:
101: /**
102: * removes the Surface at the submitted index from the aggregation. if index is larger then
103: * getSize() - 1 or smaller then 0 an exception will be thrown.
104: *
105: * @return the removed Surface
106: */
107: public Surface removeSurfaceAt(int index) throws GeometryException;
108:
109: /**
110: * returns the Surface at the submitted index.
111: */
112: public Surface getSurfaceAt(int index);
113:
114: /**
115: * returns all Surfaces as array
116: */
117: public Surface[] getAllSurfaces();
118:
119: /**
120: * returns the area of a MultiSurface
121: *
122: * @return the area of a MultiSurface
123: */
124: public double getArea();
125:
126: }
|