com.lowagie.text.xml

Class XmlPeer

public class XmlPeer extends Object

This interface is implemented by the peer of all the iText objects.
Field Summary
protected PropertiesattributeAliases
This is the Map that contains the aliases of the attributes.
protected PropertiesattributeValues
This is the Map that contains the default values of the attributes.
protected StringcustomTagname
This is the name of the alias.
protected StringdefaultContent
This is String that contains the default content of the attributes.
protected Stringtagname
This is the name of the alias.
Constructor Summary
XmlPeer(String name, String alias)
Creates a XmlPeer.
Method Summary
voidaddAlias(String name, String alias)
Sets an alias for an attribute.
voidaddValue(String name, String value)
Sets a value for an attribute.
StringgetAlias()
Gets the tagname of the peer.
PropertiesgetAttributes(Attributes attrs)
Gets the list of attributes of the peer.
PropertiesgetDefaultValues()
Returns the default values.
StringgetName(String name)
Returns the iText attribute name.
StringgetTag()
Gets the tagname of the peer.
voidsetContent(String content)
Sets the default content.

Field Detail

attributeAliases

protected Properties attributeAliases
This is the Map that contains the aliases of the attributes.

attributeValues

protected Properties attributeValues
This is the Map that contains the default values of the attributes.

customTagname

protected String customTagname
This is the name of the alias.

defaultContent

protected String defaultContent
This is String that contains the default content of the attributes.

tagname

protected String tagname
This is the name of the alias.

Constructor Detail

XmlPeer

public XmlPeer(String name, String alias)
Creates a XmlPeer.

Parameters: name the iText name of a tag alias the user defined name of a tag

Method Detail

addAlias

public void addAlias(String name, String alias)
Sets an alias for an attribute.

Parameters: name the iText tagname alias the custom tagname

addValue

public void addValue(String name, String value)
Sets a value for an attribute.

Parameters: name the iText tagname value the default value for this tag

getAlias

public String getAlias()
Gets the tagname of the peer.

Returns: the user defined tagname

getAttributes

public Properties getAttributes(Attributes attrs)
Gets the list of attributes of the peer.

Parameters: attrs the user defined set of attributes

Returns: the set of attributes translated to iText attributes

getDefaultValues

public Properties getDefaultValues()
Returns the default values.

Returns: A set of default (user defined) values

getName

public String getName(String name)
Returns the iText attribute name.

Parameters: name the custom attribute name

Returns: iText translated attribute name

getTag

public String getTag()
Gets the tagname of the peer.

Returns: the iText name of a tag

setContent

public void setContent(String content)
Sets the default content.

Parameters: content the default content