edu.ucsb.nceas.morpho.datapackage
Class DataPackagePlugin

java.lang.Object
  |
  +--edu.ucsb.nceas.morpho.datapackage.DataPackagePlugin
All Implemented Interfaces:
DataPackageInterface, PluginInterface, ServiceProvider

public class DataPackagePlugin
extends java.lang.Object
implements PluginInterface, ServiceProvider, DataPackageInterface

Class that implements the plugin for package editing


Constructor Summary
DataPackagePlugin()
          Construct the plugin.
 
Method Summary
 void delete(java.lang.String docid, java.lang.String location)
          Deletes the package.
 void download(java.lang.String docid)
          Downloads the package from metacat.
 void export(java.lang.String docid, java.lang.String path, java.lang.String location)
          Exports the package.
 void exportToZip(java.lang.String docid, java.lang.String path, java.lang.String location)
          Exports the package into a zip file
 void initialize(ClientFramework cf)
          The plugin must store a reference to the ClientFramework in order to be able to call the services available through the framework.
 void openDataPackage(java.lang.String location, java.lang.String identifier, java.util.Vector relations)
          This method is called to open a data package that resides either locally (location=local) or on a Metacat server (location=metacat).
 void upload(java.lang.String docid, boolean updateIds)
          Uploads the package to metacat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataPackagePlugin

public DataPackagePlugin()
Construct the plugin. Initialize our menus and toolbars.
Method Detail

initialize

public void initialize(ClientFramework cf)
The plugin must store a reference to the ClientFramework in order to be able to call the services available through the framework. This is also the time to register menus and toolbars with the framework.
Specified by:
initialize in interface PluginInterface

openDataPackage

public void openDataPackage(java.lang.String location,
                            java.lang.String identifier,
                            java.util.Vector relations)
Description copied from interface: DataPackageInterface
This method is called to open a data package that resides either locally (location=local) or on a Metacat server (location=metacat).
Specified by:
openDataPackage in interface DataPackageInterface
Following copied from interface: edu.ucsb.nceas.morpho.framework.DataPackageInterface
Parameters:
location - indicates the location from which to open the data
identifier - the unique identifier to use to open the data

upload

public void upload(java.lang.String docid,
                   boolean updateIds)
            throws MetacatUploadException
Uploads the package to metacat. The location is assumed to be DataPackage.LOCAL
Specified by:
upload in interface DataPackageInterface
Parameters:
docid - the id of the package to upload

download

public void download(java.lang.String docid)
Downloads the package from metacat. The location is assumed to be DataPackage.METACAT
Specified by:
download in interface DataPackageInterface
Parameters:
docid - the id of the package to download

delete

public void delete(java.lang.String docid,
                   java.lang.String location)
Deletes the package.
Specified by:
delete in interface DataPackageInterface
Parameters:
docid - the id of the package to download

export

public void export(java.lang.String docid,
                   java.lang.String path,
                   java.lang.String location)
Exports the package.
Specified by:
export in interface DataPackageInterface
Parameters:
docid - the id of the package to export
path - the directory to which the package should be exported.
location - the location where the package is now: LOCAL, METACAT or BOTH

exportToZip

public void exportToZip(java.lang.String docid,
                        java.lang.String path,
                        java.lang.String location)
Exports the package into a zip file
Specified by:
exportToZip in interface DataPackageInterface
Parameters:
docid - the id of the package to export
path - the directory to which the package should be exported.
location - the location where the package is now: LOCAL, METACAT or BOTH


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