|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.morpho.datapackage.DataPackagePlugin
Class that implements the plugin for package editing
Field Summary | |
static java.lang.String |
COPYKEY
String for accelerator key |
static java.lang.String |
CUTKEY
|
static int |
DATAMENUPOSITION
Constant int for data menu position |
static int |
EDITMENUPOSITION
Constant int for edit menu position |
static java.lang.String |
PASTEKEY
|
Fields inherited from interface edu.ucsb.nceas.morpho.framework.DataPackageInterface |
BOTH, LOCAL, METACAT |
Constructor Summary | |
DataPackagePlugin()
Construct the plugin. |
|
DataPackagePlugin(Morpho morpho)
Construct of the puglin which will be used in datapackage itself |
Method Summary | |
void |
createOpenPreviousVersionDialog(java.lang.String title,
int numOfVersion,
Morpho morpho,
boolean local)
This method will create a dialog for open previouse version of a datapackage |
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 |
java.lang.String |
getDocIdFromMorphoFrame(MorphoFrame morphoFrame)
Method to get docid from a given morpho frame |
java.lang.String |
getNextId(Morpho morpho)
returns the next local id from the config file returns null if configXML was unable to increment the id number |
void |
initialize(Morpho morpho)
The plugin must store a reference to the Morpho application in order to be able to call the services available through the framework. |
boolean |
isDataPackageInLocal(MorphoFrame morphoFrame)
Method to determine a data package which in a morpho frame if is in local |
boolean |
isDataPackageInNetwork(MorphoFrame morphoFrame)
Method to determine a data package which in a morpho frame if is in network |
void |
openDataPackage(java.lang.String location,
java.lang.String identifier,
java.util.Vector relations,
ButterflyFlapCoordinator coordinator)
This method is called to open a data package that resides either locally (location=local) or on a Metacat server (location=metacat). |
java.lang.String |
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 |
Field Detail |
public static final int DATAMENUPOSITION
public static final int EDITMENUPOSITION
public static final java.lang.String COPYKEY
public static final java.lang.String CUTKEY
public static final java.lang.String PASTEKEY
Constructor Detail |
public DataPackagePlugin()
public DataPackagePlugin(Morpho morpho)
morpho
- the morpho for this applicationMethod Detail |
public void initialize(Morpho morpho)
initialize
in interface PluginInterface
public void openDataPackage(java.lang.String location, java.lang.String identifier, java.util.Vector relations, ButterflyFlapCoordinator coordinator)
DataPackageInterface
openDataPackage
in interface DataPackageInterface
edu.ucsb.nceas.morpho.framework.DataPackageInterface
location
- indicates the location from which to open the dataidentifier
- the unique identifier to use to open the datacoordinator
- the coordinator for butterfly flappingpublic java.lang.String upload(java.lang.String docid, boolean updateIds) throws MetacatUploadException
upload
in interface DataPackageInterface
docid
- the id of the package to uploadpublic void download(java.lang.String docid)
download
in interface DataPackageInterface
docid
- the id of the package to downloadpublic void delete(java.lang.String docid, java.lang.String location)
delete
in interface DataPackageInterface
docid
- the id of the package to downloadpublic void export(java.lang.String docid, java.lang.String path, java.lang.String location)
export
in interface DataPackageInterface
docid
- the id of the package to exportpath
- the directory to which the package should be exported.location
- the location where the package is now: LOCAL, METACAT or
BOTHpublic void exportToZip(java.lang.String docid, java.lang.String path, java.lang.String location)
exportToZip
in interface DataPackageInterface
docid
- the id of the package to exportpath
- the directory to which the package should be exported.location
- the location where the package is now: LOCAL, METACAT or
BOTHpublic void createOpenPreviousVersionDialog(java.lang.String title, int numOfVersion, Morpho morpho, boolean local)
createOpenPreviousVersionDialog
in interface DataPackageInterface
title
- the title of the dialog, docid will be set as tilenumOfVersion
- the total number of versions in this docidmorpho
- the morpho filelocal
- the package is local or notpublic java.lang.String getNextId(Morpho morpho)
getNextId
in interface DataPackageInterface
morpho
- the morpho filepublic java.lang.String getDocIdFromMorphoFrame(MorphoFrame morphoFrame)
getDocIdFromMorphoFrame
in interface DataPackageInterface
morphoFrame
- the morphoFrame which contains a datapackagepublic boolean isDataPackageInLocal(MorphoFrame morphoFrame)
isDataPackageInLocal
in interface DataPackageInterface
morphoFrame
- the morpho frame containing the data packagepublic boolean isDataPackageInNetwork(MorphoFrame morphoFrame)
isDataPackageInNetwork
in interface DataPackageInterface
morphoFrame
- the morpho frame containing the data package
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |