|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.vmguys.vmtools.utils.AbstractOperation
This is the parent class of the various operations that can be put into a CostOps object.
| Field Summary | |
protected java.lang.String |
comment
This is a comment associated with the operation. |
protected DiffElement |
node
This is a reference to the Element being operated upon. |
| Constructor Summary | |
AbstractOperation()
|
|
| Method Summary | |
abstract org.jdom.Element |
asElement(org.jdom.Namespace namespace)
Converts the operation to a JDOM Element, possibly with children, that represents the operation. |
abstract int |
cost()
Returns a cost associated with this operation. |
int |
getNodeNumber()
Returns the node number this operation is being applied to. |
abstract int |
getOperationNodeNumber()
Returns the number of the node this operation is being applied to. |
abstract java.lang.String |
getOperationXpath()
Returns the xpath of the node this operation is being applied to. |
java.lang.String |
getXpath()
Returns the xpath of the node saved in this operation. |
java.lang.String |
toString()
|
protected org.jdom.Element |
wrapComment(org.jdom.Comment comment)
Returns an Element containing all the pertinent information about a Comment. |
protected org.jdom.Element |
wrapMetaData(org.jdom.Element node)
Looks for any Comments or ProcessingInstruction elements in the tree and replaces them with an Element containing the same information. |
protected org.jdom.Element |
wrapPI(org.jdom.ProcessingInstruction procInst)
Returns an Element containing all the pertinent information about a ProcessingInstruction. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected DiffElement node
protected java.lang.String comment
| Constructor Detail |
public AbstractOperation()
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic int getNodeNumber()
public java.lang.String getXpath()
throws org.jdom.JDOMException
public abstract java.lang.String getOperationXpath()
throws org.jdom.JDOMException
Returns the xpath of the node this operation is being applied to. This may not be the same as the xpath of the node. In some cases the xpath needed for the operation is the node's parent.
NOTE: I think this is too specific to the upper levels. Not all difference representations are going to need the same value here. This should be removed and replaced with some other technique.
public abstract int getOperationNodeNumber()
Returns the number of the node this operation is being applied to. This may not be the same as the number of the node. In some cases the number needed for the operation is the node's parent.
NOTE: I think this is too specific to the upper levels. Not all difference representations are going to need the same value here. This should be removed and replaced with some other technique.
public abstract int cost()
public abstract org.jdom.Element asElement(org.jdom.Namespace namespace)
protected org.jdom.Element wrapMetaData(org.jdom.Element node)
protected org.jdom.Element wrapComment(org.jdom.Comment comment)
protected org.jdom.Element wrapPI(org.jdom.ProcessingInstruction procInst)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||