org.xwiki.rendering.listener
Class MetaData

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

public class MetaData
extends Object

Represents a set of MetaData.

Since:
3.0M2
Version:
$Id: fef3a9835f9a4a53bc7582a8dd0d0457cc6cc39d $

Field Summary
static String BASE
          Represent the base reference to resolve all the references in the blocks (links, images, macro parameters, etc.).
static MetaData EMPTY
          Represents no MetaData.
static String SOURCE
          Represents a source metaData, which corresponds to the reference to the source entity containing the content to render.
static String SYNTAX
          Represents the syntax of the content found in macro containing wiki content (like a box macro for example).
 
Constructor Summary
MetaData()
          Empty metaData.
MetaData(Map<String,Object> metaData)
           
 
Method Summary
 void addMetaData(MetaData metaData)
           
 void addMetaData(String key, Object value)
           
 boolean contains(String key)
           
 boolean equals(Object obj)
           
 Map<String,Object> getMetaData()
           
 Object getMetaData(String key)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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:
Constant Field Values

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:
Constant Field Values

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:
Constant Field Values
Constructor Detail

MetaData

public MetaData()
Empty metaData.


MetaData

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

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


Copyright © 2004-2013 XWiki. All Rights Reserved.