Package com.lowagie.text.xml
Class XmlPeer
java.lang.Object
com.lowagie.text.xml.XmlPeer
- Direct Known Subclasses:
HtmlPeer
This interface is implemented by the peer of all the iText objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Properties
This is the Map that contains the aliases of the attributes.protected Properties
This is the Map that contains the default values of the attributes.protected String
This is the name of the alias.protected String
This is String that contains the default content of the attributes.protected String
This is the name of the alias. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets an alias for an attribute.void
Sets a value for an attribute.getAlias()
Gets the tagname of the peer.getAttributes
(Attributes attrs) Gets the list of attributes of the peer.Returns the default values.Returns the iText attribute name.getTag()
Gets the tagname of the peer.void
setContent
(String content) Sets the default content.
-
Field Details
-
tagname
This is the name of the alias. -
customTagname
This is the name of the alias. -
attributeAliases
This is the Map that contains the aliases of the attributes. -
attributeValues
This is the Map that contains the default values of the attributes. -
defaultContent
This is String that contains the default content of the attributes.
-
-
Constructor Details
-
XmlPeer
Creates a XmlPeer.- Parameters:
name
- the iText name of a tagalias
- the user defined name of a tag
-
-
Method Details
-
getTag
Gets the tagname of the peer.- Returns:
- the iText name of a tag
-
getAlias
Gets the tagname of the peer.- Returns:
- the user defined tagname
-
getAttributes
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
-
addAlias
Sets an alias for an attribute.- Parameters:
name
- the iText tagnamealias
- the custom tagname
-
addValue
Sets a value for an attribute.- Parameters:
name
- the iText tagnamevalue
- the default value for this tag
-
setContent
Sets the default content.- Parameters:
content
- the default content
-
getName
Returns the iText attribute name.- Parameters:
name
- the custom attribute name- Returns:
- iText translated attribute name
-
getDefaultValues
Returns the default values.- Returns:
- A set of default (user defined) values
-