net.refractions.udig.style.sld.editor
Class ExportSLD

java.lang.Object
  extended by net.refractions.udig.style.sld.editor.ExportTo
      extended by net.refractions.udig.style.sld.editor.ExportSLD

public class ExportSLD
extends ExportTo


Nested Class Summary
 
Nested classes/interfaces inherited from class net.refractions.udig.style.sld.editor.ExportTo
ExportTo.PromptAndExport
 
Constructor Summary
ExportSLD()
           
 
Method Summary
 boolean canExport(java.lang.Object target)
          Let the extention point perform any additional checks before bothering the users with a prompt.
 java.lang.String defaultName(java.lang.Object target)
          Default name for provided target.
 void exportTo(java.lang.Object target, java.io.File file, IProgressMonitor monitor)
          Subclass should override to actually do something.
 java.lang.String[] getExtentions()
          Called by getFilterExtentions (example "sld").
 java.lang.String[] getFilterNames()
          Override as required (example "Style Layer Descriptor document").
 java.lang.String prompt(java.lang.Object target)
          Prompt to use for title (example: "Export to")
 
Methods inherited from class net.refractions.udig.style.sld.editor.ExportTo
addTo, getFilterExtentions, op, promptFile, status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportSLD

public ExportSLD()
Method Detail

canExport

public boolean canExport(java.lang.Object target)
Description copied from class: ExportTo
Let the extention point perform any additional checks before bothering the users with a prompt.

The extention point lets you specify the exact interface (or class) required. This method returns true, but could be used to perform a more indepth check of say a Layer's Schema to prevent the export of a FeatureType with multiple Geometry attributes being exported as a Shapefile.

Overrides:
canExport in class ExportTo
Parameters:
target - Target to be considered for export
Returns:
true if non null, subclass can overrride with additional tests

defaultName

public java.lang.String defaultName(java.lang.Object target)
Description copied from class: ExportTo
Default name for provided target.

Should make use of provided target's title if available. This will be combined with the first filter extention to form a valid filename.

Overrides:
defaultName in class ExportTo
Returns:
Default filename based on target, default is "new"

prompt

public java.lang.String prompt(java.lang.Object target)
Description copied from class: ExportTo
Prompt to use for title (example: "Export to")

Overrides:
prompt in class ExportTo
Returns:
Prompt (may be based on target), should be internationalized

getExtentions

public java.lang.String[] getExtentions()
Description copied from class: ExportTo
Called by getFilterExtentions (example "sld").

Overrides:
getExtentions in class ExportTo
Returns:
filter, default "*"

exportTo

public void exportTo(java.lang.Object target,
                     java.io.File file,
                     IProgressMonitor monitor)
              throws java.lang.Exception
Description copied from class: ExportTo
Subclass should override to actually do something.

Overrides:
exportTo in class ExportTo
Throws:
java.lang.Exception

getFilterNames

public java.lang.String[] getFilterNames()
Description copied from class: ExportTo
Override as required (example "Style Layer Descriptor document").

Care should be taken to internationalization these.

Overrides:
getFilterNames in class ExportTo
Returns:
Filter names, default "All Files"