001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/model/spatialschema/MultiPoint.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>Point</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 MultiPoint extends MultiPrimitive {
052        /**
053         * @link aggregation
054         * @clientCardinality 0..*
055         */
056    
057        /**
058         * adds a Point to the aggregation
059         *
060         * @param point
061         */
062        public void addPoint( Point point );
063    
064        /**
065         * inserts a Point into the aggregation. all elements with an index equal or larger index will be moved. if index is
066         * larger then getSize() - 1 or smaller then 0 or point equals null an exception will be thrown.
067         *
068         * @param point
069         *            Point to insert.
070         * @param index
071         *            position where to insert the new Point
072         * @throws GeometryException
073         */
074        public void insertPointAt( Point point, int index )
075                                throws GeometryException;
076    
077        /**
078         * sets the submitted Point at the submitted index. the element at the position <code>index</code> will be
079         * removed. if index is larger then getSize() - 1 or smaller then 0 or point equals null an exception will be
080         * thrown.
081         *
082         * @param point
083         *            Point to set.
084         * @param index
085         *            position where to set the new Point
086         * @throws GeometryException
087         */
088        public void setPointAt( Point point, int index )
089                                throws GeometryException;
090    
091        /**
092         * removes the submitted Point from the aggregation
093         *
094         * @param point
095         *            to remove
096         *
097         * @return the removed Point
098         */
099        public Point removePoint( Point point );
100    
101        /**
102         * removes the Point at the submitted index from the aggregation. if index is larger then getSize() - 1 or smaller
103         * then 0 an exception will be thrown.
104         *
105         * @param index
106         *
107         * @return the removed Point
108         * @throws GeometryException
109         */
110        public Point removePointAt( int index )
111                                throws GeometryException;
112    
113        /**
114         * returns the Point at the submitted index.
115         *
116         * @param index
117         * @return the Point at the submitted index.
118         */
119        public Point getPointAt( int index );
120    
121        /**
122         * returns all Points as array
123         *
124         * @return all Points as array
125         */
126        public Point[] getAllPoints();
127    
128    }