Interface MetaDataType<T extends MetaData>
- All Known Subinterfaces:
MetaDataType.BooleanMetaDataType
,MetaDataType.DateTimeMetaDataType
,MetaDataType.HiddenMetaDataType
,MetaDataType.HtmlMetaDataType
,MetaDataType.ImageMetaDataType
,MetaDataType.MTSymbolMetaDataType
,MetaDataType.NumberMetaDataType
,MetaDataType.OptionsMetaDataType
,MetaDataType.TextMetaDataType
,MetaDataType.UrlMetaDataType
public interface MetaDataType<T extends MetaData>
A type of meta-data that can be read from documents
from a specific source. Meta data types are used by
Modeling Tool to construct a proper UI for meta data of that type.
The types available are displayed below with typical editors. Some editors
can be changed by the InputDescriptor of the MetaData.
- Boolean values - A yes/no option, typically a checkbox.
- Hidden values - A hidden value that is never displayed to the user.
- Text values - A string, typically a text input field.
- Html values - A string, typically a rich text input field.
- Image values - An image, typically a file chooser.
- Url values - A string that must be a proper URL, typically a text input field.
- Option values - A list of pre-existing options, typically a drop down box.
- Date time values - A date and/or time, typically a date picker.
- Number values - A string, typically a text input field where only numbers are allowed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static enum
Column types are used by Modeling Tool's browser UI to determine in which column to place meta data of a certain type.static enum
static interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptiondefault MetaDataType.ColumnType
default T
getDefaultValue
(Document doc) default Icon
getIcon()
A 16x16 icon representing the meta-data typegetID()
default Optional<? extends InputDescriptor<T>>
getTitle()
default boolean
isEditable
(Document doc) default boolean
isIcon
(MetaDataType.ColumnType columnType) default boolean
Return true if the values can be selected as a column in lists.default boolean
Returns true if the values can be null.default boolean
isValue
(MetaDataType.ColumnType columnType) default void
-
Method Details
-
getDocumentSource
DocumentSource getDocumentSource()- Returns:
- The source of this meta-data.
-
getID
String getID()- Returns:
- An id that is unique for this provider and meta-data type.
-
getIcon
A 16x16 icon representing the meta-data type- Returns:
- A 16x16 icon representing the meta-data type
-
getTitle
String getTitle()- Returns:
- The title of the meta-data, e.g. "Creator".
-
getDataType
- Returns:
- The data type for the meta-data.
-
getInputDescriptor
- Returns:
- An input descriptor for the data type. Some data types works well without an input descriptor but if using for example data type MultipleOptions an input descriptor is needed to supply the available options to choose from. The input descriptor must match the data type of the meta-data, e.g use "TextDescriptor" for "Text", otherwise an exception will be thrown when viewing or editing the data.
-
isEditable
- Parameters:
doc
- The document to test.- Returns:
- true if values for this meta-data type can be set from the user interface in 2c8 Modeling Tool.
-
isListColumn
default boolean isListColumn()Return true if the values can be selected as a column in lists.- Returns:
- true if the values can be selected as a column in lists.
-
getDefaultValue
- Parameters:
doc
- A document- Returns:
- a default value for types that are editable but does not necessarily have a current value for the type.
-
populate
-
isNullable
default boolean isNullable()Returns true if the values can be null.- Returns:
- true if the values can be null.
-
getColumnType
- Returns:
- Possible return values are: ColumnType.CUSTOM - unique data for this source that should be shown in a column in lists. Any other ColumnType - A predefined column type. These values will be shown in lists, and values from different sources with the same column type will be merged into the same column. There can only be one meta-data-type for each of these predefined column types per document source, and they must have the correct data type as specified by the column type. In addition there may be one other type defined per column type with the value type ImageValue. This will be used as an icon for values in that column. null - The values of this type will never be shown in list columns. All sources are required to implement at least two meta-data: 1. TextValue with ColumnType.TITLE 2. ImageValue with ColumnType.TITLE (icon for the document)
-
isValue
-
isIcon
-