|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.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.
Nested Class Summary | |
static class |
Morpho.CreateNewProfileCommand
|
Field Summary | |
static boolean |
connectionBusy
flag set to indicate that connection to metacat is busy used by doPing to avoid thread problem |
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 Morpho |
thisStaticInstance
|
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 |
addProfileAddedListener(ProfileAddedListener listener)
Add a ProfileAddedListener to listen for new profile additions. |
void |
checkJavaVersion()
Description of the Method |
void |
cleanCache()
delete all files in cache |
void |
cleanTemp()
delete all files in temp |
static javax.xml.parsers.DocumentBuilder |
createDomParser()
Set up a DOM parser for reading an XML document |
static void |
createMorphoInstance()
|
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. |
static java.lang.String |
getCurrentProfileName()
Get the profile name for the currently logged in user. |
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 |
java.lang.String |
getMetacatURLString()
Get metacat URL string |
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 ConfigXML for the currently logged in user. |
java.lang.String[] |
getProfilesList()
|
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 |
static void |
initializeLogging(ConfigXML config)
Set up the logging system during startup |
static 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 |
static void |
setLookAndFeel(java.lang.String lnf)
set look & feel to system default |
void |
setMetacatURLString(java.lang.String mURL)
Set metacat URL string |
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 |
setProfileDontLogin(ConfigXML newProfile)
Set the profile for the currently logged in user, but does not popup a login dialog |
void |
setProfileDontLogin(java.lang.String newProfileName)
Set the profile associated with this framework based on its name, but does not popup a login dialog |
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
public static Morpho thisStaticInstance
public static boolean connectionBusy
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 setProfileDontLogin(ConfigXML newProfile)
newProfile
- the profile objectpublic void setProfile(java.lang.String newProfileName)
newProfileName
- the name of the new profile for the frameworkpublic void setProfileDontLogin(java.lang.String newProfileName)
newProfileName
- the name of the new profile for the frameworkpublic void cleanCache()
public void cleanTemp()
public 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 operation
public java.lang.String getSessionCookie()
public java.io.InputStream getMetacatInputStream(java.util.Properties prop)
prop
- the properties to be sent to Metacat
public 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 operation
public java.lang.String getMetacatString(java.util.Properties prop)
prop
- the properties to be sent to Metacat
public java.lang.String getUserName()
public java.lang.String getPassword()
public static boolean isConnected()
public boolean getSslStatus()
public boolean getNetworkStatus()
public static ConfigXML getConfiguration()
public ConfigXML getProfile()
public static java.lang.String getCurrentProfileName()
public java.util.Vector getTaxonSynonyms(java.lang.String taxonName)
taxonName
- String
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 send
public boolean logIn()
public void logOut()
public void logOutExit()
public void addConnectionListener(ConnectionListener listener)
listener
- a reference to the object to be notified of changes
ServiceExistsException
public void checkJavaVersion()
public static void main(java.lang.String[] args)
args
- Description of Parameterpublic static void createMorphoInstance()
public 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 errors
public static javax.xml.parsers.DocumentBuilder createDomParser()
public java.lang.String[] getProfilesList()
public void addProfileAddedListener(ProfileAddedListener listener)
listener
- the ProfileAddedListener
that is being
registered to receive callbackspublic void setMetacatURLString(java.lang.String mURL)
mURL
- Stringpublic java.lang.String getMetacatURLString()
public static void setLookAndFeel(java.lang.String lnf)
lnf
- The new LookAndFeel valuepublic static void initializeLogging(ConfigXML config)
config
- the configuration object for the application
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |