edu.ucsb.nceas.morpho.plugins.datapackagewizard
Class WizardSettings

java.lang.Object
  extended byedu.ucsb.nceas.morpho.plugins.datapackagewizard.WizardSettings

public class WizardSettings
extends java.lang.Object

WizardSettings


Field Summary
static int ACCESS_PAGE_AUTHSYS
           
static int ACCESS_PAGE_GROUP
           
static int ACCESS_PAGE_USER
           
static int ATTR_DIALOG_HEIGHT
           
static java.lang.String BASIC_UNIT_TYPES_XPATH
           
static java.awt.Font BUTTON_FONT
           
static java.awt.Color BUTTON_TEXT_COLOR
           
protected static java.lang.String CANCEL_BUTTON_TEXT
           
static java.lang.String[] commonTaxonRanks
           
static java.awt.Dimension DEFAULT_SPACER_DIMS
           
static int DIALOG_HEIGHT
           
static int DIALOG_WIDTH
           
protected static java.lang.String EML200_SCHEMA_NAMESPACE
           
protected static java.lang.String EML201_SCHEMA_NAMESPACE
           
static short ENTITY_DATATABLE
           
protected static java.lang.String ENTITY_WIZ_FIRST_PAGE_ID
           
static java.lang.String FINISH_BUTTON_TEXT
           
static java.lang.String HEX_VALUE_SPACE
           
static java.lang.String HEX_VALUE_TAB
           
static java.lang.String HTML_EXAMPLE_FONT_CLOSING
           
static java.lang.String HTML_EXAMPLE_FONT_OPENING
           
static java.lang.String HTML_FONT_OPENING
           
static java.lang.String HTML_NO_TABLE_CLOSING
           
static java.lang.String HTML_NO_TABLE_OPENING
           
static java.lang.String HTML_TABLE_LABEL_CLOSING
           
static java.lang.String HTML_TABLE_LABEL_OPENING
           
static java.lang.String IMPORT_BUTTON_TEXT
           
static short INLINE
           
static java.awt.Dimension LIST_BUTTON_DIMS
           
static java.awt.Dimension LIST_BUTTON_DIMS_SMALL
           
static int MAX_IMPORTED_ROWS_DISPLAYED_IN_CODE_IMPORT
           
static java.awt.Dimension NAV_BUTTON_DIMS
           
protected static java.lang.String NEW_EML200_DOCUMENT_TEXT
           
protected static java.lang.String NEW_EML201_DOCUMENT_TEXT
           
protected static java.lang.String NEXT_BUTTON_TEXT
           
static short NODATA
           
static java.lang.String NUMBER_OF_STEPS
           
static int NUMBER_OF_TAXON_RANKS
           
static short OFFLINE
           
protected static java.lang.String OK_BUTTON_TEXT
           
static short ONLINE
           
protected static java.lang.String PACKAGE_WIZ_FIRST_PAGE_ID
           
static int PADDING
           
static java.lang.String PREV_BUTTON_TEXT
           
static java.lang.String[] stdTaxonRanks
           
protected static java.awt.Font SUBTITLE_FONT
           
protected static java.awt.Color SUBTITLE_TEXT_COLOR
           
static java.lang.String SUMMARY_TEXT_INLINE
           
static java.lang.String SUMMARY_TEXT_NODATA
           
static java.lang.String SUMMARY_TEXT_OFFLINE
           
static java.lang.String SUMMARY_TEXT_ONLINE
           
protected static java.lang.String TEMP_REFS_EML200_DOCUMENT_TEXT
           
protected static java.lang.String TEMP_REFS_EML201_DOCUMENT_TEXT
           
protected static java.awt.Font TITLE_FONT
           
protected static java.awt.Color TITLE_TEXT_COLOR
           
static java.awt.Color TOP_PANEL_BG_COLOR
           
protected static java.awt.Dimension TOP_PANEL_DIMS
           
static java.awt.Font WIZARD_CONTENT_BOLD_FONT
           
static java.awt.Font WIZARD_CONTENT_FONT
           
static java.awt.Color WIZARD_CONTENT_HILITE_BG_COLOR
           
static java.awt.Color WIZARD_CONTENT_HILITE_FG_COLOR
           
static java.awt.Dimension WIZARD_CONTENT_LABEL_DIMS
           
