|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.morpho.Morpho
Morpho is the main entry point for the Morpho application. It creates the main application state and sets up the menus and toolbars for the application. The framework also provides a mechanism for "plugins" to add menus, toolbars, and services to the application. These plugins are dynamically loaded at runtime. Plugins are classes that implement the "PluginInterface" interface.
Field Summary | |
static java.lang.String |
INITIALFRAMENAME
Constant of initial morpho frame name |
static java.lang.String |
SEPARATOR_FOLLOWING
Constant to indicate a separator should follow an action |
static java.lang.String |
SEPARATOR_PRECEDING
Constant to indicate a separator should precede an action |
static java.lang.String |
VERSION
The version of this release of Morpho |
Constructor Summary | |
Morpho(ConfigXML config)
Creates a new instance of Morpho |
Method Summary | |
void |
addConnectionListener(ConnectionListener listener)
This method is called by plugins to register a listener for changes in the Connection status. |
void |
checkJavaVersion()
Description of the Method |
static javax.xml.parsers.DocumentBuilder |
createDomParser()
Set up a DOM parser for reading an XML document |
static org.xml.sax.XMLReader |
createSaxParser(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
Set up a SAX parser for reading an XML document |
void |
exitApplication()
Exit the application, asking the user if they are sure |
static ConfigXML |
getConfiguration()
Get the configuration object associated with the framework. |
boolean |
getJavaVersionFlag()
returns true if the JVM version is 1.3 or greater |
java.io.InputStream |
getMetacatInputStream(java.util.Properties prop)
Send a request to Metacat |
java.io.InputStream |
getMetacatInputStream(java.util.Properties prop,
boolean requiresLogin)
Send a request to Metacat |
java.lang.String |
getMetacatString(java.util.Properties prop)
Send a request to Metacat |
java.lang.String |
getMetacatString(java.util.Properties prop,
boolean requiresLogin)
Send a request to Metacat |
boolean |
getNetworkStatus()
Determine whether a network connection is available before trying to open a socket, since this would cause an error |
java.lang.String |
getPassword()
get password associated with this framework |
ConfigXML |
getProfile()
Get the profile for the currently logged in user. |
java.lang.String |
getSessionCookie()
Gets the SessionCookie attribute of the Morpho object |
boolean |
getSslStatus()
Determines if the framework is using an ssl connection |
java.util.Vector |
getTaxonSynonyms(java.lang.String taxonName)
Look up the synonyms of a taxon from ITIS, and return the list of names |
java.lang.String |
getUserName()
Get the username associated with this framework |
boolean |
isConnected()
Determines if the framework has a valid login |
boolean |
logIn()
Log into metacat. |
void |
logOut()
Log out of metacat |
void |
logOutExit()
Log out of metacat when exiting. |
static void |
main(java.lang.String[] args)
The entry point for this application. |
java.io.InputStream |
sendDataFile(java.lang.String id,
java.io.File file)
sends a data file to the metacat using "multipart/form-data" encoding |
void |
setPassword(java.lang.String pword)
Set the password associated with this framework |
void |
setProfile(ConfigXML newProfile)
Set the profile for the currently logged in user (on startup, or when switching profiles). |
void |
setProfile(java.lang.String newProfileName)
Set the profile associated with this framework based on its name |
void |
setUserName(java.lang.String uname)
Set the username associated with this framework |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String VERSION
public static java.lang.String SEPARATOR_PRECEDING
public static java.lang.String SEPARATOR_FOLLOWING
public static final java.lang.String INITIALFRAMENAME
Constructor Detail |
public Morpho(ConfigXML config)
config
- the configuration object for the applicationMethod Detail |
public void setUserName(java.lang.String uname)
uname
- The new UserName valuepublic void setPassword(java.lang.String pword)
pword
- The new Password valuepublic void setProfile(ConfigXML newProfile)
newProfile
- the profile objectpublic void setProfile(java.lang.String newProfileName)
newProfileName
- the name of the new profile for the frameworkpublic java.io.InputStream getMetacatInputStream(java.util.Properties prop, boolean requiresLogin)
prop
- the properties to be sent to MetacatrequiresLogin
- indicates whether a valid connection is required
for the operationpublic java.lang.String getSessionCookie()
public java.io.InputStream getMetacatInputStream(java.util.Properties prop)
prop
- the properties to be sent to Metacatpublic java.lang.String getMetacatString(java.util.Properties prop, boolean requiresLogin)
prop
- the properties to be sent to MetacatrequiresLogin
- indicates whether a valid connection is required
for the operationpublic java.lang.String getMetacatString(java.util.Properties prop)
prop
- the properties to be sent to Metacatpublic java.lang.String getUserName()
public java.lang.String getPassword()
public boolean isConnected()
public boolean getSslStatus()
public boolean getNetworkStatus()
public static ConfigXML getConfiguration()
public ConfigXML getProfile()
public java.util.Vector getTaxonSynonyms(java.lang.String taxonName)
taxonName
- public boolean getJavaVersionFlag()
public void exitApplication()
public java.io.InputStream sendDataFile(java.lang.String id, java.io.File file)
id
- the id to assign to the file on metacat (e.g., knb.1.1)file
- the file to sendpublic boolean logIn()
public void logOut()
public void logOutExit()
public void addConnectionListener(ConnectionListener listener)
listener
- a reference to the object to be notified of changesServiceExistsException
- public void checkJavaVersion()
public static void main(java.lang.String[] args)
args
- Description of Parameterpublic static org.xml.sax.XMLReader createSaxParser(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ErrorHandler errorHandler)
contentHandler
- object to be used for parsing the contenterrorHandler
- object to be used for handling errorspublic static javax.xml.parsers.DocumentBuilder createDomParser()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |