com.metamatrix.query.optimizer.xml
Class SourceNodeGenaratorVisitor

java.lang.Object
  extended by com.metamatrix.query.mapping.xml.MappingVisitor
      extended by com.metamatrix.query.optimizer.xml.SourceNodeGenaratorVisitor

public class SourceNodeGenaratorVisitor
extends MappingVisitor

This class visits all the base nodes with "source" property set and extracts then and makes then independent nodes. for example: ParentElement MappingElement A (source X) converted to ParentElement SourceNode X MappingElement A


Constructor Summary
SourceNodeGenaratorVisitor()
           
 
Method Summary
static MappingDocument extractSourceNodes(MappingDocument doc)
          This visitor will extract the 'source' property off of the all the base nodes and create a separate MappingSource node and make the original node as its immediate child.
 void visit(MappingBaseNode baseNode)
          In this code since we are only traversing the child nodes after the modification the removal and addtion of the nodes to the current may not affect the underlying collection object.
 
Methods inherited from class com.metamatrix.query.mapping.xml.MappingVisitor
setAbort, shouldAbort, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, walkAttributes, walkChildNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceNodeGenaratorVisitor

public SourceNodeGenaratorVisitor()
Method Detail

visit

public void visit(MappingBaseNode baseNode)
In this code since we are only traversing the child nodes after the modification the removal and addtion of the nodes to the current may not affect the underlying collection object.

Overrides:
visit in class MappingVisitor

extractSourceNodes

public static MappingDocument extractSourceNodes(MappingDocument doc)
This visitor will extract the 'source' property off of the all the base nodes and create a separate MappingSource node and make the original node as its immediate child.

Parameters:
doc -
Returns:


Copyright © 2009. All Rights Reserved.