org.eigenbase.dmv
Class DmvTransformXmlReader

java.lang.Object
  extended by org.eigenbase.dmv.DmvTransformXmlReader

public class DmvTransformXmlReader
extends Object

DmvTransformXmlReader reads a definition of a DMV transformation from an XML file and applies it to a JmiDependencyMappedTransform.

The XML file must be valid according to farrago/examples/dmv/DmvTransformationRuleSet.dtd.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/dmv/DmvTransformXmlReader.java#5 $
Author:
John Sichi

Field Summary
private static String ATTRIBUTE_ASSOC
           
private static String ATTRIBUTE_MAPPING
           
private static String ATTRIBUTE_REQUESTED_KIND
           
private static String ATTRIBUTE_SOURCE_CLASS
           
private static String ATTRIBUTE_TARGET_CLASS
           
private static String ELEMENT_SET_ALL_BY_AGGREGATION
           
private static String ELEMENT_SET_BY_REF_ASSOC
           
private  JmiModelGraph modelGraph
           
 
Constructor Summary
DmvTransformXmlReader(JmiModelGraph modelGraph)
          Creates a new DmvTransformXmlReader.
 
Method Summary
private  RefClass getRefClass(String className)
           
 void readTransformationRules(String filename, JmiDependencyMappedTransform transform)
          Converts the XML representation of a DMV transformation into a JmiDependencyMappedTransform.
private  void setAllByAggregation(Element rule, JmiDependencyMappedTransform transform)
           
private  void setByRefAssoc(Element rule, JmiDependencyMappedTransform transform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_SET_ALL_BY_AGGREGATION

private static final String ELEMENT_SET_ALL_BY_AGGREGATION
See Also:
Constant Field Values

ELEMENT_SET_BY_REF_ASSOC

private static final String ELEMENT_SET_BY_REF_ASSOC
See Also:
Constant Field Values

ATTRIBUTE_REQUESTED_KIND

private static final String ATTRIBUTE_REQUESTED_KIND
See Also:
Constant Field Values

ATTRIBUTE_MAPPING

private static final String ATTRIBUTE_MAPPING
See Also:
Constant Field Values

ATTRIBUTE_ASSOC

private static final String ATTRIBUTE_ASSOC
See Also:
Constant Field Values

ATTRIBUTE_SOURCE_CLASS

private static final String ATTRIBUTE_SOURCE_CLASS
See Also:
Constant Field Values

ATTRIBUTE_TARGET_CLASS

private static final String ATTRIBUTE_TARGET_CLASS
See Also:
Constant Field Values

modelGraph

private final JmiModelGraph modelGraph
Constructor Detail

DmvTransformXmlReader

public DmvTransformXmlReader(JmiModelGraph modelGraph)
Creates a new DmvTransformXmlReader.

Parameters:
modelGraph - model graph to use for metamodel lookup
Method Detail

readTransformationRules

public void readTransformationRules(String filename,
                                    JmiDependencyMappedTransform transform)
                             throws Exception
Converts the XML representation of a DMV transformation into a JmiDependencyMappedTransform.

Parameters:
filename - name of XML file to read
transform - transform to initialize
Throws:
Exception

setAllByAggregation

private void setAllByAggregation(Element rule,
                                 JmiDependencyMappedTransform transform)

setByRefAssoc

private void setByRefAssoc(Element rule,
                           JmiDependencyMappedTransform transform)

getRefClass

private RefClass getRefClass(String className)