public class ReadRegistryMain
extends java.lang.Object
XmlJzReader, XmlCfg was created with XmlJzCfgAnalyzer
and is stored in registryMain.xml.cfg beside this class in jar.
XmlDataRegMain with its super class XmlDataRegMain_Base is used to store the data from XML in a semantic form.
XmlDataRegMain_Zbnf is used as facade class to store the data.
idxUnoLabel with the instance of ReadRegistryMain.UnoLabel
| Modifier and Type | Class and Description |
|---|---|
static class |
ReadRegistryMain.UnoLabel |
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.Map<java.lang.String,java.util.Map<java.lang.String,ReadRegistryMain.UnoLabel>> |
idxCmpnUno
Index only internally to explore in debug, which uno commands are assigned
to more as one text.
|
(package private) java.util.Map<java.lang.String,ReadRegistryMain.UnoLabel> |
idxUnoLabel
Index between the uno command as key and the human readable text,
which comes from a menu entry etc.
|
| Constructor and Description |
|---|
ReadRegistryMain()
empty ctor
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
prepareNode(XmlDataRegMain.Node xnode,
java.lang.String sNodeNamesParent,
java.lang.String sCmpn)
Prepare all <node>...</node> in XML:
if
XmlDataRegMain_Base.Node_Base.oor_name starts with ".uno" then it is a uno node. |
(package private) void |
prepareNodeUno(XmlDataRegMain.Node xnode,
java.lang.String sNodeNames,
java.lang.String sCmpn)
Called if a uno-node is found:
XmlDataRegMain_Base.Node_Base.oor_name starts with ".uno". |
(package private) void |
prepareRegistryNode(XmlDataRegMain data)
Iterates through the XML data, recursively,
for all
XmlDataRegMain_Base.oor_data
for all XmlDataRegMain_Base.Oor_data_Base.oor_component_data
for all XmlDataRegMain.XmlDataRegMain_Base.Oor_component_data_Base#node
calls prepareNode(org.vishia.libOffc.cfgui.XmlDataRegMain.Node, String, String)
|
void |
readPrepare(java.util.List<org.vishia.util.FileFunctions.FilePathnameExt> listFiles,
org.vishia.msgDispatch.LogMessage log)
The operation to read all given xcd an prepare the
idxUnoLabel. |
private XmlDataRegMain |
readRegistryMain(java.util.List<org.vishia.util.FileFunctions.FilePathnameExt> listFiles,
org.vishia.msgDispatch.LogMessage log)
Read and prepare the *.xcd XML files.
|
java.util.Map<java.lang.String,ReadRegistryMain.UnoLabel> idxUnoLabel
java.util.Map<java.lang.String,java.util.Map<java.lang.String,ReadRegistryMain.UnoLabel>> idxCmpnUno
public void readPrepare(java.util.List<org.vishia.util.FileFunctions.FilePathnameExt> listFiles,
org.vishia.msgDispatch.LogMessage log)
idxUnoLabel.
readRegistryMain(List, LogMessage) as XML reader wrapper, that uses the XmlJzReader concept.
prepareRegistryNode(XmlDataRegMain) which creates content of idxCmpnUno.
listFiles - all files to read.
This list is to be filled with FileFunctions.FilePathnameExt#parseWildcardZipPath(java.util.Collection, java.io.File, String, char).
It means it can be filled with several files given also with wild cards,
and if necessary also with a given path in the file to the inner XML, if the file is a zip file.
This capability is not used here, but the operation is also proper for XML in zip (can be used as template for the XmlJzReader).
The file to read is each FileFunctions.FilePathnameExt#file.
The FileFunctions.FilePathnameExt#sNamePath is null for this approach, can be set as path/to.xml in the zipfilelog - for logging.private XmlDataRegMain readRegistryMain(java.util.List<org.vishia.util.FileFunctions.FilePathnameExt> listFiles, org.vishia.msgDispatch.LogMessage log)
listFiles - all files to read. See readPrepare(List, LogMessage).log - for logvoid prepareRegistryNode(XmlDataRegMain data)
XmlDataRegMain_Base.oor_data
XmlDataRegMain_Base.Oor_data_Base.oor_component_data
XmlDataRegMain.XmlDataRegMain_Base.Oor_component_data_Base#node
prepareNode(org.vishia.libOffc.cfgui.XmlDataRegMain.Node, String, String)
data - The parsed XML data.void prepareNode(XmlDataRegMain.Node xnode, java.lang.String sNodeNamesParent, java.lang.String sCmpn)
XmlDataRegMain_Base.Node_Base.oor_name starts with ".uno" then it is a uno node.
Then calls prepareNodeUno(org.vishia.libOffc.cfgui.XmlDataRegMain.Node, String, String).
xnode - sNodeNamesParent - sCmpn - void prepareNodeUno(XmlDataRegMain.Node xnode, java.lang.String sNodeNames, java.lang.String sCmpn)
XmlDataRegMain_Base.Node_Base.oor_name starts with ".uno".
it sets one element of idxUnoLabel and also add in idxCmpnUno.xnode - The uno node from XMLsNodeNames - String build with all parent node names.sCmpn - String from the component as parent.