public abstract class AbstractPropertiesDoc extends AbstractObjectDoc implements PropertiesDoc
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractPropertiesDoc.CellText |
INHERITED_FROM
DEFAULT_PREFIX_FMT
Modifier | Constructor and Description |
---|---|
protected |
AbstractPropertiesDoc(DocgenConfig docgenCfg,
UmlObject object,
java.lang.String what,
java.lang.String introText,
java.lang.String captionText,
TableSpec colSpec,
java.lang.String tableName,
BookmarkRegistry bmRegistry)
Creates an instance with a
EntryDoc.Kind.tableName entry (if
tableName is not null) and
EntryDoc.Kind.columnLabels entry (from
colSpec ) in the list of entries; use when you want to add
EntryDoc.Kind.data (and optionally,
EntryDoc.Kind.groupSubhead ) entries one by
one, after some complex processing. |
protected |
AbstractPropertiesDoc(DocgenConfig docgenCfg,
UmlObject object,
java.lang.String what,
TextDescription description,
TextDescription htmlDescription,
boolean ignoreDesc,
java.lang.String headingText,
java.lang.String introText,
java.lang.String captionText,
TableSpec colSpec,
java.lang.String tableName,
BookmarkRegistry bmRegistry)
Same as
AbstractPropertiesDoc(DocgenConfig, UmlObject, String, String, String, TableSpec, String, BookmarkRegistry)
, but with explicit text and html documentation parameters; this is to support chained
construction for the needs of testing where we don't have UML objects but want to print
descriptions. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addEntry(EntryDoc entryDoc)
Returns whether
entryDoc has been successfully added. |
protected AbstractPropertiesDoc.CellText |
deduceCellText(java.lang.String prefix,
TextDescription raw,
TextDescription html,
UmlObject o) |
protected AbstractPropertiesDoc.CellText |
deduceCellText(java.lang.String prefix,
UmlObject o)
Selects the description to retain, according to configuration.
|
protected void |
filterAssociationEnds(UmlClass c,
java.util.Collection<UmlAssociationEndPair> retainedNatives,
java.util.Collection<UmlAssociationEndPair> retainedInheriteds) |
protected void |
filterAttributes(UmlClass c,
java.util.Collection<UmlAttribute> retainedNatives,
java.util.Collection<UmlAttribute> retainedInheriteds) |
protected void |
filterOperations(UmlClass c,
java.util.Collection<UmlOperation> retainedNatives,
java.util.Collection<UmlOperation> retainedInheriteds) |
java.lang.String[] |
getBookmarkIDs()
Returns array of bookmark IDs for every row
i , with potential null entries. |
java.lang.String |
getCaptionText()
Returns text that describes the caption (e.g., "Table 23 - [captionText]").
|
java.lang.String[][] |
getCellValues()
Returns the full table values, including heading rows (table name and column names), any
potential sub-head and the actual rows with values.
|
int |
getColumnCount()
Returns number of columns for the table; must be same as
TableSpec.colCount() from
the columns spec returned by PropertiesDoc.getTableSpec() . |
java.util.List<? extends EntryDoc> |
getDataEntryDocs()
Returns (unmodifiable list of) data entries only.
|
protected static java.lang.String |
getDeprecatedTextAsPrefix(UmlObject o)
Returns empty string if property is not deprecated, otherwise formatted text ending with
white space.
|
java.util.List<? extends EntryDoc> |
getEntryDocs()
Returns (unmodifiable list of) all entries.
|
TextDescription.TextKind[] |
getFormats()
Returns array of applied formattings for the formattable cells in every row
i . |
int |
getHeadingEntriesCount()
Returns the number of header entries (
EntryDoc.Kind.tableName or
EntryDoc.Kind.columnLabels ) in this instance. |
protected static java.lang.String |
getInitValAsPrefix(UmlAttribute attr)
Returns the formatted initial value detail (const/default/range) to be used as prefix.
|
protected static java.lang.String |
getInitValAsSuffix(UmlAttribute attr)
Returns the formatted initial value detail (const/initial/range) to be used as suffix.
|
java.lang.String |
getIntroText()
Returns text that will introduce the table (e.g.
|
int |
getRowCount()
Returns number of rows for the table.
|
EntryDoc.Kind[] |
getRowKinds()
Returns kinds for rows from
PropertiesDoc.getCellValues() . |
java.lang.String |
getTableName()
Returns the name of the table; this will be the first heading row, when non-null.
|
TableSpec |
getTableSpec()
Returns columns specification.
|
protected void |
initRawData(EntryDoc entry,
UmlObject property)
Initialises raw data for a native property (tag, name, alias+ID, desc+ID, informative,
deprecated, inheritedFrom).
|
protected void |
initRawData(EntryDoc entry,
UmlObject property,
java.lang.String baseTypeName)
Initialises raw data for an inherited property (tag, name, alias+ID, desc+ID, informative,
deprecated, inheritedFrom).
|
boolean |
notEmpty()
Returns whether there are any non-heading entries (
EntryDoc.Kind.groupSubhead or
EntryDoc.Kind.data ) in this instance. |
protected boolean |
toSkipInherited(UmlObject o)
Returns whether inherited object
o needs to be skipped, according to
configuration. |
java.lang.String |
toString() |
copyCell, copyNonEmptyCell, createDocId, deduceBookmark, deduceQualifiersPrefix, deduceQualifiersPrefix, deduceQualifiersPrefix, deduceQualifiersPrefix, filterClasses, getBmRegistry, getBookmarkID, getCell, getCells, getDescription, getDocgenCfg, getHeadingText, hasKey, log, prepareForHyperlink, prepareForHyperlinkAdjustedName, putCell, putCellNonEmpty, toSkip, useHtml
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBmRegistry, getBookmarkID, getDescription, getDocgenCfg, getHeadingText
copyCell, copyNonEmptyCell, getCell, getCells, hasKey, putCell, putCellNonEmpty
protected AbstractPropertiesDoc(DocgenConfig docgenCfg, UmlObject object, java.lang.String what, java.lang.String introText, java.lang.String captionText, TableSpec colSpec, java.lang.String tableName, BookmarkRegistry bmRegistry)
EntryDoc.Kind.tableName
entry (if
tableName
is not null) and
EntryDoc.Kind.columnLabels
entry (from
colSpec
) in the list of entries; use when you want to add
EntryDoc.Kind.data
(and optionally,
EntryDoc.Kind.groupSubhead
) entries one by
one, after some complex processing.docgenCfg
- object
- what
- introText
- captionText
- colSpec
- tableName
- bmRegistry
- protected AbstractPropertiesDoc(DocgenConfig docgenCfg, UmlObject object, java.lang.String what, TextDescription description, TextDescription htmlDescription, boolean ignoreDesc, java.lang.String headingText, java.lang.String introText, java.lang.String captionText, TableSpec colSpec, java.lang.String tableName, BookmarkRegistry bmRegistry)
AbstractPropertiesDoc(DocgenConfig, UmlObject, String, String, String, TableSpec, String, BookmarkRegistry)
, but with explicit text and html documentation parameters; this is to support chained
construction for the needs of testing where we don't have UML objects but want to print
descriptions.docgenCfg
- object
- what
- description
- htmlDescription
- ignoreDesc
- headingText
- introText
- captionText
- colSpec
- tableName
- bmRegistry
- protected void initRawData(EntryDoc entry, UmlObject property)
entry
- property
- protected void initRawData(EntryDoc entry, UmlObject property, java.lang.String baseTypeName)
entry
- property
- baseTypeName
- name of base type from which this property gets inherited.protected final AbstractPropertiesDoc.CellText deduceCellText(java.lang.String prefix, UmlObject o)
protected final AbstractPropertiesDoc.CellText deduceCellText(java.lang.String prefix, TextDescription raw, TextDescription html, UmlObject o)
protected final boolean addEntry(EntryDoc entryDoc)
entryDoc
has been successfully added.protected final void filterAttributes(UmlClass c, java.util.Collection<UmlAttribute> retainedNatives, java.util.Collection<UmlAttribute> retainedInheriteds)
protected final void filterAssociationEnds(UmlClass c, java.util.Collection<UmlAssociationEndPair> retainedNatives, java.util.Collection<UmlAssociationEndPair> retainedInheriteds)
protected final void filterOperations(UmlClass c, java.util.Collection<UmlOperation> retainedNatives, java.util.Collection<UmlOperation> retainedInheriteds)
protected final boolean toSkipInherited(UmlObject o)
o
needs to be skipped, according to
configuration.public java.lang.String toString()
toString
in class AbstractObjectDoc
protected static final java.lang.String getDeprecatedTextAsPrefix(UmlObject o)
protected static java.lang.String getInitValAsSuffix(UmlAttribute attr)
protected static final java.lang.String getInitValAsPrefix(UmlAttribute attr)
public final boolean notEmpty()
PropertiesDoc
EntryDoc.Kind.groupSubhead
or
EntryDoc.Kind.data
) in this instance. Use this one to determine whether to print
table at all.notEmpty
in interface PropertiesDoc
public final java.lang.String getIntroText()
PropertiesDoc
getIntroText
in interface PropertiesDoc
public final java.lang.String getCaptionText()
PropertiesDoc
getCaptionText
in interface PropertiesDoc
public final int getHeadingEntriesCount()
PropertiesDoc
EntryDoc.Kind.tableName
or
EntryDoc.Kind.columnLabels
) in this instance.getHeadingEntriesCount
in interface PropertiesDoc
public final java.util.List<? extends EntryDoc> getEntryDocs()
PropertiesDoc
getEntryDocs
in interface PropertiesDoc
public java.util.List<? extends EntryDoc> getDataEntryDocs()
PropertiesDoc
getDataEntryDocs
in interface PropertiesDoc
public final java.lang.String getTableName()
PropertiesDoc
getTableName
in interface PropertiesDoc
public final TableSpec getTableSpec()
PropertiesDoc
PropertiesDoc.getTableName()
is null, labels from the columns
spec (or the corresponding entry) will be the first and only heading row, otherwise the
second heading row.getTableSpec
in interface PropertiesDoc
public final int getRowCount()
PropertiesDoc
getRowCount
in interface PropertiesDoc
public final int getColumnCount()
PropertiesDoc
TableSpec.colCount()
from
the columns spec returned by PropertiesDoc.getTableSpec()
.getColumnCount
in interface PropertiesDoc
public final java.lang.String[][] getCellValues()
PropertiesDoc
getCellValues
in interface PropertiesDoc
public final EntryDoc.Kind[] getRowKinds()
PropertiesDoc
PropertiesDoc.getCellValues()
.getRowKinds
in interface PropertiesDoc
public TextDescription.TextKind[] getFormats()
PropertiesDoc
i
.
If the formattable cell in a row contains no formatting at all, returns null at index
i
. If no row contains formatting, returns null.
The formattable column index j
is always the same for this table, and can be
obtained from TableSpec.getFmtIdx()
. This helps optimise writing content in a format
other than raw text.
getFormats
in interface PropertiesDoc
public java.lang.String[] getBookmarkIDs()
PropertiesDoc
i
, with potential null entries.getBookmarkIDs
in interface PropertiesDoc
Copyright 2009-2016 Tatjana (Tanja) Kostic