com.day.cq.rewriter.pipeline
Class AttributesImpl

java.lang.Object
  extended by org.xml.sax.helpers.AttributesImpl
      extended by com.day.cq.rewriter.pipeline.AttributesImpl
All Implemented Interfaces:
Attributes

public class AttributesImpl
extends AttributesImpl

A helper Class creating SAX Attributes


Field Summary
static String CDATA
           
static Attributes EMPTY_ATTRIBUTES
           
static String ENTITIES
           
static String ENTITY
           
static String ID
           
static String IDREF
           
static String IDREFS
           
static String NAME
           
static String NAMES
           
static String NMTOKEN
           
static String NMTOKENS
           
static String NOTATION
           
static String NUMBER
           
static String NUMBERS
           
static String NUTOKEN
           
static String NUTOKENS
           
 
Constructor Summary
AttributesImpl()
          Constructor
AttributesImpl(Attributes attr)
          Constructor
 
Method Summary
 void addCDATAAttribute(String localName, String value)
          Add an attribute of type CDATA with empty Namespace to the end of the list.
 void addCDATAAttribute(String namespace, String localName, String value)
          Add an attribute of type CDATA with the namespace to the end of the list.
 void addCDATAAttribute(String uri, String localName, String qName, String value)
          Add an attribute of type CDATA to the end of the list.
 void removeAttribute(String localName)
          Remove an attribute
 void removeAttribute(String uri, String localName)
          Remove an attribute
static Attributes update(Attributes attributes, String name, String value)
          Utility method to update the value of the named attribute.
 
Methods inherited from class org.xml.sax.helpers.AttributesImpl
addAttribute, clear, getIndex, getIndex, getLength, getLocalName, getQName, getType, getType, getType, getURI, getValue, getValue, getValue, removeAttribute, setAttribute, setAttributes, setLocalName, setQName, setType, setURI, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ATTRIBUTES

public static final Attributes EMPTY_ATTRIBUTES

CDATA

public static final String CDATA
See Also:
Constant Field Values

ENTITY

public static final String ENTITY
See Also:
Constant Field Values

ENTITIES

public static final String ENTITIES
See Also:
Constant Field Values

ID

public static final String ID
See Also:
Constant Field Values

IDREF

public static final String IDREF
See Also:
Constant Field Values

IDREFS

public static final String IDREFS
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

NAMES

public static final String NAMES
See Also:
Constant Field Values

NMTOKEN

public static final String NMTOKEN
See Also:
Constant Field Values

NMTOKENS

public static final String NMTOKENS
See Also:
Constant Field Values

NOTATION

public static final String NOTATION
See Also:
Constant Field Values

NUMBER

public static final String NUMBER
See Also:
Constant Field Values

NUMBERS

public static final String NUMBERS
See Also:
Constant Field Values

NUTOKEN

public static final String NUTOKEN
See Also:
Constant Field Values

NUTOKENS

public static final String NUTOKENS
See Also:
Constant Field Values
Constructor Detail

AttributesImpl

public AttributesImpl()
Constructor


AttributesImpl

public AttributesImpl(Attributes attr)
Constructor

Method Detail

update

public static Attributes update(Attributes attributes,
                                String name,
                                String value)
Utility method to update the value of the named attribute. Returns an updated set of attributes instead of modifying the given attribute set as the given value may be read-only.

Parameters:
attributes - original set of attributes
name - attribute name
value - new attribute value
Returns:
updated set of attributes

addCDATAAttribute

public void addCDATAAttribute(String localName,
                              String value)
Add an attribute of type CDATA with empty Namespace to the end of the list.

For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.

Parameters:
localName - The local name.
value - The attribute value.

addCDATAAttribute

public void addCDATAAttribute(String namespace,
                              String localName,
                              String value)
Add an attribute of type CDATA with the namespace to the end of the list.

For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.

Parameters:
namespace - The namespace.
localName - The local name.
value - The attribute value.

addCDATAAttribute

public void addCDATAAttribute(String uri,
                              String localName,
                              String qName,
                              String value)
Add an attribute of type CDATA to the end of the list.

For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.

Parameters:
uri - The Namespace URI, or the empty string if none is available or Namespace processing is not being performed.
localName - The local name, or the empty string if Namespace processing is not being performed.
qName - The qualified (prefixed) name, or the empty string if qualified names are not available.
value - The attribute value.

removeAttribute

public void removeAttribute(String localName)
Remove an attribute


removeAttribute

public void removeAttribute(String uri,
                            String localName)
Remove an attribute



Copyright © 2009 Day Management AG. All Rights Reserved.