Interface HasTags

All Known Subinterfaces:
EntityExtended, ExternalEntity, HasMutableTags, MutableEntityExtended, MutableExternalEntity
All Known Implementing Classes:
Comment, Document, EntityExtendedImp, ExternalEntityImp, MutableEntityExtendedImp, MutableExternalEntityImp

public interface HasTags
The interface defines a mixin and abstracts an entity with readable tags.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    String representation of the property associated with the mixin.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    containsTag(@NotNull String tag)
     
    default boolean
    containsTag(String namespace, @NotNull String name)
    True, if the tag with the given tag identification containing optional namespace and tag name could be found.
    default Optional<Tag>
    findBy(@NotNull String tag)
    Finds the tag with the given tag identification containing optional namespace and tag name.
    default Optional<Tag>
    findBy(String namespace, @NotNull String name)
    Searches for a tag with the given namespace and name.
    default Collection<Tag>
     
    default String
    Return the collection of tags as a canonical string representation.
    Returns the collection of tags for the entity.
    default Optional<String>
    value(@NotNull String tag)
    Returns the value of the tag with the given qualified tag name.
    default Optional<String>
    value(@NotNull String namespace, @NotNull String tag)
    Returns the value of the tag with the given qualified tag name.
  • Field Details

  • Method Details

    • tags

      Collection<Tag> tags()
      Returns the collection of tags for the entity.
      Returns:
      collection of tags
    • findBy

      default Optional<Tag> findBy(@NotNull @NotNull String tag)
      Finds the tag with the given tag identification containing optional namespace and tag name.
      Parameters:
      tag - tag identification of the tag to be removed
      Returns:
      requested tag as optional
    • findBy

      default Optional<Tag> findBy(String namespace, @NotNull @NotNull String name)
      Searches for a tag with the given namespace and name.
      Parameters:
      namespace - optional namespace of the tag to be found
      name - name of the tag to be found
      Returns:
      optional found tag
    • containsTag

      default boolean containsTag(@NotNull @NotNull String tag)
    • containsTag

      default boolean containsTag(String namespace, @NotNull @NotNull String name)
      True, if the tag with the given tag identification containing optional namespace and tag name could be found.
      Parameters:
      namespace - optional namespace of the tag
      name - name of the tag
      Returns:
      flag indicating if the tag is existing
    • value

      default Optional<String> value(@NotNull @NotNull String tag)
      Returns the value of the tag with the given qualified tag name.
      Parameters:
      tag - qualified tag name
      Returns:
      the tag value if found
    • value

      default Optional<String> value(@NotNull @NotNull String namespace, @NotNull @NotNull String tag)
      Returns the value of the tag with the given qualified tag name.
      Parameters:
      namespace - namespace of the tag
      tag - qualified tag name
      Returns:
      the tag value if found
    • findByNamespace

      default Collection<Tag> findByNamespace(String namespace)
    • rawTags

      default String rawTags()
      Return the collection of tags as a canonical string representation.
      Returns:
      text representation of the tag collection