public static class XmlCfg.XmlCfgNode
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.Map<java.lang.String,DataAccess.IntegerIx> |
allArgNames
Argument names from attributes which are used for the new_<&element>
but also 4 possible standard argument names: tag, name, value, text.
|
(package private) java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> |
attribs
Key (attribute name with xmlns:name) and reflection path to store the attribute value.
|
(package private) java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> |
attribsArg
All attributes which's values are use to call the ctor of the instance to store the data.
|
(package private) java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> |
attribsForCheck
If not null, contains attribute names which's name and value are used to build the key to found the proper xml node in the config file.
|
(package private) java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> |
attribsSet
All attributes which's values are set via the
XmlCfg.AttribDstCheck.daccess
to the data instance of the node. |
(package private) DataAccess.DatapathElement |
attribsUnspec
If set, the attrib dst for not found attributes to store in a common way.
|
(package private) boolean |
bCheckAttributeNode
The first node in some equal nodes in cfg, which determines the attributes used for check.
|
(package private) boolean |
bList
true then this node as child is stored with more as one instance.
|
(package private) boolean |
bStoreAttribsInNewContent
True if the value of attributes should be stored in the new content.
|
(package private) boolean |
bTextMoreOccurrences
True if there is more as one occurrence of text inside other nodes.
|
(package private) XmlCfg |
cfg
Back reference to the whole config.
|
(package private) java.lang.String |
cfgSubtreeName
|
(package private) DataAccess.DatapathElement |
contentStorePath
Reflection path to store the content as String.
|
(package private) java.lang.String |
dstClassName
Name of the class where the data are stored.
|
(package private) DataAccess.DatapathElement |
elementCreatePath
Reflection path either to store the content of the node
or also to get an instance as "sub node" to store the content.
|
(package private) DataAccess.DatapathElement |
elementFinishPath
Reflection path of usual an operation which is called on end of the node.
|
(package private) DataAccess.DatapathElement |
nameSpaceDef
If not null, the attrib dst for name space definition.
|
(package private) XmlCfg.XmlCfgNode |
parent
Parent node, to navigate in debug, to store this node if
attribsForCheck are present. |
(package private) java.util.Map<java.lang.String,XmlCfg.XmlCfgNode> |
subnodes
Key (tag name with xmlns:name) and configuration for a sub node.
|
(package private) java.lang.CharSequence |
tag |
| Constructor and Description |
|---|
XmlCfgNode(XmlCfg.XmlCfgNode parent,
XmlCfg cfg,
java.lang.CharSequence tag) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribStorePath(java.lang.String key,
java.lang.String sAttrValue)
This method is invoked from the xml configuration reader to create a new attribute entry for the found attribute.
|
(package private) void |
addFromSubtree(XmlCfg.XmlCfgNode subtree)
Adds the elements from a given <xmlinput:subtree ...
|
(package private) void |
addSubnode(java.lang.String key,
XmlCfg.XmlCfgNode node) |
XmlCfg.XmlCfgNode |
addSubTree(java.lang.CharSequence name)
Invoked via reflection from
XmlCfg.newCfgCfg()-given configuration. |
private boolean |
cmpDataAccess(java.lang.CharSequence tag,
java.lang.String what,
DataAccess.DatapathElement d1,
DataAccess.DatapathElement d2,
LogMessage log) |
boolean |
cmpNode(XmlCfg.XmlCfgNode nodeCmp,
LogMessage log)
This operation is only a helper to check whether the subtree entry is okay for manual changes.
|
(package private) XmlCfg.XmlCfgNode |
newElement(java.lang.CharSequence name)
This method is invoked from the xml configuration reader to create a new subNode for a found elmeent.
|
(package private) void |
setContentStorePath(java.lang.String dstPath)
This method is invoked from the xml configuration reader to create a DataAccess element for the content of the node..
|
void |
setFinishElementPath(java.lang.String dstPath)
Sets the path for the "set element" invocation see
elementFinishPath. |
void |
setList() |
void |
setNameSpaceStorePath(java.lang.String dstPath)
Set the dataAccess for storing a namespace definition.
|
void |
setNewElementPath(java.lang.String dstPath)
Sets the path for the "new element" invocation see
elementCreatePath. |
java.lang.String |
toString() |
final XmlCfg cfg
XmlCfg.xmlnsAssign is used to evaluate attributes.
The nameSpace is singular for the whole config.final XmlCfg.XmlCfgNode parent
attribsForCheck are present.DataAccess.DatapathElement elementCreatePath
cfgSubtreeName is set),
because the subtree defines the kind of node, and not the occurrence in the parent.
Because this operation can call different ctor, and store already the new created node, it is a stuff of the parent node.
DataAccess.DatapathElement#args contains the arguments for new_...(...).
This comes from the textual given expression. This values are necessary to store in the created class, but final.DataAccess.DatapathElement elementFinishPath
</tag> or also on /> if the node has not further sub nodes.
cfgSubtreeName is set),
because the subtree defines the kind of node, and not the occurrence in the parent.
boolean bList
cfgSubtreeName is set),
because the subtree defines the kind of node, and not the occurrence in the parent.java.util.Map<java.lang.String,DataAccess.IntegerIx> allArgNames
elementCreatePathboolean bCheckAttributeNode
boolean bStoreAttribsInNewContent
elementCreatePath
It is set if at least one attributes with a store path (with "!...") is found.java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> attribsForCheck
java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> attribsArg
XmlCfg.AttribDstCheck.storeInMap.java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> attribsSet
XmlCfg.AttribDstCheck.daccess
to the data instance of the node.
They are the attributes designated with @attr="set_Name(value)".java.util.Map<java.lang.String,XmlCfg.AttribDstCheck> attribs
XmlJzReader searches only here.DataAccess.DatapathElement attribsUnspec
DataAccess.DatapathElement nameSpaceDef
java.util.Map<java.lang.String,XmlCfg.XmlCfgNode> subnodes
contentStorePath.DataAccess.DatapathElement contentStorePath
boolean bTextMoreOccurrences
contentStorePath. Ot is not clarified here in the XML configuration.final java.lang.CharSequence tag
java.lang.String dstClassName
XmlJzCfgAnalyzer#storeCfgNode(XmlCfgNode, org.vishia.xmlReader.XmlJzCfgAnalyzer.XmlStructureNode, boolean, int)
to an identifier derived from the tag name.
This is usual a proper default name for the (sub-) class to store.
While parsing the class is the given type of the element to store, given as return value from elementCreatePath evaluation with the user's data,
means the return value of this reflection called operation.
Hence it is not necessary for parsing.java.lang.String cfgSubtreeName
XmlCfgNode(XmlCfg.XmlCfgNode parent, XmlCfg cfg, java.lang.CharSequence tag)
public void setNewElementPath(java.lang.String dstPath)
throws java.text.ParseException
elementCreatePath.dstPath - either a method or an access to a field.java.text.ParseExceptionpublic void setFinishElementPath(java.lang.String dstPath)
throws java.text.ParseException
elementFinishPath.dstPath - either a method or an access to a field.java.text.ParseExceptionpublic void setList()
public void addAttribStorePath(java.lang.String key,
java.lang.String sAttrValue)
throws java.text.ParseException
XmlCfg.AttribDstCheck is created.
attribsForCheck.
XmlCfg.AttribDstCheck.storeInMap.
It is stored in attribsArg.
attribsSet.
attribs, this is used in XmlJzReader to detect usage of the attributes.
The other specific container where the attributes are also stored are used to write out and access the confiuration.
key - ns:name of the found attribute in the config.xmldstPath - datapath which is found as value in the config.xml. The datapath is used for the user.xml to store the attribute value.java.text.ParseExceptionpublic void setNameSpaceStorePath(java.lang.String dstPath)
throws java.text.ParseException
XmlJzCfgAnalyzer.
For reading data from Xml usual a namespace definition should not be used in the read data (...?)dstPath - java.text.ParseExceptionvoid addFromSubtree(XmlCfg.XmlCfgNode subtree)
subnodes in the <xmlinput:subtree ... are also referred in original from this subnodes
attribs does not contain the attribute.
It means the <xmlinput:subtree ... attribs are not meaningful if they exists in the current element already.
The entry in the current element is then significant (the called store operation as attribute value).
But both should be equivalent.
setContentStorePath(String) is not taken from the subtree (ignored, 2024-05-12)
elementCreatePath and elementFinishPath are not taken from the subtree ( ignored, 2024-05-12).subtree - void addSubnode(java.lang.String key,
XmlCfg.XmlCfgNode node)
XmlCfg.XmlCfgNode newElement(java.lang.CharSequence name)
name - ns:tag of the found element in the config.xmlvoid setContentStorePath(java.lang.String dstPath)
throws java.text.ParseException
text - should start with ! the dataPath to store the contentjava.text.ParseExceptionpublic XmlCfg.XmlCfgNode addSubTree(java.lang.CharSequence name)
XmlCfg.newCfgCfg()-given configuration. It is invoked on <xmlinput:subtree name="..." name - Value from attribute namepublic boolean cmpNode(XmlCfg.XmlCfgNode nodeCmp, LogMessage log)
nodeCmp - private boolean cmpDataAccess(java.lang.CharSequence tag,
java.lang.String what,
DataAccess.DatapathElement d1,
DataAccess.DatapathElement d2,
LogMessage log)
public java.lang.String toString()
toString in class java.lang.Object