Package com.ibm.di.entry
Class AttributeValue
- java.lang.Object
-
- com.ibm.di.entry.NodeImpl
-
- com.ibm.di.entry.CharacterDataImpl
-
- com.ibm.di.entry.AttributeValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.w3c.dom.CDATASection
,org.w3c.dom.CharacterData
,org.w3c.dom.Node
,org.w3c.dom.Text
public class AttributeValue extends CharacterDataImpl implements java.io.Serializable, org.w3c.dom.Text, org.w3c.dom.CDATASection, java.lang.Cloneable
The AttributeValue class is used in conjunction with the Attribute object to store information about an attribute value. The class has a value and an operation properties associated with the value.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
AV_ADD
Used when a value has been addedstatic int
AV_DELETE
Used when a value has been deletedstatic int
AV_REPLACE
Used when a value has been modified.static int
AV_UNCHANGED
Used when a value is not changedstatic int
AV_UNDEFINED
Used when a value does not have a defined operation code-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description AttributeValue(java.lang.Object value)
Creates an AttributeValue giving a value to be wrapped.AttributeValue(java.lang.Object value, int oper)
AttributeValue(java.lang.Object value, int oper, boolean isText)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeValue
clone()
org.w3c.dom.Node
cloneNode(boolean deep)
java.lang.String
getData()
java.lang.String
getLocalName()
java.lang.String
getNamespaceURI()
java.lang.String
getNodeName()
short
getNodeType()
int
getOper()
java.lang.String
getOperation()
Return the operation code.java.lang.String
getPrefix()
java.lang.Object
getValue()
void
setData(java.lang.String data)
void
setNodeTypeText(boolean value)
Changes the type of the node.void
setOper(int oper)
void
setOperation(java.lang.String oper)
void
setPrefix(java.lang.String prefix)
void
setValue(java.lang.Object value)
static int
stringToOper(java.lang.String oper)
java.lang.String
toDeltaString()
java.lang.String
toString()
-
Methods inherited from class com.ibm.di.entry.CharacterDataImpl
appendData, deleteData, getLength, getNodeValue, getWholeText, insertData, isElementContentWhitespace, replaceData, replaceWholeText, setNodeValue, splitText, substringData
-
Methods inherited from class com.ibm.di.entry.NodeImpl
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, internalLookupPrefix, internalNSLookup, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setTextContent, setUserData
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.CharacterData
appendData, deleteData, getLength, insertData, replaceData, substringData
-
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setTextContent, setUserData
-
-
-
-
Field Detail
-
AV_UNDEFINED
public static final int AV_UNDEFINED
Used when a value does not have a defined operation code- See Also:
- Constant Field Values
-
AV_UNCHANGED
public static final int AV_UNCHANGED
Used when a value is not changed- See Also:
- Constant Field Values
-
AV_ADD
public static final int AV_ADD
Used when a value has been added- See Also:
- Constant Field Values
-
AV_DELETE
public static final int AV_DELETE
Used when a value has been deleted- See Also:
- Constant Field Values
-
AV_REPLACE
public static final int AV_REPLACE
Used when a value has been modified.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AttributeValue
public AttributeValue(java.lang.Object value)
Creates an AttributeValue giving a value to be wrapped. The operation code assigned by default is AV_REPLACE.- Parameters:
value
- the value to be wrapped as an AttributeValue.
-
AttributeValue
public AttributeValue(java.lang.Object value, int oper)
-
AttributeValue
public AttributeValue(java.lang.Object value, int oper, boolean isText)
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
-
setValue
public void setValue(java.lang.Object value)
-
getOper
public int getOper()
-
getOperation
public java.lang.String getOperation()
Return the operation code. This only has meaning if this value is inside an Entry generated by an Iterator with Delta enabled.- Returns:
- - The operation code. Possible return values are :
"unchanged" - Used when a value is not changed
"add" - Used when a value has been added
"delete" - Used when a value has been deleted
"" - Used when a value does not have a defined operation code
-
setOper
public void setOper(int oper)
-
setOperation
public void setOperation(java.lang.String oper)
-
stringToOper
public static int stringToOper(java.lang.String oper)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCharacterDataImpl
-
toDeltaString
public java.lang.String toDeltaString()
-
setNodeTypeText
public void setNodeTypeText(boolean value)
Changes the type of the node.- Parameters:
value
- - if this is true, subsequent calls togetNodeType()
will returnNode.TEXT_NODE
, otherwise will returnNode.CDATA_SECTION_NODE
. *- Since:
- 7.0
-
clone
public AttributeValue clone()
- Overrides:
clone
in classjava.lang.Object
-
getData
public java.lang.String getData() throws org.w3c.dom.DOMException
- Specified by:
getData
in interfaceorg.w3c.dom.CharacterData
- Throws:
org.w3c.dom.DOMException
-
setData
public void setData(java.lang.String data) throws org.w3c.dom.DOMException
- Specified by:
setData
in interfaceorg.w3c.dom.CharacterData
- Throws:
org.w3c.dom.DOMException
-
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
- Specified by:
cloneNode
in interfaceorg.w3c.dom.Node
-
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeName
in interfaceorg.w3c.dom.Node
- Overrides:
getNodeName
in classNodeImpl
-
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalName
in interfaceorg.w3c.dom.Node
-
getNamespaceURI
public java.lang.String getNamespaceURI()
- Specified by:
getNamespaceURI
in interfaceorg.w3c.dom.Node
-
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interfaceorg.w3c.dom.Node
-
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interfaceorg.w3c.dom.Node
-
setPrefix
public void setPrefix(java.lang.String prefix) throws org.w3c.dom.DOMException
- Specified by:
setPrefix
in interfaceorg.w3c.dom.Node
- Throws:
org.w3c.dom.DOMException
-
-