Interface HtmlElement

All Superinterfaces:
org.nasdanika.common.Adaptable, EObject, org.nasdanika.ncore.Marked, org.nasdanika.persistence.Marked, org.nasdanika.ncore.ModelElement, Notifier
All Known Subinterfaces:
Tag
All Known Implementing Classes:
HtmlElementImpl, TagImpl

public interface HtmlElement extends org.nasdanika.ncore.ModelElement
A representation of the model object 'Element'. Base class for other HTML and bootstrap elements.

The following features are supported:

See Also:
  • Method Details

    • getAttributes

      Returns the value of the 'Attributes' map. The key is of type String, and the value is of type EObject, Tag attributes. ## Interpolation Attribute values are interpolated, i.e. tokens in the form of ``${{token name[|default value]}}`` are replaced with the contextual values or default values, if any. Examples: * ``${my-style}`` - Token without a default value. * ``${font-weight|bold}`` - Token with a default value. ## Regular attributes For all top-level entries except ``class``, ``style``, and ``data`` attribute value is produced by converting the value to string for scalars and to JSON string for lists and maps. For attributes which do not start with ``data-`` a warning is issued if the value is not a scalar, i.e. a list or a map. ## Class For class attribute its value is formed by concantenating elements using space as a separator. If elements are hierarchical then class name is formed by concatenation with a dash (``-``) as a separator. ## Data If value of ``data`` attbibute is a map then keys of that map get concatenated with ``data`` using dash (``-``) as a separator, them same applies to nested maps. Non-map values become attribute values - scalars are converted to string, lists are converted to JSON string. ## Style Style can be defined as a string, list or map. If style is defined as a list, all list values are concatenated with a space as a separator - it is a convent way for long unstructured definitions. If style value is a map then the value and its contained map values are processed in the following fashion: * Keys are concatenated with dash as a separator. * List values are contcatenated wtih space as a separator.
      Returns:
      the value of the 'Attributes' map.
      See Also:
    • getContent

      Returns the value of the 'Content' containment reference list. The list contents are of type EObject. Container content. Content elements are adapted to ${javadoc/org.nasdanika.common.SupplierFactory} for generation of HTML content.
      Returns:
      the value of the 'Content' containment reference list.
      See Also: