%ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag

abstract persistent class %ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag extends %Library.Persistent, %XML.Adaptor

SQL Table Name: %ZHSLIB_PackageManager_Developer_Annotation_Tag.AnchorTag

Base class for "anchor" tags (that is, tags that do not modify or continue other tags). Note that ALL subclasses of this class must be in the package %ZHSLIB.PackageManager.Developer.Annotation.Tag; this is an assumption in the method ShortTagName().

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter AddIfOmitted = 0;
flag to indicate whether a COS entity that allows this tag should always have XML for that tag, even if it's omitted from the annotations. Such extra XML representation will not use a default instance of the tag, but one constructed by calling ConstructMissingMandatoryTag(). This allows us to have different behavior between a) omitted things and b) things included without modifiers, e.g. "Extensible" by itself should have "universal" availability, while omission means "forbidden".
parameter IncludeInObjectTree = 1;
whether we should add this tag object to the entity's Tags. We set this to 0 in tag classes that affect the tag processing behavior but which should not appear in the API XML. This is necessary because there is no way to exclude it from the XML; setting the XMLENABLED parameter to 0 causes errors because every class referenced by an xml-enabled class (when generating XML) must be enabled also, and the tags are all mixed together in the ..Tags relationship of the COS entity object. We could also try to store them differently in the COS entity but that would make all the other tag handling more complex.
final parameter UniversalModifiers = TagNotInherited;
Contains keywords for modifiers that are universally applicable to all tags. Not intended to be overridden.
parameter XMLNAME;
note that we tried using a COSEXPRESSION to generate the XMLNAME from the class name, using the obvious simple rule: $replace($piece($classname(),".",6,*),".","_") . While this works when evaluated with $parameter(), the XML writer can't use it because it relies on run-time expression execution and the XML output is done via generated code. Using a curly-braces "evaluate at compile time" expression also does not work, even if we use %classname instead of $classname(); maybe the XML.Adaptor code generation doesn't support the {} syntax regardless. See prodlog 148118 So we have to provide the obvious XMLNAME value explicitly in all the tag subclasses.

Properties

property Inherited as %Boolean (XMLPROJECTION = "none") [ InitialExpression = 1 ];
By default, all tags are inherited. Tags on a class are inherited by its subclasses, and tags on a class's members are inherited by the members in subclasses. However, we allow a modifier to block this, like so:
  /// @API.Property  
  /// @Modifier TagNotInherited 
  
Using this modifier only affects the behavior of the annotation tags. It does not affect how the COS members are inherited, that's the domain of COS. The modifier can apply to any tag.
Property methods: InheritedDisplayToLogical(), InheritedGet(), InheritedGetStored(), InheritedIsValid(), InheritedLogicalToDisplay(), InheritedLogicalToXSD(), InheritedNormalize(), InheritedSet(), InheritedXSDToLogical()
property OwnerClass as %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.ClassProxy (XMLPROJECTION = "none") [ Calculated ];
reference to the class proxy object that ParentCosEntity is part of. For class proxy objects, this will return $this.
Property methods: OwnerClassCompute(), OwnerClassGet(), OwnerClassGetObject(), OwnerClassGetObjectId(), OwnerClassSQLCompute()
relationship ParentCosEntity as %ZHSLIB.PackageManager.Developer.Annotation.CosEntity [ Required , Inverse = Tags , Cardinality = one ];
note that this relationship should have an "OnDelete = cascade" keyword, but this does not work correctly. Attempting to accomplish the same effect with an "on delete" trigger in the CosEntity table also does not work. see prodlog 148120 Therefore, anytime we delete CosEntity objects we must explicitly delete its related AnchorTag objects first.
Property methods: ParentCosEntityCheck(), ParentCosEntityDelete(), ParentCosEntityGet(), ParentCosEntityGetObject(), ParentCosEntityGetObjectId(), ParentCosEntityGetStored(), ParentCosEntityGetSwizzled(), ParentCosEntityIndexExists(), ParentCosEntityIsValid(), ParentCosEntityNewObject(), ParentCosEntityOnDelete(), ParentCosEntityRClose(), ParentCosEntityRExec(), ParentCosEntityRFetch(), ParentCosEntityRelate(), ParentCosEntitySQLCompute(), ParentCosEntitySQLFKeyExists(), ParentCosEntitySQLFKeyRefAction(), ParentCosEntitySet(), ParentCosEntitySetObject(), ParentCosEntitySetObjectId(), ParentCosEntityUnRelate(), ParentCosEntityUnSwizzle()
property TagClassName as %String (MAXLEN = 500, XMLPROJECTION = "none") [ Required ];
Property methods: TagClassNameCompute(), TagClassNameDisplayToLogical(), TagClassNameGet(), TagClassNameGetStored(), TagClassNameIsValid(), TagClassNameLogicalToDisplay(), TagClassNameLogicalToOdbc(), TagClassNameNormalize(), TagClassNameSQLCompute(), TagClassNameSet(), TagClassNameSetT()

