001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/model/spatialschema/MultiCurve.java $
002    /*----------------------------------------------------------------------------
003     This file is part of deegree, http://deegree.org/
004     Copyright (C) 2001-2009 by:
005       Department of Geography, University of Bonn
006     and
007       lat/lon GmbH
008    
009     This library is free software; you can redistribute it and/or modify it under
010     the terms of the GNU Lesser General Public License as published by the Free
011     Software Foundation; either version 2.1 of the License, or (at your option)
012     any later version.
013     This library is distributed in the hope that it will be useful, but WITHOUT
014     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
015     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
016     details.
017     You should have received a copy of the GNU Lesser General Public License
018     along with this library; if not, write to the Free Software Foundation, Inc.,
019     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020    
021     Contact information:
022    
023     lat/lon GmbH
024     Aennchenstr. 19, 53177 Bonn
025     Germany
026     http://lat-lon.de/
027    
028     Department of Geography, University of Bonn
029     Prof. Dr. Klaus Greve
030     Postfach 1147, 53001 Bonn
031     Germany
032     http://www.geographie.uni-bonn.de/deegree/
033    
034     e-mail: info@deegree.org
035    ----------------------------------------------------------------------------*/
036    
037    package org.deegree.model.spatialschema;
038    
039    /**
040     *
041     * The interface defines the access to a aggregations of <tt>Curve</tt> objects.
042     *
043     * <p>
044     * -----------------------------------------------------
045     * </p>
046     *
047     * @author Andreas Poth
048     * @version $Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
049     *          <p>
050     */
051    public interface MultiCurve extends MultiPrimitive {
052        /**
053         * adds a Curve to the aggregation
054         *
055         * @param curve
056         *            to add.
057         */
058        public void addCurve( Curve curve );
059    
060        /**
061         * inserts a Curve in the aggregation. all elements with an index equal or larger index will be moved. if index is
062         * larger then getSize() - 1 or smaller then 0 or curve equals null an exception will be thrown.
063         *
064         * @param curve
065         *            Curve to insert.
066         * @param index
067         *            position where to insert the new Curve
068         * @throws GeometryException
069         */
070        public void insertCurveAt( Curve curve, int index )
071                                throws GeometryException;
072    
073        /**
074         * sets the submitted Curve at the submitted index. the element at the position <code>index</code> will be
075         * removed. if index is larger then getSize() - 1 or smaller then 0 or curve equals null an exception will be
076         * thrown.
077         *
078         * @param curve
079         *            Curve to set.
080         * @param index
081         *            position where to set the new Curve
082         * @throws GeometryException
083         */
084        public void setCurveAt( Curve curve, int index )
085                                throws GeometryException;
086    
087        /**
088         * removes the submitted Curve from the aggregation
089         *
090         * @param curve
091         *
092         * @return the removed Curve
093         */
094        public Curve removeCurve( Curve curve );
095    
096        /**
097         * removes the Curve at the submitted index from the aggregation. if index is larger then getSize() - 1 or smaller
098         * then 0 an exception will be thrown.
099         *
100         * @param index
101         *
102         * @return the removed Curve
103         * @throws GeometryException
104         */
105        public Curve removeCurveAt( int index )
106                                throws GeometryException;
107    
108        /**
109         * @param index
110         * @return the Curve at the submitted index. if index is larger then getSize() - 1 or smaller then 0 an exception
111         *         will be thrown.
112         */
113        public Curve getCurveAt( int index );
114    
115        /**
116         * @return all Curves as array
117         */
118        public Curve[] getAllCurves();
119    
120    }