%XML.Utils.SchemaResult
Class %XML.Utils.SchemaResult Extends %RegisteredObject [ System = 3 ]
This class manages and contains the list of class defintions that are created from an XML Schema. This class is intended for internal use by the XML Schema Wizard. This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.
Parameters
DOMAIN
Parameter DOMAIN = "%TemplateMessages";
Messages for localization of XML Schema Wizard result.
Properties
Classes
Property Classes As %String [ MultiDimensional ];
A multi-dimensional array of class names
Classes(name) = key (in original ClassTree)
Reader
Property Reader As SchemaReader;
SchemaReader that created this result
Features
Property Features As %String [ MultiDimensional ];
Array of feature codes for generated classes: The possible nodes are as follows:
Features("DEFAULTSEQUENCE") If this node exists, the wizard does not set the XMLSEQUENCE parameter in the generated classes.
Features("JAVA") If this node exists, each class includes a Java projection.
Features("NOSEQUENCE") If this node exists, the wizard sets the XMLSEQUENCE parameter to 0 in the generated classes.
Features("POPULATE") If this node exists, each class extends %Populate in addition to %XML.Adaptor.
Features("SQLCOLUMNS") If this node exists, each class property specifies a value for the SqlColumnNumber keyword, so that the properties have the same order in SQL that they have in the schema.
Features("IGNORENULL") If this node is set, the XMLIGNORENULL parameter is set to this value for each class. Features("BINARYASSTREAM") If this node exists, then use %Stream.GlobalBinary for base64Binary type Features("XMLFORMAT") If this node is set, the XMLFORMAT parameter is set to this value for each class.
Tree
Property Tree As %Integer;
Integer tree id within ^IRIS.Temp
PrefixIndex
Property PrefixIndex As %Integer [ InitialExpression = 0 ];
Index for creating namespace prefixes.
Methods
CreateResult
ClassMethod CreateResult(pReader As SchemaReader, pPackage As %String = "", ByRef pFeatures As %String) As SchemaResult
Create a Schema Result given a SchemaReader
SetupResult
Method SetupResult(pReader As SchemaReader, pPackage As %String = "", ByRef pFeatures As %String) As SchemaResult
Setup a new Schema Result given a SchemaReader
CreateClassDef
Method CreateClassDef(pClassName As %String, test As %Boolean = 0, ByRef pCDef As %Dictionary.ClassDefinition) As %Status
Create a class definition for an entry in the class tree.
AddOnDeleteMethod
ClassMethod AddOnDeleteMethod(cdef As %Dictionary.ClassDefinition, persistentProperties, tSeqNo As %Integer) [ Internal ]
If Delete trigger needed, then create it now.
SuperPropertyCount
Method SuperPropertyCount(pClassName As %String) As %Integer [ Internal ]
Get number of properties in super classes
SaveClasses
Method SaveClasses(verbose As %Boolean = 0, test As %Boolean = 0) As %Status
Save all the class definitions in this result to the database.
SaveClass
Method SaveClass(cdef As %Dictionary.ClassDefinition, verbose As %Boolean = 0) As %Status
CompileClasses
Method CompileClasses(verbose As %Boolean = 0, CompileFlags As %String = "dk") As %Status
Compile all the class definitions in this result
IsValidClassName
ClassMethod IsValidClassName(%val As %Binary) As %Boolean
!!!Test if name is a valid class name
IsSQLWord
ClassMethod IsSQLWord(name As %String) As %Boolean
Test if name is an SQL reserved word
DisplayClasses
Method DisplayClasses()
List all the classes in this Result.
DisplayClass
ClassMethod DisplayClass(cdef As %Dictionary.ClassDefinition) As %Status
Write out a formatted version of a class definition
DisplayClassesHTML
Method DisplayClassesHTML() As %Status
Provide an HTML list of classes (for Wizard)
DisplayClassHTML
Method DisplayClassHTML(row As %Integer, cdef As %Dictionary.ClassDefinition) As %Status
XSchemaToFile
Method XSchemaToFile(filepath As %String) As %Status
Output an XSchema format file based on the parsed XML schema.
ElementsToXSchema
Method ElementsToXSchema() As %Status
Add top level elements to the XSchema data structure
AddToXSchema
Method AddToXSchema(classname As %String) As %Status
Create the XSchema data Structure for one class
GetTypeRef
Method GetTypeRef(ns As %Integer, key As %Integer, ByRef nsno As %Integer, ByRef localname As %String) As %String
OutputXSchema
Method OutputXSchema(nsno As %Integer)
Output the XSchema data structure to a file