org.geotools.styling
Interface ExternalGraphic

All Superinterfaces:
GTComponent, Symbol
All Known Implementing Classes:
ExternalGraphicImpl

public interface ExternalGraphic
extends Symbol

Holds a reference to an external graphics file with a URL to its location and its expected MIME type. Knowing the MIME type in advance allows stylers to select best-supported formats from a list of external graphics.

The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:


 <xsd:element name="ExternalGraphic">
   <xsd:annotation>
     <xsd:documentation>
       An "ExternalGraphic" gives a reference to an external raster or
       vector graphical object.
     </xsd:documentation>
   </xsd:annotation>
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element ref="sld:OnlineResource"/>
       <xsd:element ref="sld:Format"/>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>
 

Renderers can use this information when displaying styled features, though it must be remembered that not all renderers will be able to fully represent strokes as set out by this interface. For example, opacity may not be supported.

Notes:

Version:
$Id: ExternalGraphic.java 17702 2006-01-23 00:08:55Z desruisseaux $
Author:
James Macgill, CCG

Field Summary
static ExternalGraphic[] EXTERNAL_GRAPHICS_EMPTY
           
 
Fields inherited from interface org.geotools.styling.Symbol
SYMBOLS_EMPTY
 
Method Summary
 java.util.Map getCustomProperties()
           
 java.lang.String getFormat()
          Provides the format of the external graphic.
 java.net.URL getLocation()
          Provides the URL for where the external graphic resource can be located.
 void setCustomProperties(java.util.Map list)
           
 void setFormat(java.lang.String format)
          Provides the format of the external graphic.
 void setLocation(java.net.URL url)
          Provides the URL for where the external graphic resource can be located.
 void setURI(java.lang.String uri)
          converts a URI in a string to the location URL
 
Methods inherited from interface org.geotools.styling.Symbol
accept
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Field Detail

EXTERNAL_GRAPHICS_EMPTY

public static final ExternalGraphic[] EXTERNAL_GRAPHICS_EMPTY
Method Detail

setURI

public void setURI(java.lang.String uri)
converts a URI in a string to the location URL

Parameters:
uri - the uri of the external graphic

getLocation

public java.net.URL getLocation()
                         throws java.net.MalformedURLException
Provides the URL for where the external graphic resource can be located.

Returns:
The URL of the ExternalGraphic
Throws:
java.net.MalformedURLException - If the url held in the ExternalGraphic is malformed.

setLocation

public void setLocation(java.net.URL url)
Provides the URL for where the external graphic resource can be located.

Parameters:
url - The URL of the ExternalGraphic

getFormat

public java.lang.String getFormat()
Provides the format of the external graphic.

Returns:
The format of the external graphic. Reported as its MIME type in a String object.

setFormat

public void setFormat(java.lang.String format)
Provides the format of the external graphic.

Parameters:
format - The format of the external graphic. Reported as its MIME type in a String object.

setCustomProperties

public void setCustomProperties(java.util.Map list)

getCustomProperties

public java.util.Map getCustomProperties()


Copyright © GeoTools. All Rights Reserved.