|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.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 java.lang.String |
DATA_MENU_LABEL
|
static int |
DATAMENUPOSITION
Constant int for data menu position |
static int |
DOCUMENTATIONMENUPOSITION
Constant int for data menu position |
static java.lang.String |
EDIT_MENU_LABEL
|
static int |
EDITMENUPOSITION
Constant int for edit menu position |
static java.lang.String |
FILE_MENU_LABEL
|
static java.lang.String |
METADATA_MENU_LABEL
|
static java.lang.String |
PASTEKEY
|
Fields inherited from interface edu.ucsb.nceas.morpho.framework.DataPackageInterface |
BOTH, LOCAL, METACAT, NEW_DATA_TABLE_COMMAND, NEW_DATAPACKAGE_COMMAND |
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 |
exportToEml2(java.lang.String docid,
java.lang.String path,
java.lang.String location)
Exports the package to eml2 |
void |
exportToZip(java.lang.String docid,
java.lang.String path,
java.lang.String location)
Exports the package into a zip file |
Command |
getCommandObject(int commandIdentifier)
return an instance of a Command object, identified by one of the integer constants defined above |
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,
java.lang.String doctype)
This method is called to open a data package that resides either locally (location=local) or on a Metacat server (location=metacat). |
void |
openHiddenNewDataPackage(AbstractDataPackage adp,
ButterflyFlapCoordinator coordinator)
same as openNewDataPackage except the frame is notVisible |
void |
openNewDataPackage(AbstractDataPackage adp,
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 java.lang.String FILE_MENU_LABEL
public static final java.lang.String EDIT_MENU_LABEL
public static final java.lang.String METADATA_MENU_LABEL
public static final java.lang.String DATA_MENU_LABEL
public static final int DOCUMENTATIONMENUPOSITION
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
morpho
- Morphopublic void openDataPackage(java.lang.String location, java.lang.String identifier, java.util.Vector relations, ButterflyFlapCoordinator coordinator, java.lang.String doctype)
DataPackageInterface
openDataPackage
in interface DataPackageInterface
location
- indicates the location from which to open the dataidentifier
- the unique identifier to use to open the datarelations
- Vectorcoordinator
- the coordinator for butterfly flappingdoctype
- Stringpublic void openNewDataPackage(AbstractDataPackage adp, ButterflyFlapCoordinator coordinator)
DataPackageInterface
openNewDataPackage
in interface DataPackageInterface
adp
- indicates the location from which to open the datacoordinator
- the coordinator for butterfly flappingpublic void openHiddenNewDataPackage(AbstractDataPackage adp, ButterflyFlapCoordinator coordinator)
DataPackageInterface
openHiddenNewDataPackage
in interface DataPackageInterface
public java.lang.String upload(java.lang.String docid, boolean updateIds) throws MetacatUploadException
upload
in interface DataPackageInterface
docid
- the id of the package to uploadupdateIds
- boolean
MetacatUploadException
public 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) throws java.lang.Exception
delete
in interface DataPackageInterface
docid
- the id of the package to downloadlocation
- String
java.lang.Exception
public 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 exportToEml2(java.lang.String docid, java.lang.String path, java.lang.String location)
exportToEml2
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 file
public java.lang.String getDocIdFromMorphoFrame(MorphoFrame morphoFrame)
getDocIdFromMorphoFrame
in interface DataPackageInterface
morphoFrame
- the morphoFrame which contains a datapackage
public boolean isDataPackageInLocal(MorphoFrame morphoFrame)
isDataPackageInLocal
in interface DataPackageInterface
morphoFrame
- the morpho frame containing the data package
public boolean isDataPackageInNetwork(MorphoFrame morphoFrame)
isDataPackageInNetwork
in interface DataPackageInterface
morphoFrame
- the morpho frame containing the data package
public Command getCommandObject(int commandIdentifier) throws java.lang.ClassNotFoundException
getCommandObject
in interface DataPackageInterface
commandIdentifier
- integer constant identifying the command Options
include:java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |