Skip to main content

%Studio.SASchemaClass

Class %Studio.SASchemaClass Extends %Studio.SASchema [ Abstract, System = 3 ]

This class is the base class for Studio Assist schema generators that are based on XML-enabled class definitions.

Parameters

XMLNAMESPACE

Parameter XMLNAMESPACE As STRING;

This is the namespace value used to identify this SA schema. This corresponds to the XMLNamespace keyword of a Studio XData block.

ROOTCLASSES

Parameter ROOTCLASSES As STRING;

This is a comma-separated list of the classes whose xml elements can be used as the root level element of a document separated with a ':' and the XML tag name to correlate this with e.g. "User.Person:person,User.Company:company".

SACATEGORY

Parameter SACATEGORY As STRING;

Optional. This is a comma-separated list of category names. If specified, only classes that contain an SACATEGORY parameter included in the list will be added to the schema. This provides a way to create a subset of a larger set of components.

Methods

OutputToStream

ClassMethod OutputToStream(pStream As %Stream.Object, Output pChecksum As %String, pParameter As %String) As %Status

Output SASchema definition into a stream

IsUpToDate

ClassMethod IsUpToDate(pChecksum As %String, pParameter As %String) As %Boolean

GetSchemaForClasses

ClassMethod GetSchemaForClasses(ByRef pClassList As %String) As %Status [ Private ]

Internal method. Given an array of class names, that correspond to the top-level elements within an XML document, find the simplified SASchema used by the Studio Assistant.
ppDefaultNS is the default XML namespace for the schema.

GetElementsForClass

ClassMethod GetElementsForClass(pClass As %String, Output pElementList, Output pReferencedClasses) As %Status

Given a class (and default namespace) find the list of XML elements it can contain. This list of the form: ^List(el) = class

GetAttrsForClass

ClassMethod GetAttrsForClass(pClass As %String, Output pAttrList) As %Status

Given a class (and default namespace) find the list of XML attributes it can contain.

GetXMLElementsForClass

ClassMethod GetXMLElementsForClass(pClass As %String, Output pElements) As %Status

Return an array of XML element names that could be used within a document wherever pClass is expected.

GetXMLNameForClass

ClassMethod GetXMLNameForClass(pClass As %String) As %String

Return the XML name for the given class (or "" if there is none). If the class is not in the default namespace, its namespace will be prepended to the XML name.

XMLName2DisplayName

ClassMethod XMLName2DisplayName(pName As %String, pCurrentNS As %String) As %String

Take an element and make sure it has the correct namespace prefix to match the given local namespace context.

XMLName2NameSpace

ClassMethod XMLName2NameSpace(pName) As %String [ CodeMode = expression ]

XMLName2ShortName

ClassMethod XMLName2ShortName(pName) As %String [ CodeMode = expression ]

loopGlobal

ClassMethod loopGlobal(pStream As %Stream.Object) As %Status [ Private ]

Loop through the global to generate the output for the Studio.

SchemaToPrefix

ClassMethod SchemaToPrefix(pSchema As %String) As %String

Convert a schema name to a reasonable "prefix".