Class MTag

    • Constructor Detail

      • MTag

        public MTag​(String id,
                    String type)
        Creates a new opening tag for a marker.
        Parameters:
        id - the ID of the new marker.
        type - the type of the new marker (can be null for the default type).
      • MTag

        public MTag​(MTag opposite)
        Creates a new opening or closing tag for a marker.
        Parameters:
        opposite - the counterpart tag to connect to this new opening or closing tag.
      • MTag

        public MTag​(MTag original,
                    MTag opposite)
        Copy constructor.
        Parameters:
        original - the existing MTag to duplicate.
        opposite - the opposite tag to allow connecting the new created tag with its counterpart.
    • Method Detail

      • setTagType

        public void setTagType​(TagType markerType)
        Description copied from class: Tag
        Sets the TagType value of this tag.
        Overrides:
        setTagType in class Tag
        Parameters:
        markerType - the TagType to set.
      • getId

        public String getId()
        Description copied from class: Tag
        Gets the id for the code or annotation using this tag.
        Specified by:
        getId in interface IWithITSAttributes
        Specified by:
        getId in class Tag
        Returns:
        the id for the code or annotation using this tag.
      • getType

        public String getType()
        Description copied from class: Tag
        Gets the type of the code or marker this tag represents.
        Specified by:
        getType in class Tag
        Returns:
        the type of the code or marker this tag represents. If this is a CTag the type value can be null.
      • setType

        public void setType​(String type)
        Description copied from class: Tag
        Sets the type of the code or marker (for both opening/closing tags).
        Specified by:
        setType in class Tag
        Parameters:
        type - the type of the code or marker this tag represents.
      • getRef

        public String getRef()
        Gets the URI reference for this marker.
        Returns:
        the URI reference for this marker (can be null).
      • setRef

        public void setRef​(String ref)
        Sets the URI reference for this marker (for both opening/closing tags).
        Parameters:
        ref - the new URI reference for this marker (can be null).
      • getValue

        public String getValue()
        Gets the value for this marker.
        Returns:
        the value for this marker (can be null).
      • setValue

        public void setValue​(String value)
        sets the value for this marker (for both opening/closing tags).
        Parameters:
        value - the new value for this marker.
      • getTranslate

        public Boolean getTranslate()
        Gets the translate property for this marker.
        Returns:
        the translate property for this marker (can be null).
      • setTranslate

        public void setTranslate​(Boolean translate)
        Sets the translate property for this marker (for both opening/closing tags).
        Parameters:
        translate - the new translate property (can be null).
      • equals

        public boolean equals​(Object other)
        Description copied from class: Tag
        Indicates if this tag is equal to another.

        Use the == operator to test if two tags are the same.

        Overrides:
        equals in class Tag
        Parameters:
        other - the other tag to compare to this one.
        Returns:
        true if both tags are equals.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Tag
      • isMarker

        public boolean isMarker()
        Description copied from class: Tag
        Indicates if this tag is for a marker (MTag).
        Specified by:
        isMarker in class Tag
        Returns:
        true if this tag is one for a marker (MTag), false if it is for a code (CTag).
      • isCode

        public boolean isCode()
        Description copied from class: Tag
        Indicates if this tag is for a code (CTag).
        Specified by:
        isCode in class Tag
        Returns:
        true if this tag is used by a code (CTag), false if it is for a marker (MTag).
      • hasITSItem

        public boolean hasITSItem()
        Description copied from interface: IWithITSAttributes
        Indicates if the object has at least one ITS item.
        Specified by:
        hasITSItem in interface IWithITSAttributes
        Returns:
        true if the object has at least one ITS item.
      • getITSItems

        public ITSItems getITSItems()
        Description copied from interface: IWithITSAttributes
        Gets the ITS items associated with this object.
        Specified by:
        getITSItems in interface IWithITSAttributes
        Returns:
        the ITS items associated with this object (can be empty, but never null).
      • setITSItems

        public void setITSItems​(ITSItems itsItems)
        Description copied from interface: IWithITSAttributes
        Sets the list of the ITS items associated with this object.
        Specified by:
        setITSItems in interface IWithITSAttributes
        Parameters:
        itsItems - the new items to set.