Methods

method ApplyPropertyValues(ByRef pPropertyValues, pContextObject As %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.CommentableEntity) [ Language = objectscript ]
tags can have properties that either appear as "extra content" in the same tag line (e.g. @API.Deprecated 2.12.4), or as modifiers on a separate line (e.g. @Modifier Availability Universal). Many of these also need to be able to be overridden in APIANNOTATIONS XData blocks, which we parse into arrays for easier processing. This method is for applying those properties/attributes coming from the XData blocks.
This leaves us supporting exactly two: the Availability modifier and the Version properties for Deprecated and Since. But the intent is to support more options later if needed.
The array passed in should be of the form pPropertyValues("Property") = "Value"
classmethod ConstructMissingMandatoryTag() as AnchorTag [ Language = objectscript ]
classmethod GetOwnerClassProxyID(pID As %Integer) as %Integer [ Language = objectscript ]
private method HandleExtraContent(ByRef pCommentBlock As %Library.RawString = "", pContextObject As %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.CommentableEntity) [ Language = objectscript ]
helper method for further content on the tag line after the tag itself. throws exceptions. expects the comment block to begin with the "remainder" after the initial tag has been removed, with the line break and anything preceding it still present. Leaves the block in a state with that remainder gone, and beginning with the next real line.
method InitializeFromCommentText(ByRef pCommentBlock As %Library.RawString, pContextObject As %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.CommentableEntity) as %Status [ Language = objectscript ]
method IsAPI() as %Boolean [ Language = objectscript ]
method OwnerClassGet() as %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.ClassProxy [ Language = objectscript ]
private method ProcessModifiers(ByRef pCommentBlock As %Library.RawString, pContextObject As %ZHSLIB.PackageManager.Developer.Annotation.CosEntity.CommentableEntity) [ Language = objectscript ]
private helper method; throws exceptions.
classmethod ShortTagName() as %String [ Language = objectscript ]
method SupportsAvailability() as %Boolean [ Language = objectscript ]
method SupportsVersionValue() as %Boolean [ Language = objectscript ]

Indices

index (NamespaceAwareIndex on ParentCosEntity,TagClassName) [IdKey, Type = key];
Index methods: NamespaceAwareIndexCheck(), NamespaceAwareIndexDelete(), NamespaceAwareIndexExists(), NamespaceAwareIndexOpen(), NamespaceAwareIndexSQLCheckUnique(), NamespaceAwareIndexSQLExists(), NamespaceAwareIndexSQLFindPKeyByConstraint(), NamespaceAwareIndexSQLFindRowIDByConstraint()
index (ParentCosEntityIndex on ParentCosEntity);
Index methods: ParentCosEntityIndexExists()

Inherited Members

Inherited Methods (Including Private)

Storage

Storage Model: Storage (%ZHSLIB.PackageManager.Developer.Annotation.Tag.AnchorTag)

^HS.PM.Dev.Annotation.AnchorTagD(ID)
=
%%CLASSNAME
ParentCosEntity
Inherited
Feedback