Class Reference
IRIS for UNIX 2019.3
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%XML] >  [Utils] >  [SchemaReader]
Private  Storage   

class %XML.Utils.SchemaReader extends %RegisteredObject

This class reads an XML schema and builds class definitions from it.
Schema reading works as follows:
First, the Parser class builds a tree structure representing the elements within the schema file, then this class processes the tree to build class definitions.
This class is used by the XML Schema Wizard; it is not for direct use within applications except through the Process and Reset methods. Properties which are not marked as internal may be used to control the Process method.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
49 77


Summary

Properties
AddIdentity CascadeDeletes CompileClasses CompileFlags
Debug EntityResolver GenerateXMLNIL GenerateXMLNILNOOBJECT
IndexRelationship KeepEmptyClasses MakeNamespace MakePersistent
MakeRelationships MakeSerial NoArrayProperties PackageMapping
ParentChildRelationship SAXFlags SSLCheckServerIdentity SSLConfiguration
TestFlag

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
DetermineEnumSeparator MakeNameUnique Process RemoveClassFromList
Reset XSchema


Properties

• property AddIdentity as %String;
Input property to optionally add an identity property to persistent classes that contains an ID, OID or GUID. Possible values for AddIdentity are "" (none), "ID", "OID" or "GUID".
• property CascadeDeletes as %Boolean [ InitialExpression = 0 ];
Input property to control if a %OnDelete method is generated for persistent classes in order to cascade deletes.
• property CompileClasses as %Boolean [ InitialExpression = 1 ];
Input property to control compilation of created classes. Default is to compile classes.
• property CompileFlags as %String [ InitialExpression = "dk" ];
Flags to be used for class compiles.
• property Debug as %Integer [ InitialExpression = 0 ];
Control display of debugging info Debug level. Additional output for levels >0. Default is 0.
• property EntityResolver as %XML.SAX.EntityResolver;
This property should be set to an instance of %XML.SAX.EntityResolver OR a user-defined subclass IF the default EntityResolver is not required.
• property GenerateXMLNIL as %Boolean;
Input property to control the generation of the XMLNIL property parameter. If GenerateXMLNIL = 1, then generate property parameter XMLNIL=1 for elements with nillable="true".
• property GenerateXMLNILNOOBJECT as %Boolean;
Input property to control the generation of the XMLNILNOOBJECT property parameter. If GenerateXMLNILNOOBJECT = 1, then generate property parameter XMLNILNOOBJECT=1 for elements with nillable="true".
• property IndexRelationship as %Boolean [ InitialExpression = 0 ];
Input property to control nature of relationships in generated classes. The IndexRelationship property is only meaningful if MakeRelationships is true(1) and the relationship is many-one (ParentChildRelationship is false(0). If IndexRelationship is true(1), the many-one relationships that are created are indexed.
• property KeepEmptyClasses as %Boolean [ InitialExpression = 0 ];
Input property to control removal of unused classes with no properties.
If true(1), remove unused classes with no properties.
Default is false(0).
• property MakeNamespace as %Boolean;
Input property to control generation of XML namespace information. If true(1), add NAMESPACE parameter to generated classes. Default is false(0) unless there are multiple targetNamespaces in which case the default is true(1).
• property MakePersistent as %Boolean [ InitialExpression = 1 ];
Input property to control persistence of generated classes. If true(1) create persistent classes, else create registered classes. Default is true.
• property MakeRelationships as %Boolean [ InitialExpression = 1 ];
Input property to control creation of relationships in generated classes. If true(1), convert list collections of persistent classes to relationships. Default is true.
• property MakeSerial as %Boolean [ InitialExpression = 0 ];
Input property to control if generated classes are serial. If true(1) and 'MakePersistent create serial classes, else create registered classes. Default is true.
• property NoArrayProperties as %Boolean [ InitialExpression = 0 ];
Input property to control use of arrays in created classes.
If true(1), do not reduce properties to use array of cnostruct.
Default is false(0).
• property PackageMapping as %String [ MultiDimensional ];
User supplied mapping of namespaces to package names which will override the default package used for a specified namespace.
The format is PackageMapping(namespace)=package for each mapped namespace
If package="", then the client classes are put in the default package. If package begins with a period (.), then the package is appended to the default package. Otherwise the package is used as specified.
The PackageMapping property may only be used with the Process method.
• property ParentChildRelationship as %Boolean [ InitialExpression = 0 ];
Input property to control nature of relationships in generated classes. The ParentChildRelationship property is only meaningful if MakeRelationships is true(1). If ParentChildRelationship is true(1), the relationships that are created are parent-child relationsips. Otherwise the relationships are many-one.
• property SAXFlags as %Integer [ InitialExpression = $$$SAXFULLDEFAULT+$$$SAXVALIDATIONPROHIBITDTDS ];
This property should be set to a combination of flags (see %occSAX.inc for details) if the default behavior of the parser is required to be modified. The $$$SAXVALIDATIONPROHIBITDTDS flag is added by default in order to not allow DTDs.
• property SSLCheckServerIdentity as %Boolean;
When making an SSL connection check the server identity in the server certificate matches the name of the system we are connecting to. This defaults to being on and matches based on the rules layed out in section 3.1 of RFC 2818.
• property SSLConfiguration as %String;
The name of the activated TLS/SSL configuration to use for https requests.
• property TestFlag as %Boolean [ InitialExpression = 0 ];
Control test mode. If true, make output repeatable for unit test, e.g. no dates. Default is false(0).

Methods

• method DetermineEnumSeparator(elno As %Integer) as %String
• method MakeNameUnique(cls As %Integer, prop As %Integer, ByRef name As %String, ByRef namesUpper)
Make property name different than the specified name
• method Process(LocationURL As %String, Package As %String = "Test", ByRef Features As %String) as %Status
Command line interface to Schema Wizard LocationURL is the filename or the URL of an XML schema. Package is the name of the package in which the method should place the generated classes. Features is a Multidimensional Array to Store Additional Settings. 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
• method RemoveClassFromList(key As %String)
Remove a class from the list of classes This method is for internal use only. 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 property.
• method Reset()
Reset this class instance for reuse.
• method XSchema(locationURL As %String, filepath As %String) as %Status
Command line interface to create an internal XSchema format file from an XML schema.
locationURL is the location of the input XML schema.
filepath is the file path for the new file containing the XSchema.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.