static java.awt.Color WIZARD_CONTENT_REQD_TEXT_COLOR
           
static java.awt.Dimension WIZARD_CONTENT_SINGLE_LINE_DIMS
           
static java.awt.Color WIZARD_CONTENT_TEXT_COLOR
           
static java.awt.Dimension WIZARD_CONTENT_TEXTFIELD_DIMS
           
protected static int WIZARD_HEIGHT
           
static java.awt.Dimension WIZARD_REDUCED_CONTENT_LABEL_DIMS
           
protected static int WIZARD_WIDTH
           
protected static int WIZARD_X_COORD
           
protected static int WIZARD_Y_COORD
           
 
Constructor Summary
WizardSettings()
           
 
Method Summary
static java.lang.String getDataLocation()
          gets data location to be used in summary text that will be shown on the page of the wizard.
static java.util.List getDefinitionsForUnitType(java.lang.String unitType)
          returns the definition for a given unit type as a list of terms.
static java.lang.String getDisplayFormOfUnitType(java.lang.String unitType)
          returns the display string for a given unit Type.
static int getIndexOfTaxonRank(java.lang.String rank)
           
static java.lang.String getPreferredType(java.lang.String unitType)
          returns the preferred unit for each unitType; to be used for setting the default unit type
static java.lang.String[] getSIUnits()
          from the eml unit dictionary, gets all the units that are the SI units of some unit tpye
static java.lang.String getStandardFormOfUnitType(java.lang.String unitType)
           
static java.lang.String getSummaryText()
          gets summary text that will be shown on the final page of the wizard
static OrderedMap getSupportedMIMETypesForEntity(short entityType)
          given an entityType, returns an OrderedMap whose keys contain the human-readable display names for all the allowable MIME types (for the given entity type), and whose corresponding values are the actual MIME types themselves.
static java.util.List getTaxonHierarchyTillIndex(int index)
           
static java.lang.String getUniqueID()
          gets a String id that is guaranteed to be unique within the current document (ie document scope).
static java.lang.String[] getUnitDictionaryBasicUnitTypes()
          from the eml unit dictionary, gets only the fundamental unitTypes
static java.lang.String[] getUnitDictionaryUnitsOfType(java.lang.String unitType)
          from the eml unit dictionary, gets all the units of the given unitType
static java.lang.String[] getUnitDictionaryUnitTypes()
          from the eml unit dictionary, gets all the unitTypes (both fundamental and derived)
static void insertObjectIntoArray(java.lang.Object[] arr, java.lang.Object value, java.lang.Object[] newArr)
           
static boolean isCustomUnit(java.lang.String type, java.lang.String unit)
           
static boolean isFloat(java.lang.String numberString)
           
static void setDataLocation(java.lang.String loc)
          sets data location to be used in summary text that will be shown on the page of the wizard.
static void setSummaryText(java.lang.String text)
          sets summary text that will be shown on the final page of the wizard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASIC_UNIT_TYPES_XPATH

public static final java.lang.String BASIC_UNIT_TYPES_XPATH
See Also:
Constant Field Values

ENTITY_DATATABLE

public static final short ENTITY_DATATABLE
See Also:
Constant Field Values

WIZARD_X_COORD

protected static final int WIZARD_X_COORD
See Also:
Constant Field Values

WIZARD_Y_COORD

protected static final int WIZARD_Y_COORD
See Also:
Constant Field Values

WIZARD_WIDTH

protected static final int WIZARD_WIDTH
See Also:
Constant Field Values

WIZARD_HEIGHT

protected static final int WIZARD_HEIGHT
See Also:
Constant Field Values

DIALOG_WIDTH

public static final int DIALOG_WIDTH
See Also:
Constant Field Values

DIALOG_HEIGHT

public static final int DIALOG_HEIGHT
See Also:
Constant Field Values

ATTR_DIALOG_HEIGHT

public static final int ATTR_DIALOG_HEIGHT
See Also:
Constant Field Values

PACKAGE_WIZ_FIRST_PAGE_ID

protected static final java.lang.String PACKAGE_WIZ_FIRST_PAGE_ID
See Also:
Constant Field Values

ENTITY_WIZ_FIRST_PAGE_ID

protected static final java.lang.String ENTITY_WIZ_FIRST_PAGE_ID
See Also:
Constant Field Values

TOP_PANEL_BG_COLOR

