Package org.geotools.api.style
Interface ExternalGraphic
- All Superinterfaces:
GraphicalSymbol
,Symbol
- All Known Implementing Classes:
ExternalGraphicImpl
Points to an external file that contains an image of some kind, such as a CGM, JPG, or SVG.
- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Johann Sorel (Geomatys), Chris Dillard (SYS Technologies)
-
Field Summary
FieldsFields inherited from interface GraphicalSymbol
SYMBOLS_EMPTY
Fields inherited from interface Symbol
SYMBOLS_EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionaccept
(TraversingStyleVisitor visitor, Object extraData) calls the visit method of a StyleVisitorThe ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function as defined in Interpolate.Custom user supplied properties available when working with an external graphic.Returns the mime type of the onlineResource/InlineContentReturns the InlineContent that comprise the image.Provides the URL for where the external graphic resource can be located.Returns a OnlineResource to a file (perhaps a local file) that contains an image.getURI()
Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)void
setCustomProperties
(Map<String, Object> properties) Custom properties; renderer may consult these values when drawing graphic.void
Provides the format of the external graphic.void
setLocation
(URL url) Provides the URL for where the external graphic resource can be located.void
Converts a URI in a string to the location URL
-
Field Details
-
EXTERNAL_GRAPHICS_EMPTY
-
-
Method Details
-
getOnlineResource
OnLineResource getOnlineResource()Returns a OnlineResource to a file (perhaps a local file) that contains an image. This can be null if the image is already loaded locally and theInlineContent
property is set.- Returns:
- OnlineResource
-
getInlineContent
Icon getInlineContent()Returns the InlineContent that comprise the image. This overrides theOnlineResource
property, if it is set. -
getFormat
String getFormat()Returns the mime type of the onlineResource/InlineContent- Returns:
- mime type
-
getColorReplacements
Collection<ColorReplacement> getColorReplacements()The ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function as defined in Interpolate. -
accept
calls the visit method of a StyleVisitor- Parameters:
visitor
- the style visitor
-
setURI
Converts a URI in a string to the location URL- Parameters:
uri
- the uri of the external graphic
-
getURI
String getURI()Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations) -
getLocation
Provides the URL for where the external graphic resource can be located.This method will be replaced by getOnlineResource().getLinkage() in 2.6.x
- Returns:
- The URL of the ExternalGraphic
- Throws:
MalformedURLException
- If the url held in the ExternalGraphic is malformed.
-
setLocation
Provides the URL for where the external graphic resource can be located.- Parameters:
url
- The URL of the ExternalGraphic
-
setFormat
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
Custom properties; renderer may consult these values when drawing graphic. -
getCustomProperties
Custom user supplied properties available when working with an external graphic.- Returns:
- properties
-