Class MetaData

java.lang.Object
org.xwiki.rendering.listener.MetaData

public class MetaData extends Object
Represents a set of MetaData.
Since:
3.0M2
Version:
$Id: bf99a6e93d928b26e1ecbbf3b94150d7aa531201 $
  • Field Details

    • EMPTY

      public static final MetaData EMPTY
      Represents no MetaData.
    • SOURCE

      public static final String SOURCE
      Represents a source metaData, which corresponds to the reference to the source entity containing the content to render. The reference is a free form text in a format that is understood by the Listeners supporting it.
      See Also:
    • SYNTAX

      public static final String SYNTAX
      Represents the syntax of the content found in macro containing wiki content (like a box macro for example). The value has to be a Syntax object.
      Since:
      3.0M3
      See Also:
    • BASE

      public static final String BASE
      Represent the base reference to resolve all the references in the blocks (links, images, macro parameters, etc.).
      Since:
      3.4M1
      See Also:
    • NON_GENERATED_CONTENT

      public static final String NON_GENERATED_CONTENT
      Represents a non generated content: a content that has not been transformed in any way.
      Since:
      10.10
      See Also:
    • PARAMETER_NAME

      public static final String PARAMETER_NAME
      Represents a metadata attached to a specific parameter identified by the given name.
      Since:
      11.1RC1
      See Also:
  • Constructor Details

    • MetaData

      public MetaData()
      Empty metaData.
    • MetaData

      public MetaData(Map<String,Object> metaData)
      Parameters:
      metaData - the metadata to set
  • Method Details

    • addMetaData

      public void addMetaData(String key, Object value)
      Parameters:
      key - the key to the metadata element to add (e.g. "syntax")
      value - the value of the metadata element to add (e.g. a Syntax object)
    • addMetaData

      public void addMetaData(MetaData metaData)
      Parameters:
      metaData - the metadata to add
    • getMetaData

      public Object getMetaData(String key)
      Parameters:
      key - the key to the metadata element to retrieve (e.g. "syntax")
      Returns:
      the metadata corresponding to the passed key of null if no such metadata exist.
    • contains

      public boolean contains(String key)
      Parameters:
      key - the key to the metadata element to check for
      Returns:
      true if there's a metadata with the passed key, false otherwise
      Since:
      3.0M3
    • getMetaData

      public Map<String,Object> getMetaData()
      Returns:
      all the metadata
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object