public static final java.awt.Color TOP_PANEL_BG_COLOR

TOP_PANEL_DIMS

protected static final java.awt.Dimension TOP_PANEL_DIMS

PADDING

public static final int PADDING
See Also:
Constant Field Values

DEFAULT_SPACER_DIMS

public static final java.awt.Dimension DEFAULT_SPACER_DIMS

TITLE_FONT

protected static final java.awt.Font TITLE_FONT

TITLE_TEXT_COLOR

protected static final java.awt.Color TITLE_TEXT_COLOR

SUBTITLE_FONT

protected static final java.awt.Font SUBTITLE_FONT

SUBTITLE_TEXT_COLOR

protected static final java.awt.Color SUBTITLE_TEXT_COLOR

BUTTON_FONT

public static final java.awt.Font BUTTON_FONT

BUTTON_TEXT_COLOR

public static final java.awt.Color BUTTON_TEXT_COLOR

WIZARD_CONTENT_FONT

public static final java.awt.Font WIZARD_CONTENT_FONT

WIZARD_CONTENT_BOLD_FONT

public static final java.awt.Font WIZARD_CONTENT_BOLD_FONT

WIZARD_CONTENT_TEXT_COLOR

public static final java.awt.Color WIZARD_CONTENT_TEXT_COLOR

WIZARD_CONTENT_REQD_TEXT_COLOR

public static final java.awt.Color WIZARD_CONTENT_REQD_TEXT_COLOR

WIZARD_CONTENT_HILITE_BG_COLOR

public static final java.awt.Color WIZARD_CONTENT_HILITE_BG_COLOR

WIZARD_CONTENT_HILITE_FG_COLOR

public static final java.awt.Color WIZARD_CONTENT_HILITE_FG_COLOR

WIZARD_CONTENT_LABEL_DIMS

public static final java.awt.Dimension WIZARD_CONTENT_LABEL_DIMS

WIZARD_REDUCED_CONTENT_LABEL_DIMS

public static final java.awt.Dimension WIZARD_REDUCED_CONTENT_LABEL_DIMS

WIZARD_CONTENT_TEXTFIELD_DIMS

public static final java.awt.Dimension WIZARD_CONTENT_TEXTFIELD_DIMS

WIZARD_CONTENT_SINGLE_LINE_DIMS

public static final java.awt.Dimension WIZARD_CONTENT_SINGLE_LINE_DIMS

HTML_FONT_OPENING

public static final java.lang.String HTML_FONT_OPENING
See Also:
Constant Field Values

HTML_EXAMPLE_FONT_OPENING

public static final java.lang.String HTML_EXAMPLE_FONT_OPENING
See Also:
Constant Field Values

HTML_EXAMPLE_FONT_CLOSING

public static final java.lang.String HTML_EXAMPLE_FONT_CLOSING
See Also:
Constant Field Values

HTML_TABLE_LABEL_OPENING

public static final java.lang.String HTML_TABLE_LABEL_OPENING
See Also:
Constant Field Values

HTML_TABLE_LABEL_CLOSING

public static final java.lang.String HTML_TABLE_LABEL_CLOSING
See Also:
Constant Field Values

HTML_NO_TABLE_OPENING

public static final java.lang.String HTML_NO_TABLE_OPENING
See Also:
Constant Field Values

HTML_NO_TABLE_CLOSING

public static final java.lang.String HTML_NO_TABLE_CLOSING
See Also:
Constant Field Values

NAV_BUTTON_DIMS

public static final java.awt.Dimension NAV_BUTTON_DIMS

LIST_BUTTON_DIMS

public static final java.awt.Dimension LIST_BUTTON_DIMS

LIST_BUTTON_DIMS_SMALL

public static final java.awt.Dimension LIST_BUTTON_DIMS_SMALL

IMPORT_BUTTON_TEXT

public static final java.lang.String IMPORT_BUTTON_TEXT
See Also:
Constant Field Values

FINISH_BUTTON_TEXT

public static final java.lang.String FINISH_BUTTON_TEXT
See Also:
Constant Field Values

PREV_BUTTON_TEXT

public static final java.lang.String PREV_BUTTON_TEXT
See Also:
Constant Field Values

NEXT_BUTTON_TEXT

protected static final java.lang.String NEXT_BUTTON_TEXT
See Also:
Constant Field Values

