SysMLConnector
QualifiedNameOf
qualified name of a given SysML model element
Calling Sequence
Parameters
Description
Examples
QualifiedNameOf(t, o, 'fullname'=f)
QualifiedNameOf(u, o, 'fullname'=f)
t
-
table in JSON format; previously downloaded SysML model element
u
UUID string, or table where u["@id"] is a UUID string
o
(optional) either 'string' (default) or 'symbol'; determines the return type
f
(optional) one of true (default), false, or short; determines the form of the output
The QualifiedNameOf(t) returns the qualified name of the SysML model element t as a string or a name, starting from the owner of t and proceeding recursively until the root element is reached. The individual names of the qualified name are separated by the two characters ::.
The QualifiedNameOf(u) calling sequence first downloads the model element with UUID u from the SysML server, if necessary, and then proceeds as above.
An error is raised if u does not contain a valid UUID or the model element cannot be found on the server.
An error is raised if t does not have a name, or if t has no owner and is not the root element. This is also the case if one of the two conditions is met for any model element during the recursion.
The optional parameter f determines the form of the output.
If f=true (the default), then the fully qualified name is returned, starting from the root element.
If f=false, then only the name of t itself is returned, unless t is the root element.
If f=short, then in general a name of the form a::b is returned, where b is the name of t and a is the name of its owner.
In either case, the return value is the empty string (or name) when t is the root element, and it is just the name of t if t is a child of the root element, e.g., a top level package.
The commands QualifiedNameOf and QueryModel are inverses of each other, in the sense that
QueryModel(QualifiedNameOf(t))[3] = t for a model element t, and
QualifiedNameOf(QueryModel(n)[3]) = n for a qualified name n.
Use of this command requires an active server connection, using the Connect command. If such a connection does not exist, an error will be raised.
with⁡SysMLConnector
ClearChangeSet,Commit,Connect,GetBinding,GetChildren,GetConstraint,GetInstances,GetSlots,GetValue,Login,Logout,PrintChangeSet,PrintElement,PutConstraint,PutValue,QualifiedNameOf,QueryModel,Warnlevel
Login⁡https://twc.mycompany.com:8111/,user=alice,password=a%5Wr^Xt0p@2
Connect⁡JMPTWCSysML:
Query by fully qualified name. The result is a Property with stereotype Value Property.
Velocity_in≔QueryModel⁡Model-Turbofan::System Breakdown::System Structure::Analysis Block::Velocity_in
Velocity_in≔ad42d107-2e10-477c-bb4d-32eed2dac1ba,uml:Property,ValueProperty,Velocity_in
Qualified name of the type of Velocity_in3.
QualifiedNameOf⁡Velocity_in3type
Model-Turbofan::Value Types::velocity
QualifiedNameOf⁡Velocity_in3type,output=name,fullname=short
Value Types::velocity
Qualified name of the root element.
QualifiedNameOf⁡QueryModel⁡3
Logout⁡
See Also
Connect
QueryModel
Download Help Document