|
OpenPetra
Free Administration Software for Non-Profits
|
This is a special XML parser for the datadefinition file for Petra More...
Public Member Functions | |
| TDataDefinitionParser (string filename, bool withValidation) | |
| constructor More... | |
| TDataDefinitionParser (string filename) | |
| constructor More... | |
| Object | Parse (XmlNode cur, ref int groupId, string entity) |
| Knows how to parse all the entities in the document. Reads one or more entities of the same type. More... | |
| Boolean | ParseDocument (ref TDataDefinitionStore myStore, Boolean ADoValidation, Boolean AAddAutoGeneratedFields) |
| This will parse the xml document and store the contents in our Datadefinition Store More... | |
| Boolean | ParseDocument (ref TDataDefinitionStore myStore, Boolean ADoValidation) |
| overloaded method of ParseDocument, always with adding special fields (createdby etc) More... | |
| Boolean | ParseDocument (ref TDataDefinitionStore myStore) |
| overloaded version of ParseDocument, always add special fields, and validate the document More... | |
| XmlDocument | GetDocument () |
| retrieves the document, in case the document should be parsed not by a derived class More... | |
Static Public Member Functions | |
| static string | XmlToString (XmlDocument ADoc) |
| print an xml document to string; this can be necessary for transmitting between server and client, since XmlDocument is not serializable More... | |
| static string | XmlToStringIndented (XmlDocument ADoc) |
| print an xml document to string with indentation More... | |
| static string | XmlToString2 (XmlDocument ADoc) |
| this is necessary to be able to store XML files that can be parsed by DTD/Schema mechanisms; for YML, we have the name of an element not as an attribute, but the element name itself; this would never work for validating xml; therefore all Elements are called XmlElement, with attribute name More... | |
| static XmlNode | NextNotBlank (XmlNode cur2) |
| test the given node, if it is a comment or is empty; if it is empty, try the next nodes. More... | |
| static XmlNode | GetNextEntity (XmlNode cur) |
| get the next code that is a proper entity (i.e. no comment, not empty) More... | |
| static XmlNode | GetChild (XmlNode cur, string name) |
| return the child with the given name, if it exists; otherwise return null More... | |
| static XmlNode | FindNodeRecursive (XmlNode AParentNode, string ANodeNameToSearch) |
| find a node somewhere in the xml document by its tag name More... | |
| static XmlNode | FindNodeRecursive (XmlNode AParentNode, string ANodeNameToSearch, string ANameAttribute) |
| find a node somewhere in the xml document by its tag name and attribute name More... | |
| static void | SetAttribute (XmlNode cur, string AAttribName, string AAttribValue) |
| add or set an attribute value More... | |
| static void | RenameAttribute (XmlNode cur, string AAttribOldName, string AAttribNewName) |
| rename an existing attribute More... | |
| static string | GetAttribute (XmlNode cur, string attrib) |
| Retrieve an XML attribute. Empty if attribute is not present More... | |
| static string | GetAttributeRecursive (XmlNode cur, string attrib, bool AInheritAttributes) |
| Retrieve an XML attribute. Empty if attribute is not present. Check the parent nodes, if the current node does not have that attribute More... | |
| static Boolean | HasAttribute (XmlNode cur, string attrib) |
| retrieve whether the node has an attribute with the given name or not More... | |
| static Int32 | GetIntAttribute (XmlNode cur, string attrib) |
| retrieve the int value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing More... | |
| static bool | GetBoolAttribute (XmlNode cur, string attrib, bool defaultvalue) |
| retrieve the boolean value of an attribute. Understands all sorts of notation (yes|no, true|false, 0|1) More... | |
| static bool | GetBoolAttribute (XmlNode cur, string attrib) |
| overload for GetBoolAttribute, assuming default value is false More... | |
| static double | GetDoubleAttribute (XmlNode cur, string attrib) |
| retrieve the double value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing More... | |
| static decimal | GetDecimalAttribute (XmlNode cur, string attrib) |
| retrieve the decimal value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing More... | |
Public Attributes | |
| bool | SupportPetra2xLegacyStandard = false |
| if this is set to true, primary key fields with NULL will be allowed. otherwise the DumpPetra2x does not work. More... | |
Protected Member Functions | |
| TTable | ParseTable (XmlNode cur2) |
| Parse the definition of one database table More... | |
| TTableField | ParseTableField (XmlNode cur2) |
| parse the definition of one table column More... | |
| TConstraint | ParseConstraint (XmlNode cur2, String AThisTableName) |
| parse the definition of one constraint (unique, primary or foreign key) More... | |
| TIndex | ParseIndex (XmlNode cur2) |
| Parse the definition of one index in the database More... | |
| TIndexField | ParseIndexField (XmlNode cur2) |
| parse the field that is part of an index definition More... | |
| TSequence | ParseSequence (XmlNode cur2) |
| parse the definition of a database sequence More... | |
Protected Attributes | |
| XmlDocument | myDoc |
| the XmlDocument that is currently parsed More... | |
This is a special XML parser for the datadefinition file for Petra
|
inline |
constructor
| filename | the xml file that should be parsed |
| withValidation | if true then the xml file will be validated |
|
inline |
constructor
| filename | the xml file that should be parsed |
|
inlinestaticinherited |
find a node somewhere in the xml document by its tag name
| AParentNode | |
| ANodeNameToSearch |
|
inlinestaticinherited |
find a node somewhere in the xml document by its tag name and attribute name
| AParentNode | |
| ANodeNameToSearch | |
| ANameAttribute |
|
inlinestaticinherited |
Retrieve an XML attribute. Empty if attribute is not present
| cur | the current node |
| attrib | the name of the attribute |
|
inlinestaticinherited |
Retrieve an XML attribute. Empty if attribute is not present. Check the parent nodes, if the current node does not have that attribute
| cur | the current node |
| attrib | the name of the attribute |
| AInheritAttributes | return all the values of the parent nodes as well |
|
inlinestaticinherited |
overload for GetBoolAttribute, assuming default value is false
| cur | the current node |
| attrib | the name of the attribute |
|
inlinestaticinherited |
retrieve the boolean value of an attribute. Understands all sorts of notation (yes|no, true|false, 0|1)
| cur | the current node |
| attrib | the name of the attribute |
| defaultvalue | the default value if the attribute is not existing; optional: false |
|
inlinestaticinherited |
return the child with the given name, if it exists; otherwise return null
|
inlinestaticinherited |
retrieve the decimal value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing
| cur | the current node |
| attrib | the name of the attribute |
|
inlineinherited |
retrieves the document, in case the document should be parsed not by a derived class
|
inlinestaticinherited |
retrieve the double value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing
| cur | the current node |
| attrib | the name of the attribute |
|
inlinestaticinherited |
retrieve the int value of an attribute. Does prevent unnecessary exceptions, if the attribute is not existing
| cur | the current node |
| attrib | the name of the attribute |
|
inlinestaticinherited |
get the next code that is a proper entity (i.e. no comment, not empty)
| cur | the current node |
|
inlinestaticinherited |
retrieve whether the node has an attribute with the given name or not
| cur | the current node |
| attrib | the name of the attribute |
|
inlinestaticinherited |
test the given node, if it is a comment or is empty; if it is empty, try the next nodes.
| cur2 | the current node |
|
inline |
Knows how to parse all the entities in the document. Reads one or more entities of the same type.
| cur | The current node |
| groupId | The id of the current group that the elements will belong to |
| entity | The name of the entity that should be read |
|
inlineprotected |
parse the definition of one constraint (unique, primary or foreign key)
| cur2 | the current node |
| AThisTableName | the name of the table that this constraint belongs to |
|
inline |
overloaded version of ParseDocument, always add special fields, and validate the document
| myStore | the destination for all the parsed information |
|
inline |
overloaded method of ParseDocument, always with adding special fields (createdby etc)
| myStore | the destination for all the parsed information |
| ADoValidation | should the document be validated |
|
inline |
This will parse the xml document and store the contents in our Datadefinition Store
| myStore | the destination of all the information |
| ADoValidation | do we want the XmlDocument to be validated |
| AAddAutoGeneratedFields | should some special fields be generated automatically, eg. createdby/datemodified etc |
|
inlineprotected |
Parse the definition of one index in the database
| cur2 | the current node |
|
inlineprotected |
parse the field that is part of an index definition
| cur2 | the current node |
|
inlineprotected |
parse the definition of a database sequence
| cur2 | the current node |
|
inlineprotected |
Parse the definition of one database table
| cur2 | the current node |
|
inlineprotected |
parse the definition of one table column
| cur2 | the current node |
|
inlinestaticinherited |
rename an existing attribute
| cur | |
| AAttribOldName | |
| AAttribNewName |
|
inlinestaticinherited |
add or set an attribute value
| cur | |
| AAttribName | |
| AAttribValue |
|
inlinestaticinherited |
print an xml document to string; this can be necessary for transmitting between server and client, since XmlDocument is not serializable
| ADoc |
|
inlinestaticinherited |
this is necessary to be able to store XML files that can be parsed by DTD/Schema mechanisms; for YML, we have the name of an element not as an attribute, but the element name itself; this would never work for validating xml; therefore all Elements are called XmlElement, with attribute name
| ADoc |
|
inlinestaticinherited |
print an xml document to string with indentation
| ADoc |
|
protectedinherited |
the XmlDocument that is currently parsed
| bool Ict.Tools.DBXML.TDataDefinitionParser.SupportPetra2xLegacyStandard = false |
if this is set to true, primary key fields with NULL will be allowed. otherwise the DumpPetra2x does not work.