org.vmguys.vmtools.utils
Class AttributeDeleteOperation

java.lang.Object
  |
  +--org.vmguys.vmtools.utils.AbstractOperation
        |
        +--org.vmguys.vmtools.utils.AttributeDeleteOperation

public class AttributeDeleteOperation
extends AbstractOperation

This class represents an operation to delete an attribute of an Element.


Fields inherited from class org.vmguys.vmtools.utils.AbstractOperation
comment, node
 
Constructor Summary
AttributeDeleteOperation(DiffElement node, org.jdom.Attribute attr)
          Constructs an operation that will delete an attribute of the given node.
AttributeDeleteOperation(DiffElement node, org.jdom.Attribute attr, java.lang.String comment)
          Constructs an operation that will delete an attribute of the given node.
 
Method Summary
 org.jdom.Element asElement(org.jdom.Namespace namespace)
          Converts the operation to a JDOM Element that represents the operation.
 int cost()
          Returns the cost of this operation.
 int getOperationNodeNumber()
          Returns the number of the node this operation is being applied to.
 java.lang.String getOperationXpath()
          Returns the xpath of the node this operation is being applied to.
 java.lang.String toString()
          Returns a String with information about the operation.
 
Methods inherited from class org.vmguys.vmtools.utils.AbstractOperation
getNodeNumber, getXpath, wrapComment, wrapMetaData, wrapPI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeDeleteOperation

public AttributeDeleteOperation(DiffElement node,
                                org.jdom.Attribute attr)
Constructs an operation that will delete an attribute of the given node.

AttributeDeleteOperation

public AttributeDeleteOperation(DiffElement node,
                                org.jdom.Attribute attr,
                                java.lang.String comment)
Constructs an operation that will delete an attribute of the given node. The operation will include the specified comment. The comment may be null if it is not needed.
Method Detail

asElement

public org.jdom.Element asElement(org.jdom.Namespace namespace)
Converts the operation to a JDOM Element that represents the operation.
Overrides:
asElement in class AbstractOperation

cost

public int cost()
Returns the cost of this operation.
Overrides:
cost in class AbstractOperation

toString

public java.lang.String toString()
Returns a String with information about the operation.
Overrides:
toString in class AbstractOperation

getOperationXpath

public java.lang.String getOperationXpath()
                                   throws org.jdom.JDOMException
Returns the xpath of the node this operation is being applied to.
Overrides:
getOperationXpath in class AbstractOperation

getOperationNodeNumber

public int getOperationNodeNumber()
Returns the number of the node this operation is being applied to.
Overrides:
getOperationNodeNumber in class AbstractOperation


Copyright © 2001 VM Systems, Inc. All Rights Reserved.