org.apache.hivemind.impl
Class SchemaProcessorImpl

java.lang.Object
  extended by org.apache.hivemind.impl.SchemaProcessorImpl
All Implemented Interfaces:
SchemaProcessor

public final class SchemaProcessorImpl
extends java.lang.Object
implements SchemaProcessor

Used to assemble all the Contributions contributed to an ConfigurationPoint while converting the XML (represented as Elements into Java objects.

Author:
Howard Lewis Ship

Constructor Summary
SchemaProcessorImpl(ErrorLog errorLog, Schema schema)
           
 
Method Summary
 void addElement(java.lang.Object element)
          Invoked over reflection by the InvokeParentRule.
 Translator getAttributeTranslator(java.lang.String attributeName)
          Returns the Translator for a particular attribute of the current element.
 Translator getContentTranslator()
          Returns a Translator used to convert the content of the current element.
 Module getContributingModule()
          Returns the module which contributed the current elements being processed.
 Module getDefiningModule()
          Return the module which defined the schema.
 java.lang.String getElementPath()
          Returns the path to the current element in the form a sequence of element names separated with slashes.
 java.util.List getElements()
           
 java.util.Map getMappedElements()
           
 Translator getTranslator(java.lang.String translator)
          Returns the named Translator.
 java.lang.Object peek()
          Peeks at the top object on the stack.
 java.lang.Object peek(int depth)
          Peeks at an object within the stack at the indicated depth.
 java.lang.Object pop()
          Pops the top object off the stack and returns it.
 void process(java.util.List elements, Module contributingModule)
          Processes a single extension.
 void push(java.lang.Object object)
          Pushes an object onto the processor's stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaProcessorImpl

public SchemaProcessorImpl(ErrorLog errorLog,
                           Schema schema)
Method Detail

addElement

public void addElement(java.lang.Object element)
Invoked over reflection by the InvokeParentRule.

Specified by:
addElement in interface SchemaProcessor

getElements

public java.util.List getElements()

getMappedElements

public java.util.Map getMappedElements()

push

public void push(java.lang.Object object)
Description copied from interface: SchemaProcessor
Pushes an object onto the processor's stack.

Specified by:
push in interface SchemaProcessor

pop

public java.lang.Object pop()
Description copied from interface: SchemaProcessor
Pops the top object off the stack and returns it.

Specified by:
pop in interface SchemaProcessor

peek

public java.lang.Object peek()
Description copied from interface: SchemaProcessor
Peeks at the top object on the stack.

Specified by:
peek in interface SchemaProcessor

peek

public java.lang.Object peek(int depth)
Description copied from interface: SchemaProcessor
Peeks at an object within the stack at the indicated depth.

Specified by:
peek in interface SchemaProcessor

getContributingModule

public Module getContributingModule()
Description copied from interface: SchemaProcessor
Returns the module which contributed the current elements being processed.

Specified by:
getContributingModule in interface SchemaProcessor

getDefiningModule

public Module getDefiningModule()
Description copied from interface: SchemaProcessor
Return the module which defined the schema.

Specified by:
getDefiningModule in interface SchemaProcessor
Since:
1.1

getElementPath

public java.lang.String getElementPath()
Description copied from interface: SchemaProcessor
Returns the path to the current element in the form a sequence of element names separated with slashes. This is most often used in error messages, to help identify the position of an error.

Specified by:
getElementPath in interface SchemaProcessor

process

public void process(java.util.List elements,
                    Module contributingModule)
Processes a single extension.


getContentTranslator

public Translator getContentTranslator()
Description copied from interface: SchemaProcessor
Returns a Translator used to convert the content of the current element. Will not return null.

Specified by:
getContentTranslator in interface SchemaProcessor

getAttributeTranslator

public Translator getAttributeTranslator(java.lang.String attributeName)
Description copied from interface: SchemaProcessor
Returns the Translator for a particular attribute of the current element. Will not return null.

Specified by:
getAttributeTranslator in interface SchemaProcessor

getTranslator

public Translator getTranslator(java.lang.String translator)
Description copied from interface: SchemaProcessor
Returns the named Translator.

Specified by:
getTranslator in interface SchemaProcessor