edu.ucsb.nceas.morpho.plugins.metadisplay
Class MetaDisplayPlugin

java.lang.Object
  extended byedu.ucsb.nceas.morpho.plugins.metadisplay.MetaDisplayPlugin
All Implemented Interfaces:
MetaDisplayFactoryInterface, PluginInterface, ServiceProvider

public class MetaDisplayPlugin
extends java.lang.Object
implements PluginInterface, ServiceProvider, MetaDisplayFactoryInterface

Plugin that builds a display panel to display metadata. Given a String ID, does a lookup using a factory that must also be provided (and which implements the ContentFactoryInterface) to get the XML document to display. Then styles this document accordingly using XSLT, before displaying it in an embedded HTML display.


Constructor Summary
MetaDisplayPlugin()
           
 
Method Summary
 MetaDisplayInterface getInstance()
          Required by MetaDisplayFactoryInterface: Returns a new instance of an object that implements the MetaDisplayInterface
 MetaDisplayInterface getMetaDisplay(int displayNum)
          Required by MetaDisplayFactoryInterface: Returns a reference to an existing object that implements the MetaDisplayInterface.
 void initialize(Morpho morpho)
          Required by PluginInterface; called automatically at runtime
static void main(java.lang.String[] args)
          Main method can be used for testing this plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDisplayPlugin

public MetaDisplayPlugin()
Method Detail

initialize

public void initialize(Morpho morpho)
Required by PluginInterface; called automatically at runtime

Specified by:
initialize in interface PluginInterface
Parameters:
morpho - a reference to the Morpho

getInstance

public MetaDisplayInterface getInstance()
Required by MetaDisplayFactoryInterface: Returns a new instance of an object that implements the MetaDisplayInterface

Specified by:
getInstance in interface MetaDisplayFactoryInterface
Returns:
new instance of an object that implements the MetaDisplayInterface
See Also:
MetaDisplayFactoryInterface.getMetaDisplay(int displayNum)

getMetaDisplay

public MetaDisplayInterface getMetaDisplay(int displayNum)
Required by MetaDisplayFactoryInterface: Returns a reference to an existing object that implements the MetaDisplayInterface. The object is identified by the int index assigned to it in the getInstance() method at the time of creation

Specified by:
getMetaDisplay in interface MetaDisplayFactoryInterface
Parameters:
displayNum - int index assigned to the object in the getInstance() method at the time of creation
Returns:
reference to an existing object that implements the MetaDisplayInterface identified by displayNum. Returns NULL if displayNum out of range

main

public static void main(java.lang.String[] args)
Main method can be used for testing this plugin. If you run it without any command-line arguments, you'll just get a default display with some test data in it. If you want to actually style some XML, you must provide 2 or 3 command-line arguments:

Parameters:
args -
  • id - the identifier string that tells the MetaDisplay what XML document to display
  • XMLFactoryInterface - the full string classname of an object that implements the XMLFactoryInterface. Given the id (see above), this factory then returns a Reader which allows the MetaDisplay to actually get the Document identified by the id.
  • listener (optional) - the full string classname of an ActionListener that will receive callbacks each time an event occurs within the metaDisplay. Useful for responding to close actions, clicked links etc


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