001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2008-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.style;
033    
034    import org.opengis.annotation.Extension;
035    import org.opengis.annotation.XmlElement;
036    import org.opengis.filter.expression.Expression;
037    
038    
039    /**
040     * The "LinePlacement" specifies where and how a text label should be rendered
041     * relative to a line.
042     *
043     * @version <A HREF="http://www.opengeospatial.org/standards/symbol">Symbology Encoding Implementation Specification 1.1.0</A>
044     * @author Open Geospatial Consortium
045     * @author Johann Sorel (Geomatys)
046     * @author Ian Turton, CCG
047     * @since GeoAPI 2.2
048     */
049    @XmlElement("LinePlacement")
050    public interface LinePlacement extends LabelPlacement {
051    
052        /**
053         * The PerpendicularOffset element of a LinePlacement gives the perpendicular distance
054         * away from a line to draw a label.
055         *
056         * The distance is in uoms and is positive to the left-hand side of the line string. Negative
057         * numbers mean right. The default offset is 0.
058         *
059         * @return Expression
060         */
061        @XmlElement("PerpendicularOffset")
062        Expression getPerpendicularOffset();
063    
064        /**
065         * InitialGap specifies how far away the first graphic will be drawn relative to the start of
066         * the rendering line
067         *
068         * @return Expression
069         */
070        @XmlElement("InitialGap")
071        Expression getInitialGap();
072    
073        /**
074         * Gap gives the distance between two graphics.
075         *
076         * @return Expression
077         */
078        @XmlElement("Gap")
079        Expression getGap();
080    
081        /**
082         * If IsRepeated is "true", the label will be repeatedly drawn
083         * along the line with InitialGap and Gap defining the spaces at the
084         * beginning and between labels.
085         *
086         * @return boolean
087         */
088        @XmlElement("IsRepeated")
089        boolean isRepeated();
090    
091        /**
092         * Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are
093         * drawn horizontally.
094         *
095         * @return boolean
096         */
097        @XmlElement("IsAligned")
098        boolean IsAligned();
099    
100        /**
101         * GeneralizeLine allows the actual geometry, be it a
102         * linestring or polygon to be generalized for label placement. This is e.g. useful for
103         * labelling polygons inside their interior when there is need for the label to resemble the
104         * shape of the polygon.
105         *
106         * @return boolean
107         */
108        @XmlElement("GeneralizeLine")
109        boolean isGeneralizeLine();
110        
111        /**
112         * calls the visit method of a StyleVisitor
113         *
114         * @param visitor the style visitor
115         */
116        @Extension
117        Object accept(StyleVisitor visitor, Object extraData);
118    
119    }