Resource Registry
resRegistry ¶
Registry class for managing jps resources.
Attributes:
Name | Type | Description |
---|---|---|
resReg |
dict
|
resource registry dictionary |
Source code in JPS_BASE_LIB/python_wrapper/twa/resRegistry/resRegistry.py
addResToReg ¶
Adds a resource to the registry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resName
|
str
|
resource name |
required |
resLoc
|
str
|
path to the resource directory |
required |
resMainJarFile
|
str
|
name of the main jar file, if not provided the first jar found in the resource dir will be selected, if no jars are present it is set to None |
None
|
Source code in JPS_BASE_LIB/python_wrapper/twa/resRegistry/resRegistry.py
removeResFromReg ¶
Removes a resource from the registry.
Note, it removes all the resource files as well.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resName
|
str
|
resource name |
required |
Source code in JPS_BASE_LIB/python_wrapper/twa/resRegistry/resRegistry.py
listRes ¶
cleanReg ¶
Cleans the registry.
Use with caution. The command removes:
all registry entries with no corresponding resource files
all resource files with no corresponding registry entries
Source code in JPS_BASE_LIB/python_wrapper/twa/resRegistry/resRegistry.py
getResMainFilePath ¶
Returns an absolute path to the resource main jar file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resName
|
str
|
resource name |
required |