org.apache.hivemind.parse
Class ConversionDescriptor

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.hivemind.schema.rules.BaseRule
          extended by org.apache.hivemind.parse.ConversionDescriptor
All Implemented Interfaces:
Locatable, LocationHolder, Rule

public class ConversionDescriptor
extends BaseRule

Descriptor for the <conversion> module descriptor element. This descriptor implements the Ruleinterface and is added as a standard rule to the containing ElementModel. When processed it delegates to a CreateObjectRule, a bunch of ReadAttributeRule, and finally an InvokeParentRule.

Author:
Howard Lewis Ship

Constructor Summary
ConversionDescriptor(ErrorHandler errorHandler, ElementModel elementModel)
           
 
Method Summary
 void addAttributeMapping(AttributeMappingDescriptor descriptor)
          Adds a mapping for an attribute; these come from <map> elements nested within the <conversion> element.
 void addRulesForModel()
           
 void begin(SchemaProcessor processor, Element element)
          Does nothing; subclasses may override.
 void end(SchemaProcessor processor, Element element)
          Does nothing; subclasses may override.
 java.util.List getAttributeMappings()
           
 java.lang.String getClassName()
           
 java.lang.String getParentMethodName()
           
 void setClassName(java.lang.String string)
           
 void setParentMethodName(java.lang.String string)
           
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ConversionDescriptor

public ConversionDescriptor(ErrorHandler errorHandler,
                            ElementModel elementModel)
Method Detail

getAttributeMappings

public java.util.List getAttributeMappings()
Since:
1.1

addAttributeMapping

public void addAttributeMapping(AttributeMappingDescriptor descriptor)
Adds a mapping for an attribute; these come from <map> elements nested within the <conversion> element. A check for duplicate attribute mappings (that is, duplicated attribute name), and an error is logged (and the duplicate ignored).


getClassName

public java.lang.String getClassName()
Since:
1.1

setClassName

public void setClassName(java.lang.String string)

getParentMethodName

public java.lang.String getParentMethodName()
Since:
1.1

setParentMethodName

public void setParentMethodName(java.lang.String string)

begin

public void begin(SchemaProcessor processor,
                  Element element)
Description copied from class: BaseRule
Does nothing; subclasses may override.

Specified by:
begin in interface Rule
Overrides:
begin in class BaseRule
Since:
1.1

end

public void end(SchemaProcessor processor,
                Element element)
Description copied from class: BaseRule
Does nothing; subclasses may override.

Specified by:
end in interface Rule
Overrides:
end in class BaseRule
Since:
1.1

addRulesForModel

public void addRulesForModel()