Class ImportConfig


  • public class ImportConfig
    extends java.lang.Object
    Utility class which configures the Import.
    Since:
    Beta4.1
    • Constructor Detail

      • ImportConfig

        public ImportConfig()
        Simplest constructor which use calls ImportConfig(File) with null.
      • ImportConfig

        public ImportConfig​(java.util.prefs.Preferences prefs,
                            IniFileLoader ini,
                            java.util.Properties props)
        Complete constructor. All values can be null.
        Parameters:
        prefs - user and system preference and configuration data
        ini - loads importer.ini or other specified file
        props - a Java properties object overriding other sources of preferences and configuration data
    • Method Detail

      • getBioFormatsVersion

        public java.lang.String getBioFormatsVersion()
      • getOmeroVersion

        public java.lang.String getOmeroVersion()
      • fillVersionInfo

        public void fillVersionInfo​(java.util.List<NamedValue> versionInfo)
        Note useful version information that can be extracted from this system, as provenance that is useful for debugging.
        Parameters:
        versionInfo - the map into which version information is to be added
      • configureDebug

        public void configureDebug​(java.lang.String levelString)
        Modifies the logging level of everything under the ome.formats, ome.services.blitz, ome.system and loci packages hierarchically.
        Parameters:
        levelString - the level to set or, if null, then the initial debug level is used as before having been changed.
      • createStore

        public OMEROMetadataStoreClient createStore()
                                             throws java.lang.Exception
        Create and return a new OMEROMetadataStoreClient
        Returns:
        a new OMEROMetadataStoreClient
        Throws:
        java.lang.Exception - if the creation failed
      • isUpgradeNeeded

        public boolean isUpgradeNeeded()
        Check online to see if this is the current version
        Returns:
        if it is not the current version
      • canLogin

        public boolean canLogin()
        Confirm all information for login is supplied
        Returns:
        true if all is ok
      • getLogFile

        public java.lang.String getLogFile()
        Returns:
        ini log file
      • getHomeUrl

        public java.lang.String getHomeUrl()
        Returns:
        ini home URL
      • getForumUrl

        public java.lang.String getForumUrl()
        Returns:
        ini forum URL
      • getAppTitle

        public java.lang.String getAppTitle()
        Returns:
        ini application title
      • getForceFileArchiveOn

        public boolean getForceFileArchiveOn()
        Returns:
        ini getForceFileArchiveOn
      • getStaticDisableHistory

        public boolean getStaticDisableHistory()
        Returns:
        ini getStaticDisableHistory
      • getUserDisableHistory

        public boolean getUserDisableHistory()
        Returns:
        ini getUserDisableHistory
      • setUserDisableHistory

        public void setUserDisableHistory​(boolean b)
        Parameters:
        b - - true if Quaqua should be used
      • getVersionNumber

        public java.lang.String getVersionNumber()
        Returns:
        ini version note
      • setVersionNumber

        public void setVersionNumber​(java.lang.String s)
      • getIniVersionNumber

        public java.lang.String getIniVersionNumber()
        Returns:
        ini version number
      • getUserSettingsDirectory

        public java.lang.String getUserSettingsDirectory()
        Returns:
        ini user settings directory
      • getUseQuaqua

        public boolean getUseQuaqua()
        Returns:
        ini option for if Qquaqua should be use for Macs
      • setUseQuaqua

        public void setUseQuaqua​(boolean b)
        Parameters:
        b - - true if Quaqua should be used
      • setDebugLevel

        public void setDebugLevel​(int level)
        Parameters:
        level - - default debug level
      • getDebugLevel

        public int getDebugLevel()
        Returns:
        current debug level
      • getUIBounds

        public java.awt.Rectangle getUIBounds()
        Returns:
        UI bounds for application window
      • setUIBounds

        public void setUIBounds​(java.awt.Rectangle bounds)
        Parameters:
        bounds - - set UI bounds for application window
      • getFeedbackUrl

        public java.lang.String getFeedbackUrl()
        Returns:
        feedback URL for QA system
      • getTokenUrl

        public java.lang.String getTokenUrl()
        Returns:
        token URL for QA system
      • getUploaderUrl

        public java.lang.String getUploaderUrl()
        Returns:
        upload URL for QA system
      • getUserFullPath

        @Deprecated
        public boolean getUserFullPath()
        Deprecated.
        Returns:
        ini user full path
      • setUserFullPath

        @Deprecated
        public void setUserFullPath​(boolean b)
        Deprecated.
        Parameters:
        b - ini user full path
      • getCustomImageNaming

        public boolean getCustomImageNaming()
        Returns:
        custom image naming
      • setCustomImageNaming

        public void setCustomImageNaming​(boolean b)
        Parameters:
        b - custom image naming
      • getNumOfDirectories

        public int getNumOfDirectories()
        Returns:
        number of directories
      • setNumOfDirectories

        public void setNumOfDirectories​(int i)
        Parameters:
        i - number of directories
      • prompt

        protected <T> void prompt​(ImportConfig.Value<T> value,
                                  java.lang.String prompt,
                                  boolean hide)
        Build prompt
        Type Parameters:
        T - the kind of value contained by the "value" argument
        Parameters:
        value - the value
        prompt - the prompt
        hide - use *s for characters
      • requestFromUser

        public void requestFromUser()
        if can't log in request needed information
      • map

        public java.util.Map<java.lang.String,​java.lang.String> map()
      • loadGui

        public void loadGui()
        Loads gui specific values for which it makes sense to have a preferences values.
        See Also:
        saveAll()
      • saveGui

        public void saveGui()
        Saves gui specific values for which it makes sense to have a preferences values.
        See Also:
        saveAll()
      • loadAll

        public void loadAll()
        Loads all the values for which it makes sense to have a preferences values.
        See Also:
        saveAll()
      • saveAll

        public void saveAll()
        See Also:
        loadAll()