Package com.iizix.text
Class KStringPLAINTag<TARGET extends GProp<?>>
java.lang.Object
com.iizix.text.KStringTag<TARGET>
com.iizix.text.KStringPLAINTag<TARGET>
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- KStringPLAINTextTableTag,- KStringPLAINVirtualSpaceTag
Abstract class used by the PLAIN TextTable, VirtualSpace and Connector tags.
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from class com.iizix.text.KStringTag- KStringTag.Type
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- KStringPLAINTag- (KStringTag.Type type, String ref, String inputString, int position, LinkedHashMap<String, - String> attributes) Creates a VirtualSpace tag for KString that is of type PLAIN.
- Method SummaryModifier and TypeMethodDescription- boolean- equalsName- (KStringTag<?> kst) Checks for the same "name" (tag ordinal and closing tag for HTML, tag name for PLAIN).- final String- getHTMLTagText- (StringBuilder useme, IKStringInfoProvider provider) Gets the "unparsed" string representation of this tag in the HTML format, e.g.- final String- getPLAINTagText- (StringBuilder useme) Gets the "unparsed" string representation of this tag in the PLAIN format.- final StringGets the reference.- final booleanChecks if this tag is of reference type, i.e.- boolean- setReference- (String ref) Updates the reference for the tag.- final booleanChecks if this string will lose formatting when translated to PLAIN.- Methods inherited from class com.iizix.text.KStringTag- appendHTMLAttributes, appendHTMLAttributes, appendHTMLAttributesSkip, appendPLAINAttributes, appendPLAINValue, clone, disposeTagReference, equals, getAttribute, getHTMLString, getPLAINString, getReferenceClass, getReferenceError, getReferenceType, getSourceEndPosition, getSourceLength, getSourcePosition, getType, isReferenceValid, isRefreshRequired, isRefreshRequired, resolve, setAttribute, setSourceLocation, verify
- Field Details- refThe name in the text table.
 
- Constructor Details- KStringPLAINTagpublic KStringPLAINTag- (KStringTag.Type type, String ref, String inputString, int position, LinkedHashMap<String, - String> attributes) throws KStringParseExceptionCreates 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 Details- getReferenceGets the reference.- Overrides:
- getReferencein class- KStringTag<TARGET extends GProp<?>>
- Returns:
- The reference string to the property.
 
- setReferenceUpdates the reference for the tag.- Specified by:
- setReferencein class- KStringTag<TARGET extends GProp<?>>
- Parameters:
- ref- The new reference string.
- Returns:
- true if changed, false for no change.
- Throws:
- NullPointerException- If ref is null.
 
- isReferenceTagpublic 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:
- isReferenceTagin class- KStringTag<TARGET extends GProp<?>>
 
- willLoseFormattingpublic 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:
- willLoseFormattingin class- KStringTag<TARGET extends GProp<?>>
- Returns:
- Always false.
 
- getPLAINTagTextGets the "unparsed" string representation of this tag in the PLAIN format.- Specified by:
- getPLAINTagTextin class- KStringTag<TARGET extends GProp<?>>
 
- getHTMLTagTextGets 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:
- getHTMLTagTextin class- KStringTag<TARGET extends GProp<?>>
- Parameters:
- useme- Temporary StringBuilder for any use.
- provider- The information provider or null for none.
 
- equalsNameChecks for the same "name" (tag ordinal and closing tag for HTML, tag name for PLAIN).- Overrides:
- equalsNamein class- KStringTag<TARGET extends GProp<?>>