Class KStringPLAINTag<TARGET extends GProp<?>>

    • Field Detail

      • ref

        protected java.lang.String ref
        The name in the text table.
    • Constructor Detail

      • KStringPLAINTag

        public KStringPLAINTag​(KStringTag.Type type,
                               java.lang.String ref,
                               java.lang.String inputString,
                               int position,
                               java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes)
                        throws KStringParseException
        Creates a VirtualSpace tag for KString that is of type PLAIN.
        Parameters:
        type - The connector type.
        ref - The reference value.
        inputString - The input string.
        position - The position in the character based and parsed string.
        attributes - The attributes for the tag.
        Throws:
        KStringParseException - If the reference is missing or empty.
    • Method Detail

      • getReference

        public final java.lang.String getReference()
        Gets the reference.
        Overrides:
        getReference in class KStringTag<TARGET extends GProp<?>>
        Returns:
        The reference string to the property.
      • setReference

        public boolean setReference​(java.lang.String ref)
        Updates the reference for the tag.
        Specified by:
        setReference in class KStringTag<TARGET extends GProp<?>>
        Parameters:
        ref - The new reference string.
        Returns:
        true if changed, false for no change.
        Throws:
        java.lang.NullPointerException - If ref is null.
      • isReferenceTag

        public final boolean isReferenceTag()
        Checks if this tag is of reference type, i.e. for HTML, the tags A, IMG, IZ. For PLAIN KString type, this method always returns true.
        Specified by:
        isReferenceTag in class KStringTag<TARGET extends GProp<?>>
      • willLoseFormatting

        public final boolean willLoseFormatting()
        Checks if this string will lose formatting when translated to PLAIN. Note that translating PLAIN to HTML never loses formatting.
        Specified by:
        willLoseFormatting in class KStringTag<TARGET extends GProp<?>>
        Returns:
        Always false.
      • getPLAINTagText

        public final java.lang.String getPLAINTagText​(java.lang.StringBuilder useme)
        Gets the "unparsed" string representation of this tag in the PLAIN format.
        Specified by:
        getPLAINTagText in class KStringTag<TARGET extends GProp<?>>
      • getHTMLTagText

        public final java.lang.String getHTMLTagText​(java.lang.StringBuilder useme,
                                                     IKStringInfoProvider provider)
        Gets the "unparsed" string representation of this tag in the HTML format, e.g. this PLAIN tag will reformat or translate itself for HTML with the IZ type="xx" ref="fullPath" [attr=value] ....
        Specified by:
        getHTMLTagText in class KStringTag<TARGET extends GProp<?>>
        Parameters:
        useme - Temporary StringBuilder for any use.
        provider - The information provider or null for none.
      • equalsName

        public boolean equalsName​(KStringTag<?> kst)
        Checks for the same "name" (tag ordinal and closing tag for HTML, tag name for PLAIN).
        Overrides:
        equalsName in class KStringTag<TARGET extends GProp<?>>