Class ContextBase
java.lang.Object
org.ampere.base.util.ContextBase
- All Implemented Interfaces:
ContextDefinition,PACTEdef
Configuration and environnement management
- Author:
- hmorel
-
Field Summary
FieldsFields inherited from interface org.ampere.base.util.ContextDefinition
ALL_RESOURCE, CONFIG_DIR, DBX, DEBUG_FEATURES, EMBEDDED_RESOURCE, ERROR, EXAMPLE_DIR, LOCAL_RESOURCE, PACTE_HOME, PHYSICS, PHYSICS_DTD, PXD_DTD, RSCR_COLOR_CSS, RSRC_PHYSICS, RSRC_PHYSICS_XML, SELFDOC_DTD, SYNTAX, SYSTEM_RESOURCE, TEST_DATA, TEXT_EXTENDFields inherited from interface org.ampere.base.util.PACTEdef
AMBIGUOUS, DOUBLE_TAG, FREQUENCY_NAME, FREQUENCY_TAG, TIME_NAME, TIME_TAG, UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfigType(boolean system) static Filestatic Filestatic PrintWriterstatic Filestatic InputSourcegetInputSource(int res) static StringgetOSname(int osCode) PACTE HOME directory is the installation directory that containts data directory.PACTE TEST directory is the local directory that containts test, examples and test data directories.static FilegetResource(int res) static ContextBasestatic Filestatic FilebooleanbooleanisLocalConfigurated(boolean validated) booleanisSystemConfigurated(boolean validated) voidlogMessage(String message) static booleanmatchRelativePath(String relative, String absolute) test if a relative path matches an absolute onestatic voidRegister a feature use in a given methodstatic voidvoidsetLocalPacteTest(File ptest) voidstartLog()static voidVerify the PACTE configuration
-
Field Details
-
SYSTEM_LINUX
public static final int SYSTEM_LINUX- See Also:
-
SYSTEM_WINDOWS
public static final int SYSTEM_WINDOWS- See Also:
-
-
Constructor Details
-
ContextBase
protected ContextBase()
-
-
Method Details
-
getSingleton
-
setDefaultOutput
-
getDefaultOutput
-
isSystemConfigurated
public boolean isSystemConfigurated(boolean validated) -
isLocalConfigurated
public boolean isLocalConfigurated(boolean validated) -
isConfigurated
public boolean isConfigurated() -
setLocalPacteTest
-
getSystemPactePropertyFile
-
getDataDirectory
-
getExampleDirectory
-
getPacteHome
PACTE HOME directory is the installation directory that containts data directory.- Returns:
- the PACTE home directory
-
getPacteTest
PACTE TEST directory is the local directory that containts test, examples and test data directories.- Returns:
- the PACTE test directory
-
getLibDir
- Returns:
- the local library directory.
-
getResource
-
getInputSource
-
getOSname
-
getConfigType
-
getUserDir
- Returns:
- the current user directory
-
getDataUserDir
- Returns:
- the masked PACTEdef directory in the user directory
-
matchRelativePath
-
getTestDataDirectory
- Returns:
- the test data directory, for debugging purpose
-
register
-
startLog
public void startLog() -
logMessage
-
verifyConfig
public static void verifyConfig()Verify the PACTE configuration
-