Skip to main content

%XML.Utils.SchemaReader

class %XML.Utils.SchemaReader extends %Library.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.

Property Inventory

Method Inventory

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 methods: AddIdentityDisplayToLogical(), AddIdentityGet(), AddIdentityIsValid(), AddIdentityLogicalToDisplay(), AddIdentityLogicalToOdbc(), AddIdentityNormalize(), AddIdentitySet()
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 methods: CascadeDeletesDisplayToLogical(), CascadeDeletesGet(), CascadeDeletesIsValid(), CascadeDeletesLogicalToDisplay(), CascadeDeletesNormalize(), CascadeDeletesSet()
property CompileClasses as %Boolean [ InitialExpression = 1 ];
Input property to control compilation of created classes. Default is to compile classes.
Property methods: CompileClassesDisplayToLogical(), CompileClassesGet(), CompileClassesIsValid(), CompileClassesLogicalToDisplay(), CompileClassesNormalize(), CompileClassesSet()
property CompileFlags as %String [ InitialExpression = "dk" ];
Flags to be used for class compiles.
Property methods: CompileFlagsDisplayToLogical(), CompileFlagsGet(), CompileFlagsIsValid(), CompileFlagsLogicalToDisplay(), CompileFlagsLogicalToOdbc(), CompileFlagsNormalize(), CompileFlagsSet()
property Debug as %Integer [ InitialExpression = 0 ];
Control display of debugging info Debug level. Additional output for levels >0. Default is 0.
Property methods: DebugDisplayToLogical(), DebugGet(), DebugIsValid(), DebugLogicalToDisplay(), DebugNormalize(), DebugSet()
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 methods: EntityResolverGet(), EntityResolverGetSwizzled(), EntityResolverIsValid(), EntityResolverNewObject(), EntityResolverSet()
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 methods: GenerateXMLNILDisplayToLogical(), GenerateXMLNILGet(), GenerateXMLNILIsValid(), GenerateXMLNILLogicalToDisplay(), GenerateXMLNILNormalize(), GenerateXMLNILSet()
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 methods: GenerateXMLNILNOOBJECTDisplayToLogical(), GenerateXMLNILNOOBJECTGet(), GenerateXMLNILNOOBJECTIsValid(), GenerateXMLNILNOOBJECTLogicalToDisplay(), GenerateXMLNILNOOBJECTNormalize(), GenerateXMLNILNOOBJECTSet()
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 methods: IndexRelationshipDisplayToLogical(), IndexRelationshipGet(), IndexRelationshipIsValid(), IndexRelationshipLogicalToDisplay(), IndexRelationshipNormalize(), IndexRelationshipSet()
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 methods: KeepEmptyClassesDisplayToLogical(), KeepEmptyClassesGet(), KeepEmptyClassesIsValid(), KeepEmptyClassesLogicalToDisplay(), KeepEmptyClassesNormalize(), KeepEmptyClassesSet()
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 methods: MakeNamespaceDisplayToLogical(), MakeNamespaceGet(), MakeNamespaceIsValid(), MakeNamespaceLogicalToDisplay(), MakeNamespaceNormalize(), MakeNamespaceSet()
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 methods: MakePersistentDisplayToLogical(), MakePersistentGet(), MakePersistentIsValid(), MakePersistentLogicalToDisplay(), MakePersistentNormalize(), MakePersistentSet()
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 methods: MakeRelationshipsDisplayToLogical(), MakeRelationshipsGet(), MakeRelationshipsIsValid(), MakeRelationshipsLogicalToDisplay(), MakeRelationshipsNormalize(), MakeRelationshipsSet()
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 methods: MakeSerialDisplayToLogical(), MakeSerialGet(), MakeSerialIsValid(), MakeSerialLogicalToDisplay(), MakeSerialNormalize(), MakeSerialSet()
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 methods: NoArrayPropertiesDisplayToLogical(), NoArrayPropertiesGet(), NoArrayPropertiesIsValid(), NoArrayPropertiesLogicalToDisplay(), NoArrayPropertiesNormalize(), NoArrayPropertiesSet()
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 methods: PackageMappingDisplayToLogical(), PackageMappingGet(), PackageMappingIsValid(), PackageMappingLogicalToDisplay(), PackageMappingLogicalToOdbc(), PackageMappingNormalize(), PackageMappingSet()
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 methods: ParentChildRelationshipDisplayToLogical(), ParentChildRelationshipGet(), ParentChildRelationshipIsValid(), ParentChildRelationshipLogicalToDisplay(), ParentChildRelationshipNormalize(), ParentChildRelationshipSet()
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 methods: SAXFlagsDisplayToLogical(), SAXFlagsGet(), SAXFlagsIsValid(), SAXFlagsLogicalToDisplay(), SAXFlagsNormalize(), SAXFlagsSet()
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 methods: SSLCheckServerIdentityDisplayToLogical(), SSLCheckServerIdentityGet(), SSLCheckServerIdentityIsValid(), SSLCheckServerIdentityLogicalToDisplay(), SSLCheckServerIdentityNormalize(), SSLCheckServerIdentitySet()
property SSLConfiguration as %String;
The name of the activated TLS/SSL configuration to use for https requests.
Property methods: SSLConfigurationDisplayToLogical(), SSLConfigurationGet(), SSLConfigurationIsValid(), SSLConfigurationLogicalToDisplay(), SSLConfigurationLogicalToOdbc(), SSLConfigurationNormalize(), SSLConfigurationSet()
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).
Property methods: TestFlagDisplayToLogical(), TestFlagGet(), TestFlagIsValid(), TestFlagLogicalToDisplay(), TestFlagNormalize(), TestFlagSet()

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 used internally by Caché. 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.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab