org.deegree_impl.graphics.sld
Class ExternalGraphic_Impl

java.lang.Object
  extended byorg.deegree_impl.graphics.sld.ExternalGraphic_Impl
All Implemented Interfaces:
ExternalGraphic, Marshallable

public class ExternalGraphic_Impl
extends java.lang.Object
implements ExternalGraphic, Marshallable

The ExternalGraphic element allows a reference to be made to an external graphic file with a Web URL. The OnlineResource sub-element gives the URL and the Format sub-element identifies the expected document MIME type of a successful fetch. Knowing the MIME type in advance allows the styler to select the best- supported format from the list of URLs with equivalent content.

----------------------------------------------------------------------

Version:
$Revision: 1.6 $ $Date: 2004/01/12 14:48:41 $
Author:
Andreas Poth

Field Summary
private  java.lang.String format
           
private  java.awt.image.BufferedImage image
           
private  java.net.URL onlineResource
           
 
Constructor Summary
(package private) ExternalGraphic_Impl(java.lang.String format, java.net.URL onlineResource)
          Creates a new ExternalGraphic_Impl object.
 
Method Summary
 java.lang.String exportAsXML()
          exports the content of the ExternalGraphic as XML formated String
 java.awt.image.BufferedImage getAsImage()
          returns the external graphic as an image. this method is not part of the sld specifications but it is added for speed up applications
 java.lang.String getFormat()
          the Format sub-element identifies the expected document MIME type of a successful fetch.
 java.net.URL getOnlineResource()
          The OnlineResource gives the URL of the external graphic
 void setAsImage(java.awt.image.BufferedImage image)
          sets the external graphic as an image.
 void setFormat(java.lang.String format)
          sets the format (MIME type)
 void setOnlineResource(java.net.URL onlineResource)
          sets the online resource / URL of the external graphic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private java.awt.image.BufferedImage image

format

private java.lang.String format

onlineResource

private java.net.URL onlineResource
Constructor Detail

ExternalGraphic_Impl

ExternalGraphic_Impl(java.lang.String format,
                     java.net.URL onlineResource)
Creates a new ExternalGraphic_Impl object.

Parameters:
format -
onlineResource -
Method Detail

getFormat

public java.lang.String getFormat()
the Format sub-element identifies the expected document MIME type of a successful fetch.

Specified by:
getFormat in interface ExternalGraphic
Returns:
Format of the external graphic

setFormat

public void setFormat(java.lang.String format)
sets the format (MIME type)

Specified by:
setFormat in interface ExternalGraphic
Parameters:
format - Format of the external graphic

getOnlineResource

public java.net.URL getOnlineResource()
The OnlineResource gives the URL of the external graphic

Specified by:
getOnlineResource in interface ExternalGraphic
Returns:
URL of the external graphic

setOnlineResource

public void setOnlineResource(java.net.URL onlineResource)
sets the online resource / URL of the external graphic

Specified by:
setOnlineResource in interface ExternalGraphic
Parameters:
onlineResource - URL of the external graphic

getAsImage

public java.awt.image.BufferedImage getAsImage()
returns the external graphic as an image. this method is not part of the sld specifications but it is added for speed up applications

Specified by:
getAsImage in interface ExternalGraphic
Returns:
the external graphic as BufferedImage

setAsImage

public void setAsImage(java.awt.image.BufferedImage image)
sets the external graphic as an image.

Specified by:
setAsImage in interface ExternalGraphic
Parameters:
image - the external graphic as BufferedImage

exportAsXML

public java.lang.String exportAsXML()
exports the content of the ExternalGraphic as XML formated String

Specified by:
exportAsXML in interface Marshallable
Returns:
xml representation of the ExternalGraphic