CANCEL_BUTTON_TEXT

protected static final java.lang.String CANCEL_BUTTON_TEXT
See Also:
Constant Field Values

OK_BUTTON_TEXT

protected static final java.lang.String OK_BUTTON_TEXT
See Also:
Constant Field Values

NUMBER_OF_STEPS

public static java.lang.String NUMBER_OF_STEPS

ACCESS_PAGE_AUTHSYS

public static final int ACCESS_PAGE_AUTHSYS
See Also:
Constant Field Values

ACCESS_PAGE_GROUP

public static final int ACCESS_PAGE_GROUP
See Also:
Constant Field Values

ACCESS_PAGE_USER

public static final int ACCESS_PAGE_USER
See Also:
Constant Field Values

MAX_IMPORTED_ROWS_DISPLAYED_IN_CODE_IMPORT

public static final int MAX_IMPORTED_ROWS_DISPLAYED_IN_CODE_IMPORT
See Also:
Constant Field Values

EML200_SCHEMA_NAMESPACE

protected static final java.lang.String EML200_SCHEMA_NAMESPACE
See Also:
Constant Field Values

EML201_SCHEMA_NAMESPACE

protected static final java.lang.String EML201_SCHEMA_NAMESPACE
See Also:
Constant Field Values

NEW_EML200_DOCUMENT_TEXT

protected static final java.lang.String NEW_EML200_DOCUMENT_TEXT
See Also:
Constant Field Values

TEMP_REFS_EML200_DOCUMENT_TEXT

protected static final java.lang.String TEMP_REFS_EML200_DOCUMENT_TEXT
See Also:
Constant Field Values

NEW_EML201_DOCUMENT_TEXT

protected static final java.lang.String NEW_EML201_DOCUMENT_TEXT
See Also:
Constant Field Values

TEMP_REFS_EML201_DOCUMENT_TEXT

protected static final java.lang.String TEMP_REFS_EML201_DOCUMENT_TEXT
See Also:
Constant Field Values

INLINE

public static final short INLINE
See Also:
Constant Field Values

ONLINE

public static final short ONLINE
See Also:
Constant Field Values

OFFLINE

public static final short OFFLINE
See Also:
Constant Field Values

NODATA

public static final short NODATA
See Also:
Constant Field Values

SUMMARY_TEXT_INLINE

public static final java.lang.String SUMMARY_TEXT_INLINE
See Also:
Constant Field Values

SUMMARY_TEXT_ONLINE

public static final java.lang.String SUMMARY_TEXT_ONLINE
See Also:
Constant Field Values

SUMMARY_TEXT_OFFLINE

public static final java.lang.String SUMMARY_TEXT_OFFLINE
See Also:
Constant Field Values

SUMMARY_TEXT_NODATA

public static final java.lang.String SUMMARY_TEXT_NODATA
See Also:
Constant Field Values

HEX_VALUE_TAB

public static final java.lang.String HEX_VALUE_TAB
See Also:
Constant Field Values

HEX_VALUE_SPACE

public static final java.lang.String HEX_VALUE_SPACE
See Also:
Constant Field Values

stdTaxonRanks

public static final java.lang.String[] stdTaxonRanks

commonTaxonRanks

public static final java.lang.String[] commonTaxonRanks

NUMBER_OF_TAXON_RANKS

public static final int NUMBER_OF_TAXON_RANKS
See Also:
Constant Field Values
Constructor Detail

WizardSettings

public WizardSettings()
Method Detail

setSummaryText

public static void setSummaryText(java.lang.String text)
sets summary text that will be shown on the final page of the wizard. NOTE that this method makes an internal call to setDataLocation() and sets the dataLocation to null; therefore, any calls to setDataLocation() shoudl be made *AFTER* calling this function!

Parameters:
text - the String to be displayed. Must be one of the final static Strings defined elsewhere in this class, named SUMMARY_TEXT_***, otherwise text will be unchanged

getSummaryText

public static java.lang.String getSummaryText()
gets summary text that will be shown on the final page of the wizard

Returns:
text the summary String to be displayed.

setDataLocation

public static void setDataLocation(java.lang.String loc)
sets data location to be used in summary text that will be shown on the page of the wizard. For Online data, this would be a URL, and for inline data, it could be a file:// url or the filename or something similar.

