Class ComplexTagDefinition
java.lang.Object
com.inductiveautomation.ignition.common.config.BasicPropertySet
com.inductiveautomation.ignition.common.sqltags.TagDefinition
com.inductiveautomation.ignition.common.sqltags.udt.ComplexTagDefinition
- All Implemented Interfaces:
Countable
,Extendable<PropertySet>
,Mergable<PropertySet>
,MutablePropertyValueSource
,ObservablePropertySet
,PropertySet
,PropertyValueSource
,MutableTag
,Tag
,TagNode
,ComplexTag
,MutableComplexTag
,Serializable
,Comparable<Tag>
,Iterable<PropertyValue>
The ComplexTagDefinition is the primary implementation of ComplexTag. It can be used to create fully built opaque
representations of a UDT, or it can be used for just the local definition of the type or instance. In other words,
this definition may be a partial definition of the overall type.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.common.config.BasicPropertySet
BasicPropertySet.Builder
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionComplexTagDefinition
(Tag source) ComplexTagDefinition
(TagPath typePath, Tag source) ComplexTagDefinition
(Tag source, boolean copyMembers) ComplexTagDefinition
(Tag source, boolean copyMembers, boolean localMembersOnly) ComplexTagDefinition
(Tag instanceDef, ComplexTag parentType) This is the constructor for a complex instance.ComplexTagDefinition
(String name, TagType type) New type instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompositeMember
(Member definingMember, Collection<Member> opaqueSubMembers) Adds the member, along with the sub members (which can be null, for simple types).protected void
Adds the given tag as a member under the provided parent folder uid.Adds the given tag under the provided folder id, but with the specified full path.void
addMembers
(TagPath basePath, Collection<Member> members) protected void
addMembers
(Collection<Member> members, boolean localOnly) Adds the members to this definition.protected void
addTagMembersDeep
(TagNode node, String parentId, TagPath curPath) static ComplexTagDefinition
createTypeFrom
(List<? extends TagNode> tags) Creates a new data type definition from the provided tag nodes.Returns the type id of this tag.getLocalMembers
(boolean opaque) Returns the member of this complex tag with the given UID, or null if the member doesn't exist.getMembers
(boolean opaque) If opaque, member config objects will already have overrides applied to them.protected Collection<Member>
getMembers
(boolean localOnly, boolean opaque) getOverrides
(String memberUid) Gets the override set for the member.static TagPath
getTypePathFor
(Tag tag) protected boolean
boolean
Returns whether this complex type is a type definition, or an instance.void
removeMember
(String memberUid) Removes the given member from this complex tag object.Methods inherited from class com.inductiveautomation.ignition.common.sqltags.TagDefinition
addChild, addChildren, applyDiff, compareTo, fromNodeDescription, get, getAccessRights, getAlarmStates, getAttribute, getAttributesFrom, getChild, getChildren, getCurrentValue, getDataType, getEventScripts, getExtendedProperties, getName, getOrDefault, getPermissionModel, getPropertyOverrides, getType, isEnabled, isInherited, removeChild, setAccessRights, setAlarmStates, setAlarmStates, setAttribute, setCurrentValue, setDataType, setEnabled, setEventScripts, setName, setPermissionModel, setRawAttributes, setType, setValue
Methods inherited from class com.inductiveautomation.ignition.common.config.BasicPropertySet
addPropertyChangeListener, addPropertyChangeListener, change, coerceValue, contains, equals, firePropertyChange, getCount, getExtension, getOrElse, getProperties, getRaw, getRawValueMap, getValues, isExtended, iterator, of, remove, removePropertyChangeListener, removePropertyChangeListener, set, set, setDirect, setImpl, setRawValueMap, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.inductiveautomation.ignition.common.sqltags.model.udt.MutableComplexTag
setName
Methods inherited from interface com.inductiveautomation.ignition.common.config.MutablePropertyValueSource
merge
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
extend, newDefaultInstance, newExtension
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertyValueSource
getNonNull, getNonNull
Methods inherited from interface com.inductiveautomation.ignition.common.sqltags.model.Tag
getAccessRights, getAlarmStates, getAttribute, getCurrentValue, getDataType, getEventScripts, getName, getPermissionModel, getType, isEnabled
-
Constructor Details
-
ComplexTagDefinition
public ComplexTagDefinition() -
ComplexTagDefinition
-
ComplexTagDefinition
-
ComplexTagDefinition
-
ComplexTagDefinition
-
ComplexTagDefinition
This is the constructor for a complex instance. The type stack should have at least one member- the defining type. The instance will inherit all of the members of the type hierarchy. The type of the tag will be assumed from the most recent member of the type stack. -
ComplexTagDefinition
New type instance. Used for creating new types or instances.
-
-
Method Details
-
getFullyQualifiedType
Description copied from interface:ComplexTag
Returns the type id of this tag. If the tag is an instance, will be the type of its parent.- Specified by:
getFullyQualifiedType
in interfaceComplexTag
-
getParentType
-
getMembers
Description copied from interface:ComplexTag
If opaque, member config objects will already have overrides applied to them.- Specified by:
getMembers
in interfaceComplexTag
-
getLocalMembers
-
getMembers
-
getMember
Description copied from interface:ComplexTag
Returns the member of this complex tag with the given UID, or null if the member doesn't exist. However, if the memberUID is null, it returns a member for the root complex tag (a faux member, that is not included in the getMembers() results).- Specified by:
getMember
in interfaceComplexTag
-
isTypeDef
public boolean isTypeDef()Description copied from interface:ComplexTag
Returns whether this complex type is a type definition, or an instance.- Specified by:
isTypeDef
in interfaceComplexTag
-
getOverrides
Gets the override set for the member. If the member doesn't have overrides defined, creates a new property set.- Specified by:
getOverrides
in interfaceComplexTag
-
addMember
Adds the given tag as a member under the provided parent folder uid. A member uid will be generated, if one cannot be found using TagProp.UDTMemberUID on the tag.- Specified by:
addMember
in interfaceMutableComplexTag
- Parameters:
parentUid
- the UID of the parent to receive the new child membermember
- the child to add
-
addMember
Adds the given tag under the provided folder id, but with the specified full path. The full path must be consistent with the parent id. Use the addMember(String, Tag) version of this function to look up the path based on the parent UID. -
addMembers
Adds the members to this definition. If adjustPath is true, the members will be modified so that their paths extend from this type. -
addCompositeMember
Adds the member, along with the sub members (which can be null, for simple types). The sub member UIDs will be updated to reflect their new position in the hierarchy. -
addMembers
-
addMember
-
removeMember
Description copied from interface:MutableComplexTag
Removes the given member from this complex tag object. It's important to note that members can only be removed from the complex tag that defines it- not from sub classes or instances.- Specified by:
removeMember
in interfaceMutableComplexTag
- Parameters:
memberUid
- the uid of the member to remove from the complex tag
-
isMemberInherited
-
getTypePathFor
-
createTypeFrom
Creates a new data type definition from the provided tag nodes. If only a single folder node is passed in, it's children will be the root of the type. -
addTagMembersDeep
-