Annotations (TMF Tools) - Xyna-Factory/xyna GitHub Wiki
Annotations used by TMF Tools are special XML tags inside the Elements of Data Type XMLs. You can edit them via the Data Type Modeller: Click on a member variable and then add the Annotations in the tab "Meta". Some of the annotations are valid only for member variables, others have to be specified at Data Type level directly.
<TMFLifecycleStatus>Active</TMFLifecycleStatus>
<TMFConstraints>…</TMFConstraints>
Content must be a JSON array, which corresponds to the TMF constraints format, e.g. [{"name":"my constraint", "condition":{"path":["$.x", "$.y"], "expression":"EVAL($0)==EVAL($1)"}, "rule":{…}},…]
<TMFAllowedChanges>…</TMFAllowedChanges>
Content must be a JSON object which corresponds to the TMF allowed changes format, e.g. { "allof" : [{ "changes" : ["$.serviceCharacteristic[?(@.name=='innerVLAN')]", "…other json path…"]}], "anyof": …}
<TMFServiceId>…</TMFServiceId>
(The services own identifier)
<TMFType>Characteristic</TMFType>
(Supported values: "Characteristic", "ServiceRelationship", "RelatedParty", "Resource", "ServiceProperty", "ExternalIdentifier")
<TMFCharMinCardinality>1</TMFCharMinCardinality>
<TMFCharMaxCardinality>1</TMFCharMaxCardinality>
<TMFCharValueEnums>value1, value2, value3</TMFCharValueEnums>
(Comma/Whitespace separated list (\s*,\s*), no support for values that contain commas)
<TMFCharValueDefault>value2</TMFCharValueDefault>
<TMFCharValueFrom>1</TMFCharValueFrom>
<TMFCharValueTo>10</TMFCharValueTo>
<TMFCharValueRegex>someregex</TMFCharValueRegex>
<TMFServiceRefRole>dependent</TMFServiceRefRole>
(corresponding field serviceSpecRelationship.role)
<TMFServiceRefServiceName>Network Access Service</TMFServiceRefServiceName>
(name of the referenced service)
<TMFServiceRefId>someid</TMFServiceRefId>
(id of the referenced service)
If there are multiple sub types of the referenced service with their separate ids, this annotation allows providing all of them as a key-value list, i.e. "Type1=id1, Type2=id2", whitespaces in front and after "=" and "," optional.
<TMFServiceRefUseParentId>true</TMFServiceRefUseParentId>
(use self reference to the id of the parent service)
If complex valued members are used for service relationships, all of their member variables are treated as characteristics or service properties inside the service relationship. Their annotations are the same as above: Specifiy their TMFType and their type specific annotations. For non-complex valued ServiceRelationships they are mapped to the id of the referenced service.
<TMFRelatedPartyType>Organization</TMFRelatedPartyType>
(corresponding field relatedParty.@referredType)
<TMFRelatedPartyId>123</TMFRelatedPartyId>
<TMFResourceRefId>123</TMFResourceRefId>
<TMFResourceReferredType>LogicalResource</TMFResourceReferredType>
(LogicalResource | PhysicalResource)
<TMFResourceRefProperty>id</TMFResourceRefProperty>
(The name of the resource property to be mapped (default: value). The member variables name must be "<propertyName (first character upper case)>", e.g. myresourceId)
<TMFServicePropertyName>name</TMFServicePropertyName>
(name of the TMF service property to be mapped, i.e. simple properties on top level of the service like @type, or "name")
<TMFExternalIdentifierName>123</TMFExternalIdentifierName>
<DataType xmlns="http://www.gip.com/xyna/xdev/xfractmod" BaseTypeName="BaseService" BaseTypePath="xact.srvc.base" IsAbstract="false" Label="Network Access Service" TypeName="NetworkAccessService" TypePath="xact.srvc" Version="1.8">
<Meta>
<IsServiceGroupOnly>false</IsServiceGroupOnly>
<TMFLifecycleStatus>Active</TMFLifecycleStatus>
</Meta>
<Data Label="Physical Bandwidth Building Block" VariableName="physicalBandwidthBuildingBlock">
<Meta>
<Type>String</Type>
<Documentation>1GE, 10GE, 100GE, 400GE</Documentation>
<TMFType>Characteristic</TMFType>
<TMFCharMinCardinality>1</TMFCharMinCardinality>
<TMFCharMaxCardinality>1</TMFCharMaxCardinality>
<TMFCharValueEnums>1GE, 10GE, 100GE, 400GE</TMFCharValueEnums>
<TMFCharValueDefault>10GE</TMFCharValueDefault>
</Meta>
</Data>
...