Parameters:
loc - the location to be displayed. May be null or empty, or may contain only whitespace characters.

getDataLocation

public static java.lang.String getDataLocation()
gets data location to be used in summary text that will be shown on the page of the wizard. For Online data, this would be a URL, and for inline data, it could be a file:// url or the filename or something similar. Note that text should be displayed only if the summary text is set to SUMMARY_TEXT_INLINE or SUMMARY_TEXT_ONLINE. NOTE that this method may return a null value or an empty value for the location string, if that's what the user has set, so the summary should default gracefully and not show a location in such cases.

Returns:
the String location to be displayed. May be null or empty, or may contain only whitespace characters.

getUniqueID

public static java.lang.String getUniqueID()
gets a String id that is guaranteed to be unique within the current document (ie document scope). Note that the ID String is a timestamp in milliseconds, so all IDs generated by this method runnign on a given machine will always be unique with respect to all other IDs generated by this method, provided the system clock is not reset. Absolute "global" uniqueness is not guaranteed, and cannot be assumed

Returns:
a String id that is guaranteed to be unique within the current document (ie document scope)

getSIUnits

public static java.lang.String[] getSIUnits()
from the eml unit dictionary, gets all the units that are the SI units of some unit tpye

Returns:
String array containing the SI units in the unitdictionary

getUnitDictionaryBasicUnitTypes

public static java.lang.String[] getUnitDictionaryBasicUnitTypes()
from the eml unit dictionary, gets only the fundamental unitTypes

Returns:
String array containing the fundamental unitTypes in the unitdictionary

getUnitDictionaryUnitTypes

public static java.lang.String[] getUnitDictionaryUnitTypes()
from the eml unit dictionary, gets all the unitTypes (both fundamental and derived)

Returns:
String array containing all the unitTypes in the unitdictionary

getUnitDictionaryUnitsOfType

public static java.lang.String[] getUnitDictionaryUnitsOfType(java.lang.String unitType)
from the eml unit dictionary, gets all the units of the given unitType

Parameters:
unitType - the String representation of the unitType to look for
Returns:
String array containing all the units in the unitdictionary that have the given unitType

getDisplayFormOfUnitType

public static java.lang.String getDisplayFormOfUnitType(java.lang.String unitType)
returns the display string for a given unit Type. Display string has words with the first letter capitalized. For example, for the unit type currentDensity, it would return the string "Current Density"

Parameters:
unitType - the String representation of the unitType to look for
Returns:
display String for the given unit type

getStandardFormOfUnitType

public static java.lang.String getStandardFormOfUnitType(java.lang.String unitType)

insertObjectIntoArray

public static void insertObjectIntoArray(java.lang.Object[] arr,
                                         java.lang.Object value,
                                         java.lang.Object[] newArr)

getDefinitionsForUnitType

public static java.util.List getDefinitionsForUnitType(java.lang.String unitType)
returns the definition for a given unit type as a list of terms. Each term is a 2-element list consisting of a Fundamental unit type and the power that it is raised to

Parameters:
unitType - the String representation of the unitType to look for
Returns:
List of lists of the basic units and powers, that define this unit

getPreferredType

public static java.lang.String getPreferredType(java.lang.String unitType)
returns the preferred unit for each unitType; to be used for setting the default unit type


isCustomUnit

public static boolean isCustomUnit(java.lang.String type,
                                   java.lang.String unit)

getSupportedMIMETypesForEntity

public static OrderedMap getSupportedMIMETypesForEntity(short entityType)
given an entityType, returns an OrderedMap whose keys contain the human-readable display names for all the allowable MIME types (for the given entity type), and whose corresponding values are the actual MIME types themselves. To add more MIME types,

Parameters:
entityType - the constant representing the entity type whose allowable MIME types are sought. Currently, only possible values are: WizardSettings.ENTITY_DATATABLE
Returns:
Map whose keys contain the human-readable display names for all the allowable MIME types (for the given entity type), and whose corresponding values are the actual MIME types themselves.
See Also:
http://www.iana.org/assignments/media-types/ or /etc/mime.types on linux

isFloat

public static boolean isFloat(java.lang.String numberString)

getIndexOfTaxonRank

public static int getIndexOfTaxonRank(java.lang.String rank)

getTaxonHierarchyTillIndex

public static java.util.List getTaxonHierarchyTillIndex(int index)


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