001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2004-2012 Open Geospatial Consortium, Inc.
006     *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007     *
008     *    Permission to use, copy, and modify this software and its documentation, with
009     *    or without modification, for any purpose and without fee or royalty is hereby
010     *    granted, provided that you include the following on ALL copies of the software
011     *    and documentation or portions thereof, including modifications, that you make:
012     *
013     *    1. The full text of this NOTICE in a location viewable to users of the
014     *       redistributed or derivative work.
015     *    2. Notice of any changes or modifications to the OGC files, including the
016     *       date changes were made.
017     *
018     *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019     *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020     *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021     *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022     *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023     *
024     *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025     *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026     *
027     *    The name and trademarks of copyright holders may NOT be used in advertising or
028     *    publicity pertaining to the software without specific, written prior permission.
029     *    Title to copyright in this software and any associated documentation will at all
030     *    times remain with copyright holders.
031     */
032    package org.opengis.geometry.primitive;
033    
034    import org.opengis.geometry.complex.CompositeSurface;
035    import org.opengis.annotation.Association;
036    import org.opengis.annotation.UML;
037    
038    import static org.opengis.annotation.Obligation.*;
039    import static org.opengis.annotation.Specification.*;
040    
041    
042    /**
043     * A surface and an orientation inherited from {@link OrientablePrimitive}. If the orientation is
044     * positive, then the {@code OrientableSurface} is a {@linkplain Surface surface}. If the
045     * orientation is negative, then the {@code OrientableSurface} is a reference to a
046     * {@linkplain Surface surface} with an upNormal that reverses the direction for this
047     * {@code OrientableSurface}, the sense of "the top of the surface".
048     *
049     * @version <A HREF="http://www.opengeospatial.org/standards/as">ISO 19107</A>
050     * @author Martin Desruisseaux (IRD)
051     * @since GeoAPI 1.0
052     */
053    @UML(identifier="GM_OrientableSurface", specification=ISO_19107)
054    public interface OrientableSurface extends OrientablePrimitive {
055        /**
056         * Returns the set of circular sequences of {@linkplain OrientableCurve orientable curve} that
057         * limit the extent of this {@code OrientableSurface}. These curves shall be organized
058         * into one circular sequence of curves for each boundary component of the
059         * {@code OrientableSurface}. In cases where "exterior" boundary is not
060         * well defined, all the rings of the {@linkplain SurfaceBoundary surface boundary}
061         * shall be listed as "interior".
062         *
063         * <blockquote><font size=2>
064         * <strong>NOTE:</strong> The concept of exterior boundary for a surface is really only
065         * valid in a 2-dimensional plane. A bounded cylinder has two boundary components, neither
066         * of which can logically be classified as its exterior. Thus, in 3 dimensions, there is no
067         * valid definition of exterior that covers all cases.
068         * </font></blockquote>
069         *
070         * @return The sets of positions on the boundary.
071         */
072        @UML(identifier="boundary", obligation=MANDATORY, specification=ISO_19107)
073        SurfaceBoundary getBoundary();
074    
075        /**
076         * Returns the primitive associated with this {@code OrientableSurface}.
077         *
078         * @return The primitive, or {@code null} if the association is
079         *         not available or not implemented that way.
080         *
081         * @see Surface#getProxy
082         * @issue http://jira.codehaus.org/browse/GEO-63
083         */
084        @Association("Oriented")
085        @UML(identifier="primitive", obligation=OPTIONAL, specification=ISO_19107)
086        Surface getPrimitive();
087    
088        /**
089         * Returns the owner of this orientable surface. This method is <em>optional</em> since
090         * the association in ISO 19107 is navigable only from {@code CompositeSurface} to
091         * {@code OrientableSurface}, not the other way.
092         *
093         * @return The owner of this orientable surface, or {@code null} if the association is
094         *         not available or not implemented that way.
095         *
096         * @see CompositeSurface#getGenerators
097         * @issue http://jira.codehaus.org/browse/GEO-63
098         */
099        @Association("Composition")
100        @UML(identifier="composite", obligation=OPTIONAL, specification=ISO_19107)
101        CompositeSurface getComposite();
102    }