edu.ucsb.nceas.morpho.plugins
Interface MetaDisplayInterface

All Known Implementing Classes:
MetaDisplay

public interface MetaDisplayInterface

This interface provides methods for initializing, displaying, updating and registering as a listener for a Component that styles XML and displays the results


Field Summary
static int CLOSE_EVENT
          descriptive constant used in ActionEvents generated by the display Signifies that user has issued a command to close the display
static int EDIT_BEGIN_EVENT
          descriptive constant used in ActionEvents generated by the display Signifies that the user has issued a command to edit the metadata
static int HISTORY_BACK_EVENT
          descriptive constant used in ActionEvents generated by the display Signifies that user has requested the previous document from History
static int NAVIGATION_EVENT
          * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * N O T E: THESE SHOULD BE SUPERSEDED BY THE STATE CHANGE EVENT CONSTANTS IN StateChangeEvent.java, AND THE WHOLE LISTENER SETUP SHOULD BE CHANGED TO USEW THE StateChangeMonitor...
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Register a java.awt.event.ActionListener to listen for events
 void addEditingCompleteListener(EditingCompleteListener listener)
          Register an EditingCompleteListener to listen for editor events
 void display(java.lang.String identifier)
          method to display metadata in an existing instance of a visual component (metadata identified by the identifier parameter).
 void display(java.lang.String identifier, java.io.Reader XMLDocument)
          method to display metadata in an existing instance of a visual component (metadata is provided as a Reader (the "XMLDocument" parameter), and a required corresponding unique identifier parameter) that can subsequently be used by this component to get the latest instance of the same "XMLDocument" from the XMLFactoryInterface.
 void displayPrevious()
          method to redisplay the previous metadata document from History, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it
 java.awt.Component getDisplayComponent(java.lang.String identifier, XMLFactoryInterface factory, java.awt.event.ActionListener listener)
          method used to obtain a visual component (a descendent of java.awt.Component, which will display the XML resource identified by the identifier parameter.
 java.awt.Component getDisplayComponent(XMLFactoryInterface factory, java.awt.event.ActionListener listener)
          method used to obtain a visual component (a descendent of java.awt.Component, which will subsequently display the XML resources identified by unique string IDs.
 java.lang.String getIdentifier()
          Get the String identifier associated with the currently-displayed metadata
 java.lang.String getTransformerProperty(java.lang.String key)
          method to get the transformer property value corresponding to the passed key
 void redisplay()
          method to redisplay the current metadata, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it
 void removeActionListener(java.awt.event.ActionListener listener)
          Remove this java.awt.event.ActionListener from the list of registered listeners
 void removeEditingCompleteListener(EditingCompleteListener listener)
          Remove this EditingCompleteListener from the list of registered listeners
 void useTransformerProperty(java.lang.String key, java.lang.String value)
          method to add a key/value transformer property pair to the properties that will be passed onto the XSL Transformation Engine, and will then be made available to the actual XSL stylesheets as values
 

Field Detail

NAVIGATION_EVENT

public static final int NAVIGATION_EVENT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * N O T E: THESE SHOULD BE SUPERSEDED BY THE STATE CHANGE EVENT CONSTANTS IN StateChangeEvent.java, AND THE WHOLE LISTENER SETUP SHOULD BE CHANGED TO USEW THE StateChangeMonitor... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * descriptive constant used in ActionEvents generated by the display Signifies that a navigation event has occurred

HISTORY_BACK_EVENT

public static final int HISTORY_BACK_EVENT
descriptive constant used in ActionEvents generated by the display Signifies that user has requested the previous document from History

CLOSE_EVENT

public static final int CLOSE_EVENT
descriptive constant used in ActionEvents generated by the display Signifies that user has issued a command to close the display

EDIT_BEGIN_EVENT

public static final int EDIT_BEGIN_EVENT
descriptive constant used in ActionEvents generated by the display Signifies that the user has issued a command to edit the metadata
Method Detail

getDisplayComponent

public java.awt.Component getDisplayComponent(java.lang.String identifier,
                                              XMLFactoryInterface factory,
                                              java.awt.event.ActionListener listener)
                                       throws NullArgumentException,
                                              DocumentNotFoundException
method used to obtain a visual component (a descendent of java.awt.Component, which will display the XML resource identified by the identifier parameter.
Parameters:
identifier - a unique identifier used to determine what resource to return
factory - an instance of a class that implements XMLFactoryInterface to enable this obj to obtain the actual XML document to display, given the identifier parameter
listener - an ActionListener to be notified of all events generated by this obj
Returns:
a visual component (a descendent of java.awt.Component, which will display the XML resource identified by the identifier parameter.
Throws:
DocumentNotFoundException - if id does not point to a document, or if requested document exists but cannot be accessed.
NullArgumentException - if XML Factory is null.

getDisplayComponent

public java.awt.Component getDisplayComponent(XMLFactoryInterface factory,
                                              java.awt.event.ActionListener listener)
                                       throws NullArgumentException,
                                              DocumentNotFoundException
method used to obtain a visual component (a descendent of java.awt.Component, which will subsequently display the XML resources identified by unique string IDs. However, the initial instance of the component returned by this method will be blank.
Parameters:
factory - an instance of a class that implements XMLFactoryInterface to enable this obj to obtain the actual XML document to display, given unique identifier parameters
listener - an ActionListener to be notified of all events generated by this obj
Returns:
a visual component (a descendent of java.awt.Component, which is currently blank, but can subsequently be used to display the XML resources identified by unique identifier parameters.
Throws:
NullArgumentException - if XML Factory is null.

display

public void display(java.lang.String identifier)
             throws DocumentNotFoundException
method to display metadata in an existing instance of a visual component (metadata identified by the identifier parameter).
Parameters:
identifier - a unique identifier used to determine what resource to return
Throws:
DocumentNotFoundException - if id does not point to a document, or if requested document exists but cannot be accessed.

display

public void display(java.lang.String identifier,
                    java.io.Reader XMLDocument)
             throws NullArgumentException,
                    DocumentNotFoundException
method to display metadata in an existing instance of a visual component (metadata is provided as a Reader (the "XMLDocument" parameter), and a required corresponding unique identifier parameter) that can subsequently be used by this component to get the latest instance of the same "XMLDocument" from the XMLFactoryInterface.
Parameters:
identifier - a unique identifier that can subsequently be used by this component to get the latest instance of the same "XMLDocument" from the XMLFactoryInterface
XMLDocument - a Reader for the character-based XML document
Throws:
NullArgumentException - if id not provided.
DocumentNotFoundException - if Reader cannot be read.

redisplay

public void redisplay()
               throws DocumentNotFoundException
method to redisplay the current metadata, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it
Throws:
DocumentNotFoundException - if id does not point to a document, or if requested document exists but cannot be accessed.

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Register a java.awt.event.ActionListener to listen for events
Parameters:
listener -  

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Remove this java.awt.event.ActionListener from the list of registered listeners
Parameters:
listener -  

addEditingCompleteListener

public void addEditingCompleteListener(EditingCompleteListener listener)
Register an EditingCompleteListener to listen for editor events
Parameters:
listener -  

removeEditingCompleteListener

public void removeEditingCompleteListener(EditingCompleteListener listener)
Remove this EditingCompleteListener from the list of registered listeners
Parameters:
listener -  

displayPrevious

public void displayPrevious()
                     throws DocumentNotFoundException
method to redisplay the previous metadata document from History, by re-obtaining the latest instance of the XML document from the XMLFactoryInterface and re-styling it
Throws:
DocumentNotFoundException - if id for previous metadata document does not point to an actual document or document cannot be accessed.

useTransformerProperty

public void useTransformerProperty(java.lang.String key,
                                   java.lang.String value)
method to add a key/value transformer property pair to the properties that will be passed onto the XSL Transformation Engine, and will then be made available to the actual XSL stylesheets as values
Parameters:
key -  
value -  

getTransformerProperty

public java.lang.String getTransformerProperty(java.lang.String key)
method to get the transformer property value corresponding to the passed key
Parameters:
key -  
Returns:
value String value associated with the passed key

getIdentifier

public java.lang.String getIdentifier()
Get the String identifier associated with the currently-displayed metadata
Returns:
identifier String identifier associated with the currently-displayed metadata


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.