edu.ucsb.nceas.morpho.plugins.datapackagewizard
Class DataPackageWizardPlugin

java.lang.Object
  extended byedu.ucsb.nceas.morpho.plugins.datapackagewizard.DataPackageWizardPlugin
All Implemented Interfaces:
DataPackageWizardInterface, PluginInterface, ServiceProvider

public class DataPackageWizardPlugin
extends java.lang.Object
implements PluginInterface, ServiceProvider, DataPackageWizardInterface

Main controller class for creating and starting a Data Package Wizard Plugin


Field Summary
 
Fields inherited from interface edu.ucsb.nceas.morpho.plugins.DataPackageWizardInterface
ACCESS, ACCESS_PAGE, ATTRIBUTE_PAGE, CITATION_PAGE, CODE_DEFINITION, CODE_IMPORT_PAGE, CODE_IMPORT_SUMMARY, CUSTOM_UNIT_PAGE, DATA_FORMAT, DATA_LOCATION, ENTITY, GENERAL, GEOGRAPHIC, GEOGRAPHIC_PAGE, INTRODUCTION, KEYWORDS, KEYWORDS_PAGE, METHODS, METHODS_PAGE, PARTY_ASSOCIATED, PARTY_ASSOCIATED_PAGE, PARTY_CITATION_AUTHOR, PARTY_CONTACT, PARTY_CONTACT_PAGE, PARTY_CREATOR, PARTY_CREATOR_PAGE, PARTY_INTRO, PARTY_PERSONNEL, PROJECT, SUMMARY, TAXONOMIC, TEMPORAL, TEMPORAL_PAGE, TEXT_IMPORT_WIZARD, USAGE_RIGHTS
 
Constructor Summary
DataPackageWizardPlugin()
          Constructor
 
Method Summary
static boolean deleteExistingAndAddPageDataToDOM(AbstractDataPackage adp, java.util.List pageList, java.lang.String rootXPath, java.lang.String subtreeGenericName)
          deletes all existing subtrees of name subtreeGenericName, then inserts data for each AbstractUIPage in pageList into the passed AbstractDataPackage
 AbstractUIPage getPage(java.lang.String pageID)
          returns the WizardPage with the corresponding pageID provided
 void initialize(Morpho morpho)
          Required by PluginInterface; called automatically at runtime
static void main(java.lang.String[] args)
           
 void startCodeDefImportWizard(DataPackageWizardListener listener)
          method to start the Code Definitions Import wizard
 void startEntityWizard(DataPackageWizardListener listener)
          Required by DataPackageWizardInterface: method to start the Entity wizard
 void startPackageWizard(DataPackageWizardListener listener)
          Required by DataPackageWizardInterface: method to start the Package wizard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataPackageWizardPlugin

public DataPackageWizardPlugin()
Constructor

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

startPackageWizard

public void startPackageWizard(DataPackageWizardListener listener)
Required by DataPackageWizardInterface: method to start the Package wizard

Specified by:
startPackageWizard in interface DataPackageWizardInterface
Parameters:
listener - the DataPackageWizardListener to be called back when the Package Wizard has finished

startEntityWizard

public void startEntityWizard(DataPackageWizardListener listener)
Required by DataPackageWizardInterface: method to start the Entity wizard

Specified by:
startEntityWizard in interface DataPackageWizardInterface
Parameters:
listener - the DataPackageWizardListener to be called back when the Entity Wizard has finished

startCodeDefImportWizard

public void startCodeDefImportWizard(DataPackageWizardListener listener)
method to start the Code Definitions Import wizard

Specified by:
startCodeDefImportWizard in interface DataPackageWizardInterface
Parameters:
listener - the DataPackageWizardListener to be called back when the Wizard has finished

getPage

public AbstractUIPage getPage(java.lang.String pageID)
returns the WizardPage with the corresponding pageID provided

Specified by:
getPage in interface DataPackageWizardInterface
Parameters:
pageID - the String pageID for the WizardPage to be returned
Returns:
the corresponding WizardPage with this ID

main

public static void main(java.lang.String[] args)

deleteExistingAndAddPageDataToDOM

public static boolean deleteExistingAndAddPageDataToDOM(AbstractDataPackage adp,
                                                        java.util.List pageList,
                                                        java.lang.String rootXPath,
                                                        java.lang.String subtreeGenericName)
deletes all existing subtrees of name subtreeGenericName, then inserts data for each AbstractUIPage in pageList into the passed AbstractDataPackage

Parameters:
adp - the AbstractDataPackage where the data will be inserted
pageList - List of AbstractUIPages that are the source of the data, in the order that they should be added to the DOM
rootXPath - the String that represents the "root" of the XPath to the content of each AbstractUIPage, NOT INCLUDING PREDICATES. example - if the list contains "Party" widgets, being used for "creator" entries, then xPathRoot = "/creator/"
subtreeGenericName - String - eg "contact", "project" etc (@see lib/eml200KeymapConfig.xml)
Returns:
boolean true if this page data successfully added to the datapkg, false if not.


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