Class ComplexTagDefinition

    • Constructor Detail

      • ComplexTagDefinition

        public ComplexTagDefinition()
      • ComplexTagDefinition

        public ComplexTagDefinition​(TagPath typePath,
                                    Tag source)
      • ComplexTagDefinition

        public ComplexTagDefinition​(Tag source)
      • ComplexTagDefinition

        public ComplexTagDefinition​(Tag source,
                                    boolean copyMembers)
      • ComplexTagDefinition

        public ComplexTagDefinition​(Tag source,
                                    boolean copyMembers,
                                    boolean localMembersOnly)
      • ComplexTagDefinition

        public ComplexTagDefinition​(Tag instanceDef,
                                    ComplexTag parentType)
        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

        public ComplexTagDefinition​(java.lang.String name,
                                    TagType type)
        New type instance. Used for creating new types or instances.
    • Method Detail

      • getFullyQualifiedType

        public TagPath 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 interface ComplexTag
      • getParentType

        public TagPath getParentType()
      • getMembers

        public java.util.Collection<Member> getMembers​(boolean opaque)
        Description copied from interface: ComplexTag
        If opaque, member config objects will already have overrides applied to them.
        Specified by:
        getMembers in interface ComplexTag
      • getLocalMembers

        public java.util.Collection<Member> getLocalMembers​(boolean opaque)
      • getMembers

        protected java.util.Collection<Member> getMembers​(boolean localOnly,
                                                          boolean opaque)
      • getMember

        public Member getMember​(java.lang.String memberUid)
        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 interface ComplexTag
      • 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 interface ComplexTag
      • getOverrides

        public PropertySet getOverrides​(java.lang.String memberUid)
        Gets the override set for the member. If the member doesn't have overrides defined, creates a new property set.
        Specified by:
        getOverrides in interface ComplexTag
      • addMember

        public java.util.List<Member> addMember​(java.lang.String parentUid,
                                                Tag member)
        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 interface MutableComplexTag
        Parameters:
        parentUid - the UID of the parent to receive the new child member
        member - the child to add
      • addMember

        public java.util.List<Member> addMember​(java.lang.String parentUid,
                                                TagPath fullPath,
                                                Tag member)
        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

        protected void addMembers​(java.util.Collection<Member> members,
                                  boolean localOnly)
        Adds the members to this definition. If adjustPath is true, the members will be modified so that their paths extend from this type.
      • addCompositeMember

        public void addCompositeMember​(Member definingMember,
                                       java.util.Collection<Member> opaqueSubMembers)
        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

        public void addMembers​(TagPath basePath,
                               java.util.Collection<Member> members)
      • addMember

        protected void addMember​(Member member)
      • removeMember

        public void removeMember​(java.lang.String memberUid)
        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 interface MutableComplexTag
        Parameters:
        memberUid - the uid of the member to remove from the complex tag
      • isMemberInherited

        protected boolean isMemberInherited​(Member m)
      • getTypePathFor

        public static TagPath getTypePathFor​(Tag tag)
      • createTypeFrom

        public static ComplexTagDefinition createTypeFrom​(java.util.List<? extends TagNode> tags)
        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

        protected void addTagMembersDeep​(TagNode node,
                                         java.lang.String parentId,
                                         TagPath curPath)