public class ConfigFetch
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigFetch.ENVIROMENT |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
baseJarFileDir |
java.io.BufferedWriter |
bw |
java.io.BufferedWriter |
bwhale |
protected static java.lang.String |
className |
protected static java.lang.String |
classPackage |
protected static org.dom4j.Document |
confDoc |
protected static java.lang.String |
configFile |
static java.lang.String |
DS |
static ConfigFetch.ENVIROMENT |
ENV |
protected static boolean |
ifLogger |
static ConfigFetch |
INSTANCE |
protected static java.util.Hashtable<java.lang.String,java.lang.String> |
listOfSchemas |
protected static java.util.Hashtable<java.lang.String,java.lang.String> |
listOfSchemasPaths |
static long |
mark |
protected static java.lang.String |
neptusTmpDir |
static short |
OS_ERROR |
static short |
OS_LINUX |
static short |
OS_OTHER |
static short |
OS_WINDOWS |
protected static java.lang.String[] |
parentPaths |
protected static boolean |
schemasInTempFile |
static long |
STARTTIME |
protected static java.awt.Component |
superParentFrame |
static java.util.Map<java.lang.String,java.lang.Long> |
timings |
Modifier and Type | Method and Description |
---|---|
static void |
benchmark(java.lang.String tag) |
static java.lang.String |
getActionMapSchemaLocation() |
static java.lang.String |
getAttributeTextByXPath(java.lang.String xpath2Attribute,
org.dom4j.Document doDocument) |
static java.lang.String |
getChecklistSchemaLocation() |
static java.lang.String |
getCompilationDate() |
static java.lang.String |
getConfigFile() |
static java.lang.String |
getConsoleSchemaLocation() |
static java.lang.String |
getCoordinateSystemSchemaLocation() |
static java.lang.String |
getCoordinateSystemsConfigLocation() |
static NeptusProperty.DistributionEnum |
getDistributionType() |
static java.lang.String |
getElementTextByXPath(java.lang.String xpath2Element,
org.dom4j.Document doDocument) |
static java.util.List<java.awt.Image> |
getIconImagesForFrames() |
static java.lang.String |
getLoggingPropertiesLocation()
returns the central properties file for log4j Loggers.
|
static java.lang.String |
getLoggingPropertiesType()
returns the central properties file type for log4j Loggers.
|
static java.lang.String |
getMapSchemaLocation() |
static java.lang.String |
getMiscSystemsConfigLocation() |
static java.lang.String |
getMiscSystemsSchemaLocation() |
static java.lang.String |
getMissionSchemaLocation() |
static long |
getNeptusInitializationTime() |
static java.lang.String |
getNeptusTmpDir() |
static java.lang.String |
getNeptusVersion() |
static short |
getOS() |
static java.lang.String |
getSaveAsCommentForXML() |
static java.lang.String |
getScmRev() |
static java.awt.Frame |
getSuperParentAsFrame() |
static java.awt.Component |
getSuperParentFrame() |
static java.lang.String |
getVehicleSchemaLocation() |
static java.util.LinkedList<java.lang.String> |
getVehiclesList() |
static java.lang.String |
getVersionExtendedInfoSimpleString() |
static java.util.Properties |
getVersionInfoAsProperties() |
static java.lang.String |
getVersionInfoAsString() |
static java.lang.String |
getVersionSimpleString() |
static boolean |
initialize() |
static boolean |
initialize(boolean ifLog) |
static boolean |
initialize(java.lang.String configFile) |
static boolean |
initialize(java.lang.String configFile,
boolean ifLog) |
static boolean |
isOnLockedMode() |
static boolean |
isOSEqual(short os) |
boolean |
load()
Loads the configuration file.
|
boolean |
load(java.lang.String configFile)
Loads the configuration file.
|
static void |
main(java.lang.String[] args) |
static void |
mark(java.lang.String tag) |
protected org.dom4j.Document |
readConfigFile(java.lang.String configFile) |
static java.lang.String |
resolvePath(java.lang.String path)
Tries to resolve a relative path.
|
static java.lang.String |
resolvePathBasedOnConfigFile(java.lang.String filePath)
Resolves a path based on a parent or the original path if it's already absolute.
|
static java.lang.String |
resolvePathWithParent(java.lang.String parentPath,
java.lang.String filePath)
Resolves a path based on a parent or the original path if it's alredy absolute.
|
static boolean |
setDistributionType(NeptusProperty.DistributionEnum dist) |
boolean |
setFile(java.lang.String configFile)
This method set's a new file name.
|
static void |
setOnLockedMode(boolean onLockedMode) |
static void |
setSuperParentFrame(java.awt.Component superParentFrame) |
static void |
setSuperParentFrameForced(java.awt.Component superParentFrame) |
public static final short OS_ERROR
public static final short OS_WINDOWS
public static final short OS_LINUX
public static final short OS_OTHER
public static final java.lang.String DS
public static final long STARTTIME
public static long mark
public static java.util.Map<java.lang.String,java.lang.Long> timings
protected static boolean schemasInTempFile
protected static final java.util.Hashtable<java.lang.String,java.lang.String> listOfSchemas
protected static final java.util.Hashtable<java.lang.String,java.lang.String> listOfSchemasPaths
public static ConfigFetch.ENVIROMENT ENV
protected static final java.lang.String classPackage
protected static final java.lang.String className
protected static org.dom4j.Document confDoc
protected static java.lang.String configFile
protected static java.lang.String baseJarFileDir
protected static boolean ifLogger
protected static final java.lang.String neptusTmpDir
protected static java.lang.String[] parentPaths
protected static java.awt.Component superParentFrame
public java.io.BufferedWriter bw
public java.io.BufferedWriter bwhale
public static ConfigFetch INSTANCE
public static boolean initialize()
ConfigFetch()
public static boolean initialize(java.lang.String configFile, boolean ifLog)
ConfigFetch(String, boolean)
public static boolean initialize(boolean ifLog)
ConfigFetch(boolean)
public static boolean initialize(java.lang.String configFile)
ConfigFetch(String)
public boolean setFile(java.lang.String configFile)
load(String)
.configFile
- Configuration file namepublic boolean load(java.lang.String configFile)
configFile
- Configuration file namepublic boolean load()
public static java.lang.String resolvePath(java.lang.String path)
init()
.</li> <li>Looks in one
level down from the path given by init()
.</li> <li>Looks in the path given by
init()
+ "../classes".</li> <li>Looks in the path given by init()
+
"../config".</li> <li>Looks in the path given by init()
+ "../files".</li>
<li>Looks in the path given by init()
+ "../images".</li> <li>Looks in two level down
from the path given by init()
.</li> </ul>path
- Relative path to resolve.public static java.lang.String resolvePathWithParent(java.lang.String parentPath, java.lang.String filePath)
parentPath
- filePath
- public static java.lang.String resolvePathBasedOnConfigFile(java.lang.String filePath)
getConfigFile()
filePath
- #resolvePathWithParent(String, String)}
public static java.lang.String getConfigFile()
public static java.lang.String getElementTextByXPath(java.lang.String xpath2Element, org.dom4j.Document doDocument)
xpath2Element
- doDocument
- public static java.lang.String getAttributeTextByXPath(java.lang.String xpath2Attribute, org.dom4j.Document doDocument)
xpath2Attribute
- doDocument
- protected org.dom4j.Document readConfigFile(java.lang.String configFile)
ConfigFile
- public static java.lang.String getLoggingPropertiesLocation()
public static java.lang.String getLoggingPropertiesType()
public static java.lang.String getCoordinateSystemsConfigLocation()
public static java.lang.String getMiscSystemsConfigLocation()
public static java.util.LinkedList<java.lang.String> getVehiclesList()
public static java.lang.String getMissionSchemaLocation()
public static java.lang.String getVehicleSchemaLocation()
public static java.lang.String getMapSchemaLocation()
public static java.lang.String getCoordinateSystemSchemaLocation()
public static java.lang.String getChecklistSchemaLocation()
public static java.lang.String getMiscSystemsSchemaLocation()
public static java.lang.String getConsoleSchemaLocation()
public static java.lang.String getActionMapSchemaLocation()
public static java.util.Properties getVersionInfoAsProperties()
public static java.lang.String getVersionSimpleString()
public static java.lang.String getVersionInfoAsString()
public static java.lang.String getVersionExtendedInfoSimpleString()
public static java.lang.String getSaveAsCommentForXML()
public static java.awt.Component getSuperParentFrame()
public static java.awt.Frame getSuperParentAsFrame()
public static void setSuperParentFrame(java.awt.Component superParentFrame)
superParentFrame
- The superParentFrame to set.public static void setSuperParentFrameForced(java.awt.Component superParentFrame)
superParentFrame
- The superParentFrame to set.public static short getOS()
public static boolean isOSEqual(short os)
os
- The shor representing the OS to test.public static java.lang.String getNeptusVersion()
public static java.lang.String getCompilationDate()
public static java.lang.String getScmRev()
public static long getNeptusInitializationTime()
public static java.lang.String getNeptusTmpDir()
public static boolean isOnLockedMode()
public static void setOnLockedMode(boolean onLockedMode)
public static java.util.List<java.awt.Image> getIconImagesForFrames()
public static void mark(java.lang.String tag)
public static void benchmark(java.lang.String tag)
public static NeptusProperty.DistributionEnum getDistributionType()
public static boolean setDistributionType(NeptusProperty.DistributionEnum dist)
dist
- public static void main(java.lang.String[] args)
args
- Copyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.